aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/head64.c
diff options
context:
space:
mode:
authorHuang, Ying <ying.huang@intel.com>2008-03-27 22:49:44 -0400
committerIngo Molnar <mingo@elte.hu>2008-04-26 15:34:42 -0400
commit8b664aa66e824a0ddf4ec56d41fa0cf7bb374de6 (patch)
tree57c5de72c38f630e126964b922c379c4a7e49100 /arch/x86/kernel/head64.c
parent50eae2a7c9862afe263a2003c12f457ecfc9e6a2 (diff)
x86, boot: add linked list of struct setup_data
This patch adds a field of 64-bit physical pointer to NULL terminated single linked list of struct setup_data to real-mode kernel header. This is used as a more extensible boot parameters passing mechanism. Signed-off-by: Huang Ying <ying.huang@intel.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86/kernel/head64.c')
-rw-r--r--arch/x86/kernel/head64.c20
1 files changed, 20 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
104static 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
103void __init x86_64_start_kernel(char * real_mode_data) 122void __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