Attention is currently required from: Tarun Tuli, Subrata Banik.
Arthur Heymans has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/69510 )
Change subject: soc/intel/alderlake/acpi.c: Don't look up coreboot CPU index ......................................................................
soc/intel/alderlake/acpi.c: Don't look up coreboot CPU index
The coreboot CPU index for a lapic is arbitrary: it depends on which CPU obtains a spinlock first. Simply using an increasing index will result in consistent ACPI tables across each boot.
Change-Id: Iaaaef213b32b33e3ec9f4874d576896c2335211c Signed-off-by: Arthur Heymans arthur@aheymans.xyz --- M src/soc/intel/alderlake/acpi.c 1 file changed, 16 insertions(+), 9 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/10/69510/1
diff --git a/src/soc/intel/alderlake/acpi.c b/src/soc/intel/alderlake/acpi.c index 1c820c2..a7c115c 100644 --- a/src/soc/intel/alderlake/acpi.c +++ b/src/soc/intel/alderlake/acpi.c @@ -287,6 +287,7 @@ acpigen_write_package(3); { char path[32] = { 0 }; + static size_t cpu_index; /* Emit the device path */ switch (dev->path.type) { case DEVICE_PATH_PCI: @@ -294,15 +295,7 @@ break;
case DEVICE_PATH_APIC: - /* Lookup CPU id */ - for (size_t i = 0; i < CONFIG_MAX_CPUS; i++) { - if (cpu_get_apic_id(i) == dev->path.apic.apic_id) { - snprintf(path, sizeof(path), - CONFIG_ACPI_CPU_STRING, i); - break; - } - } - + snprintf(path, sizeof(path), CONFIG_ACPI_CPU_STRING, cpu_index++); acpigen_emit_namestring(path); break;