aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2009-04-01 14:35:00 -0400
committerH. Peter Anvin <hpa@zytor.com>2009-04-01 14:35:00 -0400
commitcd670599b7b00d9263f6f11a05c0edeb9cbedaf3 (patch)
treee7aa26873f746baa1bd49cd92d3e7ab97c1716af /arch
parentc549e71d073a6e9a4847497344db28a784061455 (diff)
x86, setup: guard against pre-ACPI 3 e820 code not updating %ecx
Impact: BIOS bug safety For pre-ACPI 3 BIOSes, pre-initialize the end of the e820 buffer just in case the BIOS returns an unchanged %ecx but without actually touching the ACPI 3 extended flags field. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/boot/memory.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/x86/boot/memory.c b/arch/x86/boot/memory.c
index d5d2360763dc..5054c2ddd1a0 100644
--- a/arch/x86/boot/memory.c
+++ b/arch/x86/boot/memory.c
@@ -31,6 +31,12 @@ static int detect_memory_e820(void)
31 struct e820entry *desc = boot_params.e820_map; 31 struct e820entry *desc = boot_params.e820_map;
32 static struct e820_ext_entry buf; /* static so it is zeroed */ 32 static struct e820_ext_entry buf; /* static so it is zeroed */
33 33
34 /*
35 * Set this here so that if the BIOS doesn't change this field
36 * but still doesn't change %ecx, we're still okay...
37 */
38 buf.ext_flags = 1;
39
34 do { 40 do {
35 size = sizeof buf; 41 size = sizeof buf;
36 42