X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=arch%2Fx86_64%2Fkernel%2Fhead64.c;h=127a678805ed77acb844d5e8f26b276b1023bdda;hb=9bf4aaab3e101692164d49b7ca357651eb691cb6;hp=b04a1add24640115bd2608ec7f1439981d19e36a;hpb=5273a3df6485dc2ad6aa7ddd441b9a21970f003b;p=linux-2.6.git diff --git a/arch/x86_64/kernel/head64.c b/arch/x86_64/kernel/head64.c index b04a1add2..127a67880 100644 --- a/arch/x86_64/kernel/head64.c +++ b/arch/x86_64/kernel/head64.c @@ -16,6 +16,7 @@ #include #include #include +#include /* Don't add a printk in there. printk relies on the PDA which is not initialized yet. */ @@ -73,6 +74,8 @@ 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; @@ -80,6 +83,9 @@ void __init x86_64_start_kernel(char * real_mode_data) clear_bss(); pda_init(0); copy_bootdata(real_mode_data); +#ifdef CONFIG_SMP + cpu_set(0, cpu_online_map); +#endif /* default console: */ if (!strstr(saved_command_line, "console=")) strcat(saved_command_line, " console=tty0"); @@ -95,6 +101,10 @@ void __init x86_64_start_kernel(char * real_mode_data) if (strstr(saved_command_line, "disableapic")) disable_apic = 1; #endif + /* You need early console to see that */ + if (__pa_symbol(&_end) >= KERNEL_TEXT_SIZE) + panic("Kernel too big for kernel mapping\n"); + setup_boot_cpu_data(); start_kernel(); }