Attention is currently required from: Arthur Heymans, Jérémy Compostella, Subrata Banik, Sukumar Ghorai, sridhar siricilla.
Hello Arthur Heymans, Subrata Banik, Sukumar Ghorai, build bot (Jenkins), sridhar siricilla,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/77615?usp=email
to look at the new patch set (#6).
Change subject: soc/intel/common: Fix invalid MADT entries ......................................................................
soc/intel/common: Fix invalid MADT entries
commit b793aa3bca5a3f8a6c4ef5a28925a1aeebf426c8 ("soc/intel/common: Order the CPUs based on their APIC IDs") sort algorithnm walks all the `cpu_info' entries without discarding empty ones. Since `cpu_info' is not initialized, the data that is used is undefined and it generally results in the creation of invalid `Local x2APIC' entries in the MADT ("APIC") ACPI table.
Depending on the X2APIC ID value the Linux kernel behavior changes (cf. arch/x86/kernel/acpi/boot.c::acpi_register_lapic()): 1. If (int)ID >= MAX_LOCAL_APIC (32768), the Linux kernel discards the entry with the "skipped apicid that is too big" INFO level message. 2. If (int)ID < MAX_LOCAL_APIC (32768) (including negative) this data is taken into account and it can lead to undesirable behavior such as core being disabled as (cf. "native_cpu_up: bad cpu" ERROR kernel message).
TEST=Verified the MADT does not contain any invalid entry on rex.
Change-Id: I19c7aa51f232bf48201bd6d28f108e9120a21f7e Signed-off-by: Jeremy Compostella jeremy.compostella@intel.com --- M src/arch/x86/cpu.c M src/soc/intel/common/block/acpi/cpu_hybrid.c 2 files changed, 3 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/15/77615/6