From c8162edd3e880e8f0d84f26ffbf5316dee472ef0 Mon Sep 17 00:00:00 2001 From: Pierre-Alexandre Meyer Date: Sat, 2 May 2009 20:37:58 -0700 Subject: gpllib: Fix ACPI 3.0 quirk (memory) If 24 bytes are returned in the e820 map, the entry should be ignored if bit 0 of the Extended Attributes is clear. Signed-off-by: Pierre-Alexandre Meyer --- com32/gpllib/memory.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'com32/gpllib/memory.c') diff --git a/com32/gpllib/memory.c b/com32/gpllib/memory.c index 969e7230..91e9874e 100644 --- a/com32/gpllib/memory.c +++ b/com32/gpllib/memory.c @@ -82,10 +82,6 @@ void get_type(int type, char *type_ptr, int type_ptr_sz) * chipset-defined address holes which are not in use and motherboard * memory-mapped devices, and all occurrences of the system BIOS as * reserved; standard PC address ranges will not be reported - * - * ACPI 3.0 added the extended flags support. If bit 0 - * in the extended flags is zero, we're supposed to simply - * ignore the entry -- a backwards incompatible change! **/ void detect_memory_e820(struct e820entry *desc, int size_map, int *size_found) { @@ -133,8 +129,13 @@ void detect_memory_e820(struct e820entry *desc, int size_map, int *size_found) memcpy(&buf, __com32.cs_bounce, sizeof buf); - if (oreg.ecx.l < 24) - buf.ext_flags = 1; + /* + * ACPI 3.0 added the extended flags support. If bit 0 + * in the extended flags is zero, we're supposed to simply + * ignore the entry -- a backwards incompatible change! + */ + if (oreg.ecx.l > 20 && !(buf.ext_flags & 1)) + continue; memcpy(&desc[count], &buf, sizeof buf); count++; -- cgit v1.2.1