[XS] Change in coreboot[master]: soc/intel/common: Fix invalid MADT entries creation

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 (#5). Change subject: soc/intel/common: Fix invalid MADT entries creation ...................................................................... soc/intel/common: Fix invalid MADT entries creation 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/5 -- To view, visit https://review.coreboot.org/c/coreboot/+/77615?usp=email To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings Gerrit-Project: coreboot Gerrit-Branch: master Gerrit-Change-Id: I19c7aa51f232bf48201bd6d28f108e9120a21f7e Gerrit-Change-Number: 77615 Gerrit-PatchSet: 5 Gerrit-Owner: Jérémy Compostella <jeremy.compostella@intel.com> Gerrit-Reviewer: Arthur Heymans <arthur@aheymans.xyz> Gerrit-Reviewer: Subrata Banik <subratabanik@google.com> Gerrit-Reviewer: Sukumar Ghorai <sukumar.ghorai@intel.com> Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org> Gerrit-Reviewer: sridhar siricilla <sridhar.siricilla@intel.com> Gerrit-Attention: Subrata Banik <subratabanik@google.com> Gerrit-Attention: Jérémy Compostella <jeremy.compostella@intel.com> Gerrit-Attention: sridhar siricilla <sridhar.siricilla@intel.com> Gerrit-Attention: Arthur Heymans <arthur@aheymans.xyz> Gerrit-Attention: Sukumar Ghorai <sukumar.ghorai@intel.com> Gerrit-MessageType: newpatchset
participants (1)
-
Jérémy Compostella (Code Review)