1
0
Fork 0

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>
hifive-unleashed-5.1
H. Peter Anvin 2009-04-01 11:35:00 -07:00
parent c549e71d07
commit cd670599b7
1 changed files with 6 additions and 0 deletions

View File

@ -31,6 +31,12 @@ static int detect_memory_e820(void)
struct e820entry *desc = boot_params.e820_map;
static struct e820_ext_entry buf; /* static so it is zeroed */
/*
* Set this here so that if the BIOS doesn't change this field
* but still doesn't change %ecx, we're still okay...
*/
buf.ext_flags = 1;
do {
size = sizeof buf;