diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-14 19:56:02 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-14 19:56:02 -0800 |
commit | 4060994c3e337b40e0f6fa8ce2cc178e021baf3d (patch) | |
tree | 980297c1747ca89354bc879cc5d17903eacb19e2 /arch/x86_64/kernel/head64.c | |
parent | 0174f72f848dfe7dc7488799776303c81b181b16 (diff) | |
parent | d3ee871e63d0a0c70413dc0aa5534b8d6cd6ec37 (diff) | |
download | kernel_samsung_smdk4412-4060994c3e337b40e0f6fa8ce2cc178e021baf3d.tar.gz kernel_samsung_smdk4412-4060994c3e337b40e0f6fa8ce2cc178e021baf3d.tar.bz2 kernel_samsung_smdk4412-4060994c3e337b40e0f6fa8ce2cc178e021baf3d.zip |
Merge x86-64 update from Andi
Diffstat (limited to 'arch/x86_64/kernel/head64.c')
-rw-r--r-- | arch/x86_64/kernel/head64.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/arch/x86_64/kernel/head64.c b/arch/x86_64/kernel/head64.c index cf6ab147a2a..b675c5add01 100644 --- a/arch/x86_64/kernel/head64.c +++ b/arch/x86_64/kernel/head64.c @@ -19,14 +19,15 @@ #include <asm/bootsetup.h> #include <asm/setup.h> #include <asm/desc.h> +#include <asm/pgtable.h> +#include <asm/sections.h> /* Don't add a printk in there. printk relies on the PDA which is not initialized yet. */ static void __init clear_bss(void) { - extern char __bss_start[], __bss_end[]; memset(__bss_start, 0, - (unsigned long) __bss_end - (unsigned long) __bss_start); + (unsigned long) __bss_stop - (unsigned long) __bss_start); } #define NEW_CL_POINTER 0x228 /* Relative to real mode data */ @@ -75,8 +76,6 @@ static void __init setup_boot_cpu_data(void) boot_cpu_data.x86_mask = eax & 0xf; } -extern char _end[]; - void __init x86_64_start_kernel(char * real_mode_data) { char *s; @@ -86,6 +85,13 @@ void __init x86_64_start_kernel(char * real_mode_data) set_intr_gate(i, early_idt_handler); asm volatile("lidt %0" :: "m" (idt_descr)); clear_bss(); + + /* + * switch to init_level4_pgt from boot_level4_pgt + */ + memcpy(init_level4_pgt, boot_level4_pgt, PTRS_PER_PGD*sizeof(pgd_t)); + asm volatile("movq %0,%%cr3" :: "r" (__pa_symbol(&init_level4_pgt))); + pda_init(0); copy_bootdata(real_mode_data); #ifdef CONFIG_SMP |