]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
x86: add X86_RESERVE_LOW_64K
authorIngo Molnar <mingo@elte.hu>
Tue, 16 Sep 2008 08:07:34 +0000 (10:07 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 13 Nov 2008 17:55:55 +0000 (09:55 -0800)
commit fc38151947477596aa27df6c4306ad6008dc6711 upstream.

This bugzilla:

  http://bugzilla.kernel.org/show_bug.cgi?id=11237

Documents a wide range of systems where the BIOS utilizes the first
64K of physical memory during suspend/resume and other hardware events.

Currently we reserve this memory on all AMI and Phoenix BIOS systems.
Life is too short to hunt subtle memory corruption problems like this,
so we try to be robust by default.

Still, allow this to be overriden: allow users who want that first 64K
of memory to be available to the kernel disable the quirk, via
CONFIG_X86_RESERVE_LOW_64K=n.

Also, allow the early reservation to overlap with other
early reservations.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
arch/x86/Kconfig
arch/x86/kernel/setup.c

index ed92864d1325c09092f3e8ed4918f26341f23161..552d2b7a344c0a99f60824f54a2f593d2bb9f68c 100644 (file)
@@ -1059,6 +1059,26 @@ config HIGHPTE
          low memory.  Setting this option will put user-space page table
          entries in high memory.
 
+config X86_RESERVE_LOW_64K
+        bool "Reserve low 64K of RAM on AMI/Phoenix BIOSen"
+       default y
+       help
+        Reserve the first 64K of physical RAM on BIOSes that are known
+        to potentially corrupt that memory range. A numbers of BIOSes are
+        known to utilize this area during suspend/resume, so it must not
+        be used by the kernel.
+
+        Set this to N if you are absolutely sure that you trust the BIOS
+        to get all its memory reservations and usages right.
+
+        If you have doubts about the BIOS (e.g. suspend/resume does not
+        work or there's kernel crashes after certain hardware hotplug
+        events) and it's not AMI or Phoenix, then you might want to enable
+        X86_CHECK_BIOS_CORRUPTION=y to allow the kernel to check typical
+        corruption patterns.
+
+        Say Y if unsure.
+
 config MATH_EMULATION
        bool
        prompt "Math emulation" if X86_32
index b925428e2d1ad413ccbca9be0f5bd429dd27110f..55e98a37da0a5d3fe9eae977f04769dd0accdd84 100644 (file)
@@ -584,13 +584,14 @@ static int __init dmi_low_memory_corruption(const struct dmi_system_id *d)
                "%s detected: BIOS may corrupt low RAM, working it around.\n",
                d->ident);
 
-       reserve_early(0x0, 0x10000, "BIOS quirk");
+       reserve_early_overlap_ok(0x0, 0x10000, "BIOS quirk");
 
        return 0;
 }
 
 /* List of systems that have known low memory corruption BIOS problems */
 static struct dmi_system_id __initdata bad_bios_dmi_table[] = {
+#ifdef CONFIG_X86_RESERVE_LOW_64K
        {
                .callback = dmi_low_memory_corruption,
                .ident = "AMI BIOS",
@@ -606,6 +607,7 @@ static struct dmi_system_id __initdata bad_bios_dmi_table[] = {
                },
        },
        {}
+#endif
 };
 
 /*