diff options
Diffstat (limited to 'arch/x86_64/kernel/head64.c')
-rw-r--r-- | arch/x86_64/kernel/head64.c | 44 |
1 files changed, 1 insertions, 43 deletions
diff --git a/arch/x86_64/kernel/head64.c b/arch/x86_64/kernel/head64.c index 36647ce6aecb..9561eb3c5b5c 100644 --- a/arch/x86_64/kernel/head64.c +++ b/arch/x86_64/kernel/head64.c | |||
@@ -45,38 +45,16 @@ static void __init copy_bootdata(char *real_mode_data) | |||
45 | new_data = *(int *) (x86_boot_params + NEW_CL_POINTER); | 45 | new_data = *(int *) (x86_boot_params + NEW_CL_POINTER); |
46 | if (!new_data) { | 46 | if (!new_data) { |
47 | if (OLD_CL_MAGIC != * (u16 *) OLD_CL_MAGIC_ADDR) { | 47 | if (OLD_CL_MAGIC != * (u16 *) OLD_CL_MAGIC_ADDR) { |
48 | printk("so old bootloader that it does not support commandline?!\n"); | ||
49 | return; | 48 | return; |
50 | } | 49 | } |
51 | new_data = OLD_CL_BASE_ADDR + * (u16 *) OLD_CL_OFFSET; | 50 | new_data = OLD_CL_BASE_ADDR + * (u16 *) OLD_CL_OFFSET; |
52 | printk("old bootloader convention, maybe loadlin?\n"); | ||
53 | } | 51 | } |
54 | command_line = (char *) ((u64)(new_data)); | 52 | command_line = (char *) ((u64)(new_data)); |
55 | memcpy(saved_command_line, command_line, COMMAND_LINE_SIZE); | 53 | memcpy(saved_command_line, command_line, COMMAND_LINE_SIZE); |
56 | printk("Bootdata ok (command line is %s)\n", saved_command_line); | ||
57 | } | ||
58 | |||
59 | static void __init setup_boot_cpu_data(void) | ||
60 | { | ||
61 | unsigned int dummy, eax; | ||
62 | |||
63 | /* get vendor info */ | ||
64 | cpuid(0, (unsigned int *)&boot_cpu_data.cpuid_level, | ||
65 | (unsigned int *)&boot_cpu_data.x86_vendor_id[0], | ||
66 | (unsigned int *)&boot_cpu_data.x86_vendor_id[8], | ||
67 | (unsigned int *)&boot_cpu_data.x86_vendor_id[4]); | ||
68 | |||
69 | /* get cpu type */ | ||
70 | cpuid(1, &eax, &dummy, &dummy, | ||
71 | (unsigned int *) &boot_cpu_data.x86_capability); | ||
72 | boot_cpu_data.x86 = (eax >> 8) & 0xf; | ||
73 | boot_cpu_data.x86_model = (eax >> 4) & 0xf; | ||
74 | boot_cpu_data.x86_mask = eax & 0xf; | ||
75 | } | 54 | } |
76 | 55 | ||
77 | void __init x86_64_start_kernel(char * real_mode_data) | 56 | void __init x86_64_start_kernel(char * real_mode_data) |
78 | { | 57 | { |
79 | char *s; | ||
80 | int i; | 58 | int i; |
81 | 59 | ||
82 | for (i = 0; i < 256; i++) | 60 | for (i = 0; i < 256; i++) |
@@ -84,10 +62,7 @@ void __init x86_64_start_kernel(char * real_mode_data) | |||
84 | asm volatile("lidt %0" :: "m" (idt_descr)); | 62 | asm volatile("lidt %0" :: "m" (idt_descr)); |
85 | clear_bss(); | 63 | clear_bss(); |
86 | 64 | ||
87 | /* | 65 | early_printk("Kernel alive\n"); |
88 | * This must be called really, really early: | ||
89 | */ | ||
90 | lockdep_init(); | ||
91 | 66 | ||
92 | /* | 67 | /* |
93 | * switch to init_level4_pgt from boot_level4_pgt | 68 | * switch to init_level4_pgt from boot_level4_pgt |
@@ -103,22 +78,5 @@ void __init x86_64_start_kernel(char * real_mode_data) | |||
103 | #ifdef CONFIG_SMP | 78 | #ifdef CONFIG_SMP |
104 | cpu_set(0, cpu_online_map); | 79 | cpu_set(0, cpu_online_map); |
105 | #endif | 80 | #endif |
106 | s = strstr(saved_command_line, "earlyprintk="); | ||
107 | if (s != NULL) | ||
108 | setup_early_printk(strchr(s, '=') + 1); | ||
109 | #ifdef CONFIG_NUMA | ||
110 | s = strstr(saved_command_line, "numa="); | ||
111 | if (s != NULL) | ||
112 | numa_setup(s+5); | ||
113 | #endif | ||
114 | #ifdef CONFIG_X86_IO_APIC | ||
115 | if (strstr(saved_command_line, "disableapic")) | ||
116 | disable_apic = 1; | ||
117 | #endif | ||
118 | /* You need early console to see that */ | ||
119 | if (__pa_symbol(&_end) >= KERNEL_TEXT_SIZE) | ||
120 | panic("Kernel too big for kernel mapping\n"); | ||
121 | |||
122 | setup_boot_cpu_data(); | ||
123 | start_kernel(); | 81 | start_kernel(); |
124 | } | 82 | } |