aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/head64.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kernel/head64.c')
-rw-r--r--arch/x86/kernel/head64.c68
1 files changed, 0 insertions, 68 deletions
diff --git a/arch/x86/kernel/head64.c b/arch/x86/kernel/head64.c
index 4bcb61cd9fcd..c970929bb15d 100644
--- a/arch/x86/kernel/head64.c
+++ b/arch/x86/kernel/head64.c
@@ -65,74 +65,6 @@ static void __init copy_bootdata(char *real_mode_data)
65 } 65 }
66} 66}
67 67
68#define BIOS_LOWMEM_KILOBYTES 0x413
69
70/*
71 * The BIOS places the EBDA/XBDA at the top of conventional
72 * memory, and usually decreases the reported amount of
73 * conventional memory (int 0x12) too. This also contains a
74 * workaround for Dell systems that neglect to reserve EBDA.
75 * The same workaround also avoids a problem with the AMD768MPX
76 * chipset: reserve a page before VGA to prevent PCI prefetch
77 * into it (errata #56). Usually the page is reserved anyways,
78 * unless you have no PS/2 mouse plugged in.
79 */
80static void __init reserve_ebda_region(void)
81{
82 unsigned int lowmem, ebda_addr;
83
84 /* To determine the position of the EBDA and the */
85 /* end of conventional memory, we need to look at */
86 /* the BIOS data area. In a paravirtual environment */
87 /* that area is absent. We'll just have to assume */
88 /* that the paravirt case can handle memory setup */
89 /* correctly, without our help. */
90 if (paravirt_enabled())
91 return;
92
93 /* end of low (conventional) memory */
94 lowmem = *(unsigned short *)__va(BIOS_LOWMEM_KILOBYTES);
95 lowmem <<= 10;
96
97 /* start of EBDA area */
98 ebda_addr = get_bios_ebda();
99
100 /* Fixup: bios puts an EBDA in the top 64K segment */
101 /* of conventional memory, but does not adjust lowmem. */
102 if ((lowmem - ebda_addr) <= 0x10000)
103 lowmem = ebda_addr;
104
105 /* Fixup: bios does not report an EBDA at all. */
106 /* Some old Dells seem to need 4k anyhow (bugzilla 2990) */
107 if ((ebda_addr == 0) && (lowmem >= 0x9f000))
108 lowmem = 0x9f000;
109
110 /* Paranoia: should never happen, but... */
111 if ((lowmem == 0) || (lowmem >= 0x100000))
112 lowmem = 0x9f000;
113
114 /* reserve all memory between lowmem and the 1MB mark */
115 reserve_early(lowmem, 0x100000, "BIOS reserved");
116}
117
118static void __init reserve_setup_data(void)
119{
120 struct setup_data *data;
121 unsigned long pa_data;
122 char buf[32];
123
124 if (boot_params.hdr.version < 0x0209)
125 return;
126 pa_data = boot_params.hdr.setup_data;
127 while (pa_data) {
128 data = early_ioremap(pa_data, sizeof(*data));
129 sprintf(buf, "setup data %x", data->type);
130 reserve_early(pa_data, pa_data+sizeof(*data)+data->len, buf);
131 pa_data = data->next;
132 early_iounmap(data, sizeof(*data));
133 }
134}
135
136void __init x86_64_start_kernel(char * real_mode_data) 68void __init x86_64_start_kernel(char * real_mode_data)
137{ 69{
138 int i; 70 int i;