diff options
Diffstat (limited to 'arch/x86/kernel')
-rw-r--r-- | arch/x86/kernel/head64.c | 20 | ||||
-rw-r--r-- | arch/x86/kernel/setup_64.c | 22 |
2 files changed, 42 insertions, 0 deletions
diff --git a/arch/x86/kernel/head64.c b/arch/x86/kernel/head64.c index d31d6b72d60d..e25c57b8aa84 100644 --- a/arch/x86/kernel/head64.c +++ b/arch/x86/kernel/head64.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/string.h> | 11 | #include <linux/string.h> |
12 | #include <linux/percpu.h> | 12 | #include <linux/percpu.h> |
13 | #include <linux/start_kernel.h> | 13 | #include <linux/start_kernel.h> |
14 | #include <linux/io.h> | ||
14 | 15 | ||
15 | #include <asm/processor.h> | 16 | #include <asm/processor.h> |
16 | #include <asm/proto.h> | 17 | #include <asm/proto.h> |
@@ -100,6 +101,24 @@ static void __init reserve_ebda_region(void) | |||
100 | reserve_early(lowmem, 0x100000, "BIOS reserved"); | 101 | reserve_early(lowmem, 0x100000, "BIOS reserved"); |
101 | } | 102 | } |
102 | 103 | ||
104 | static void __init reserve_setup_data(void) | ||
105 | { | ||
106 | struct setup_data *data; | ||
107 | unsigned long pa_data; | ||
108 | char buf[32]; | ||
109 | |||
110 | if (boot_params.hdr.version < 0x0209) | ||
111 | return; | ||
112 | pa_data = boot_params.hdr.setup_data; | ||
113 | while (pa_data) { | ||
114 | data = early_ioremap(pa_data, sizeof(*data)); | ||
115 | sprintf(buf, "setup data %x", data->type); | ||
116 | reserve_early(pa_data, pa_data+sizeof(*data)+data->len, buf); | ||
117 | pa_data = data->next; | ||
118 | early_iounmap(data, sizeof(*data)); | ||
119 | } | ||
120 | } | ||
121 | |||
103 | void __init x86_64_start_kernel(char * real_mode_data) | 122 | void __init x86_64_start_kernel(char * real_mode_data) |
104 | { | 123 | { |
105 | int i; | 124 | int i; |
@@ -156,6 +175,7 @@ void __init x86_64_start_kernel(char * real_mode_data) | |||
156 | #endif | 175 | #endif |
157 | 176 | ||
158 | reserve_ebda_region(); | 177 | reserve_ebda_region(); |
178 | reserve_setup_data(); | ||
159 | 179 | ||
160 | /* | 180 | /* |
161 | * At this point everything still needed from the boot loader | 181 | * At this point everything still needed from the boot loader |
diff --git a/arch/x86/kernel/setup_64.c b/arch/x86/kernel/setup_64.c index 17bdf2343095..e1a21d6b3671 100644 --- a/arch/x86/kernel/setup_64.c +++ b/arch/x86/kernel/setup_64.c | |||
@@ -264,6 +264,26 @@ void __attribute__((weak)) __init memory_setup(void) | |||
264 | machine_specific_memory_setup(); | 264 | machine_specific_memory_setup(); |
265 | } | 265 | } |
266 | 266 | ||
267 | static void __init parse_setup_data(void) | ||
268 | { | ||
269 | struct setup_data *data; | ||
270 | unsigned long pa_data; | ||
271 | |||
272 | if (boot_params.hdr.version < 0x0209) | ||
273 | return; | ||
274 | pa_data = boot_params.hdr.setup_data; | ||
275 | while (pa_data) { | ||
276 | data = early_ioremap(pa_data, PAGE_SIZE); | ||
277 | switch (data->type) { | ||
278 | default: | ||
279 | break; | ||
280 | } | ||
281 | free_early(pa_data, pa_data+sizeof(*data)+data->len); | ||
282 | pa_data = data->next; | ||
283 | early_iounmap(data, PAGE_SIZE); | ||
284 | } | ||
285 | } | ||
286 | |||
267 | /* | 287 | /* |
268 | * setup_arch - architecture-specific boot-time initializations | 288 | * setup_arch - architecture-specific boot-time initializations |
269 | * | 289 | * |
@@ -316,6 +336,8 @@ void __init setup_arch(char **cmdline_p) | |||
316 | strlcpy(command_line, boot_command_line, COMMAND_LINE_SIZE); | 336 | strlcpy(command_line, boot_command_line, COMMAND_LINE_SIZE); |
317 | *cmdline_p = command_line; | 337 | *cmdline_p = command_line; |
318 | 338 | ||
339 | parse_setup_data(); | ||
340 | |||
319 | parse_early_param(); | 341 | parse_early_param(); |
320 | 342 | ||
321 | #ifdef CONFIG_PROVIDE_OHCI1394_DMA_INIT | 343 | #ifdef CONFIG_PROVIDE_OHCI1394_DMA_INIT |