aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/head32.c
diff options
context:
space:
mode:
authorHuang, Ying <ying.huang@intel.com>2008-06-02 02:26:23 -0400
committerThomas Gleixner <tglx@linutronix.de>2008-06-05 09:10:02 -0400
commit0c51a965ed3c44dd50497e74492a015680e49899 (patch)
treec04c9670b5adecfef995cd1dc49b8c5d9e5e5ed3 /arch/x86/kernel/head32.c
parentecacf09f7d26b2317e8b1d59fa40f62081fad0bb (diff)
x86: extract common part of head32.c and head64.c into head.c
This patch extracts the common part of head32.c and head64.c into head.c. Signed-off-by: Huang Ying <ying.huang@intel.com> Cc: andi@firstfloor.org Cc: mingo@redhat.com Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86/kernel/head32.c')
-rw-r--r--arch/x86/kernel/head32.c50
1 files changed, 0 insertions, 50 deletions
diff --git a/arch/x86/kernel/head32.c b/arch/x86/kernel/head32.c
index 0b6cb9fba71e..fa1d25dd83e3 100644
--- a/arch/x86/kernel/head32.c
+++ b/arch/x86/kernel/head32.c
@@ -13,56 +13,6 @@
13#include <asm/e820.h> 13#include <asm/e820.h>
14#include <asm/bios_ebda.h> 14#include <asm/bios_ebda.h>
15 15
16#define BIOS_LOWMEM_KILOBYTES 0x413
17
18/*
19 * The BIOS places the EBDA/XBDA at the top of conventional
20 * memory, and usually decreases the reported amount of
21 * conventional memory (int 0x12) too. This also contains a
22 * workaround for Dell systems that neglect to reserve EBDA.
23 * The same workaround also avoids a problem with the AMD768MPX
24 * chipset: reserve a page before VGA to prevent PCI prefetch
25 * into it (errata #56). Usually the page is reserved anyways,
26 * unless you have no PS/2 mouse plugged in.
27 */
28static void __init reserve_ebda_region(void)
29{
30 unsigned int lowmem, ebda_addr;
31
32 /* To determine the position of the EBDA and the */
33 /* end of conventional memory, we need to look at */
34 /* the BIOS data area. In a paravirtual environment */
35 /* that area is absent. We'll just have to assume */
36 /* that the paravirt case can handle memory setup */
37 /* correctly, without our help. */
38 if (paravirt_enabled())
39 return;
40
41 /* end of low (conventional) memory */
42 lowmem = *(unsigned short *)__va(BIOS_LOWMEM_KILOBYTES);
43 lowmem <<= 10;
44
45 /* start of EBDA area */
46 ebda_addr = get_bios_ebda();
47
48 /* Fixup: bios puts an EBDA in the top 64K segment */
49 /* of conventional memory, but does not adjust lowmem. */
50 if ((lowmem - ebda_addr) <= 0x10000)
51 lowmem = ebda_addr;
52
53 /* Fixup: bios does not report an EBDA at all. */
54 /* Some old Dells seem to need 4k anyhow (bugzilla 2990) */
55 if ((ebda_addr == 0) && (lowmem >= 0x9f000))
56 lowmem = 0x9f000;
57
58 /* Paranoia: should never happen, but... */
59 if ((lowmem == 0) || (lowmem >= 0x100000))
60 lowmem = 0x9f000;
61
62 /* reserve all memory between lowmem and the 1MB mark */
63 reserve_early(lowmem, 0x100000, "BIOS reserved");
64}
65
66void __init i386_start_kernel(void) 16void __init i386_start_kernel(void)
67{ 17{
68 reserve_early(__pa_symbol(&_text), __pa_symbol(&_end), "TEXT DATA BSS"); 18 reserve_early(__pa_symbol(&_text), __pa_symbol(&_end), "TEXT DATA BSS");