diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-09-16 04:07:34 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-09-16 06:16:07 -0400 |
commit | fc38151947477596aa27df6c4306ad6008dc6711 (patch) | |
tree | 7af88aec9e88b763e3e9fdb7914884788f74f6b7 | |
parent | 1e22436eba84edfec9c25e5a25d09062c4f91ca9 (diff) |
x86: add X86_RESERVE_LOW_64K
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>
-rw-r--r-- | arch/x86/Kconfig | 20 | ||||
-rw-r--r-- | arch/x86/kernel/setup.c | 4 |
2 files changed, 23 insertions, 1 deletions
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 7820d447bb8d..633f25dd9ee2 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig | |||
@@ -1089,6 +1089,26 @@ config X86_BOOTPARAM_MEMORY_CORRUPTION_CHECK | |||
1089 | Set whether the default state of memory_corruption_check is | 1089 | Set whether the default state of memory_corruption_check is |
1090 | on or off. | 1090 | on or off. |
1091 | 1091 | ||
1092 | config X86_RESERVE_LOW_64K | ||
1093 | bool "Reserve low 64K of RAM on AMI/Phoenix BIOSen" | ||
1094 | default y | ||
1095 | help | ||
1096 | Reserve the first 64K of physical RAM on BIOSes that are known | ||
1097 | to potentially corrupt that memory range. A numbers of BIOSes are | ||
1098 | known to utilize this area during suspend/resume, so it must not | ||
1099 | be used by the kernel. | ||
1100 | |||
1101 | Set this to N if you are absolutely sure that you trust the BIOS | ||
1102 | to get all its memory reservations and usages right. | ||
1103 | |||
1104 | If you have doubts about the BIOS (e.g. suspend/resume does not | ||
1105 | work or there's kernel crashes after certain hardware hotplug | ||
1106 | events) and it's not AMI or Phoenix, then you might want to enable | ||
1107 | X86_CHECK_BIOS_CORRUPTION=y to allow the kernel to check typical | ||
1108 | corruption patterns. | ||
1109 | |||
1110 | Say Y if unsure. | ||
1111 | |||
1092 | config MATH_EMULATION | 1112 | config MATH_EMULATION |
1093 | bool | 1113 | bool |
1094 | prompt "Math emulation" if X86_32 | 1114 | prompt "Math emulation" if X86_32 |
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c index 33719544a224..786c1886ae53 100644 --- a/arch/x86/kernel/setup.c +++ b/arch/x86/kernel/setup.c | |||
@@ -735,13 +735,14 @@ static int __init dmi_low_memory_corruption(const struct dmi_system_id *d) | |||
735 | "%s detected: BIOS may corrupt low RAM, working it around.\n", | 735 | "%s detected: BIOS may corrupt low RAM, working it around.\n", |
736 | d->ident); | 736 | d->ident); |
737 | 737 | ||
738 | reserve_early(0x0, 0x10000, "BIOS quirk"); | 738 | reserve_early_overlap_ok(0x0, 0x10000, "BIOS quirk"); |
739 | 739 | ||
740 | return 0; | 740 | return 0; |
741 | } | 741 | } |
742 | 742 | ||
743 | /* List of systems that have known low memory corruption BIOS problems */ | 743 | /* List of systems that have known low memory corruption BIOS problems */ |
744 | static struct dmi_system_id __initdata bad_bios_dmi_table[] = { | 744 | static struct dmi_system_id __initdata bad_bios_dmi_table[] = { |
745 | #ifdef CONFIG_X86_RESERVE_LOW_64K | ||
745 | { | 746 | { |
746 | .callback = dmi_low_memory_corruption, | 747 | .callback = dmi_low_memory_corruption, |
747 | .ident = "AMI BIOS", | 748 | .ident = "AMI BIOS", |
@@ -757,6 +758,7 @@ static struct dmi_system_id __initdata bad_bios_dmi_table[] = { | |||
757 | }, | 758 | }, |
758 | }, | 759 | }, |
759 | {} | 760 | {} |
761 | #endif | ||
760 | }; | 762 | }; |
761 | 763 | ||
762 | /* | 764 | /* |