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> Reviewed-on: https://review.coreboot.org/c/coreboot/+/69510 Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-by: Werner Zeh <werner.zeh@siemens.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
39f5042d9e
commit
aab91213b2
|
@ -279,6 +279,7 @@ void soc_lpi_get_constraints(void *unused)
|
||||||
acpigen_emit_byte(RETURN_OP);
|
acpigen_emit_byte(RETURN_OP);
|
||||||
acpigen_write_package(num_entries);
|
acpigen_write_package(num_entries);
|
||||||
|
|
||||||
|
size_t cpu_index = 0;
|
||||||
for (dev = all_devices; dev; dev = dev->next) {
|
for (dev = all_devices; dev; dev = dev->next) {
|
||||||
min_sleep_state = get_min_sleep_state(dev);
|
min_sleep_state = get_min_sleep_state(dev);
|
||||||
if (min_sleep_state == NONE)
|
if (min_sleep_state == NONE)
|
||||||
|
@ -294,15 +295,8 @@ void soc_lpi_get_constraints(void *unused)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DEVICE_PATH_APIC:
|
case DEVICE_PATH_APIC:
|
||||||
/* Lookup CPU id */
|
snprintf(path, sizeof(path), CONFIG_ACPI_CPU_STRING,
|
||||||
for (size_t i = 0; i < CONFIG_MAX_CPUS; i++) {
|
cpu_index++);
|
||||||
if (cpu_get_apic_id(i) == dev->path.apic.apic_id) {
|
|
||||||
snprintf(path, sizeof(path),
|
|
||||||
CONFIG_ACPI_CPU_STRING, i);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
acpigen_emit_namestring(path);
|
acpigen_emit_namestring(path);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue