diff options
Diffstat (limited to 'arch/x86_64/kernel/head64.c')
-rw-r--r-- | arch/x86_64/kernel/head64.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/x86_64/kernel/head64.c b/arch/x86_64/kernel/head64.c index cf6ab147a2a..e0f12d49db4 100644 --- a/arch/x86_64/kernel/head64.c +++ b/arch/x86_64/kernel/head64.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <asm/bootsetup.h> | 19 | #include <asm/bootsetup.h> |
20 | #include <asm/setup.h> | 20 | #include <asm/setup.h> |
21 | #include <asm/desc.h> | 21 | #include <asm/desc.h> |
22 | #include <asm/pgtable.h> | ||
22 | 23 | ||
23 | /* Don't add a printk in there. printk relies on the PDA which is not initialized | 24 | /* Don't add a printk in there. printk relies on the PDA which is not initialized |
24 | yet. */ | 25 | yet. */ |
@@ -86,6 +87,13 @@ void __init x86_64_start_kernel(char * real_mode_data) | |||
86 | set_intr_gate(i, early_idt_handler); | 87 | set_intr_gate(i, early_idt_handler); |
87 | asm volatile("lidt %0" :: "m" (idt_descr)); | 88 | asm volatile("lidt %0" :: "m" (idt_descr)); |
88 | clear_bss(); | 89 | clear_bss(); |
90 | |||
91 | /* | ||
92 | * switch to init_level4_pgt from boot_level4_pgt | ||
93 | */ | ||
94 | memcpy(init_level4_pgt, boot_level4_pgt, PTRS_PER_PGD*sizeof(pgd_t)); | ||
95 | asm volatile("movq %0,%%cr3" :: "r" (__pa_symbol(&init_level4_pgt))); | ||
96 | |||
89 | pda_init(0); | 97 | pda_init(0); |
90 | copy_bootdata(real_mode_data); | 98 | copy_bootdata(real_mode_data); |
91 | #ifdef CONFIG_SMP | 99 | #ifdef CONFIG_SMP |