diff options
Diffstat (limited to 'arch/x86/kernel/head64.c')
-rw-r--r-- | arch/x86/kernel/head64.c | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/arch/x86/kernel/head64.c b/arch/x86/kernel/head64.c index 8561f626edad..a7eee0a4751d 100644 --- a/arch/x86/kernel/head64.c +++ b/arch/x86/kernel/head64.c | |||
@@ -14,7 +14,6 @@ | |||
14 | #include <asm/processor.h> | 14 | #include <asm/processor.h> |
15 | #include <asm/proto.h> | 15 | #include <asm/proto.h> |
16 | #include <asm/smp.h> | 16 | #include <asm/smp.h> |
17 | #include <asm/bootsetup.h> | ||
18 | #include <asm/setup.h> | 17 | #include <asm/setup.h> |
19 | #include <asm/desc.h> | 18 | #include <asm/desc.h> |
20 | #include <asm/pgtable.h> | 19 | #include <asm/pgtable.h> |
@@ -36,26 +35,15 @@ static void __init clear_bss(void) | |||
36 | (unsigned long) __bss_stop - (unsigned long) __bss_start); | 35 | (unsigned long) __bss_stop - (unsigned long) __bss_start); |
37 | } | 36 | } |
38 | 37 | ||
39 | #define NEW_CL_POINTER 0x228 /* Relative to real mode data */ | ||
40 | #define OLD_CL_MAGIC_ADDR 0x20 | ||
41 | #define OLD_CL_MAGIC 0xA33F | ||
42 | #define OLD_CL_OFFSET 0x22 | ||
43 | |||
44 | static void __init copy_bootdata(char *real_mode_data) | 38 | static void __init copy_bootdata(char *real_mode_data) |
45 | { | 39 | { |
46 | unsigned long new_data; | ||
47 | char * command_line; | 40 | char * command_line; |
48 | 41 | ||
49 | memcpy(x86_boot_params, real_mode_data, BOOT_PARAM_SIZE); | 42 | memcpy(&boot_params, real_mode_data, sizeof boot_params); |
50 | new_data = *(u32 *) (x86_boot_params + NEW_CL_POINTER); | 43 | if (boot_params.hdr.cmd_line_ptr) { |
51 | if (!new_data) { | 44 | command_line = __va(boot_params.hdr.cmd_line_ptr); |
52 | if (OLD_CL_MAGIC != *(u16 *)(real_mode_data + OLD_CL_MAGIC_ADDR)) { | 45 | memcpy(boot_command_line, command_line, COMMAND_LINE_SIZE); |
53 | return; | ||
54 | } | ||
55 | new_data = __pa(real_mode_data) + *(u16 *)(real_mode_data + OLD_CL_OFFSET); | ||
56 | } | 46 | } |
57 | command_line = __va(new_data); | ||
58 | memcpy(boot_command_line, command_line, COMMAND_LINE_SIZE); | ||
59 | } | 47 | } |
60 | 48 | ||
61 | void __init x86_64_start_kernel(char * real_mode_data) | 49 | void __init x86_64_start_kernel(char * real_mode_data) |