diff options
author | Pierre-Alexandre Meyer <pierre@mouraf.org> | 2009-05-02 20:37:58 -0700 |
---|---|---|
committer | Pierre-Alexandre Meyer <pierre@mouraf.org> | 2009-05-02 20:37:58 -0700 |
commit | c8162edd3e880e8f0d84f26ffbf5316dee472ef0 (patch) | |
tree | 922f5828dcbf8cdb0d508b3e0bfdbb5ed24e70e7 /com32/gpllib/memory.c | |
parent | f64daac1ca99a8c49dbe18bb38398d55f15ab504 (diff) | |
download | syslinux-c8162edd3e880e8f0d84f26ffbf5316dee472ef0.tar.gz |
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 <pierre@mouraf.org>
Diffstat (limited to 'com32/gpllib/memory.c')
-rw-r--r-- | com32/gpllib/memory.c | 13 |
1 files changed, 7 insertions, 6 deletions
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++; |