Work around (ignore) broken SRAT tables

Instead of panicking when parsing an invalid ACPI SRAT table,
just ignore it, effectively disabling NUMA.

https://lists.freebsd.org/pipermail/freebsd-current/2016-May/060984.html

Reported and tested by:	 Bill O'Hanlon (bill.ohanlon at gmail.com)
Reviewed by:	jhb
MFC after:	1 week
Relnotes:	If dmesg shows "SRAT: Duplicate local APIC ID",
                try updating your BIOS to fix NUMA support.
Sponsored by:	Dell Inc.
This commit is contained in:
Eric van Gyzen 2016-05-03 20:14:04 +00:00
parent e402d55c84
commit 2db0699d88

View File

@ -201,8 +201,12 @@ srat_parse_entry(ACPI_SUBTABLE_HEADER *entry, void *arg)
"enabled" : "disabled");
if (!(cpu->Flags & ACPI_SRAT_CPU_ENABLED))
break;
KASSERT(!cpus[cpu->ApicId].enabled,
("Duplicate local APIC ID %u", cpu->ApicId));
if (cpus[cpu->ApicId].enabled) {
printf("SRAT: Duplicate local APIC ID %u\n",
cpu->ApicId);
*(int *)arg = ENXIO;
break;
}
cpus[cpu->ApicId].domain = domain;
cpus[cpu->ApicId].enabled = 1;
break;