From b95d427f7aa52dce5fdafda93742955aa6c3d2f7 Mon Sep 17 00:00:00 2001 From: Felix Held Date: Fri, 4 Nov 2022 00:46:17 +0100 Subject: Revert "cpu/x86/mp_init.c: Set a bogus initial lapic_id" This reverts commit 1bb9786da30e ("cpu/x86/mp_init.c: Set a bogus initial lapic_id"), since it breaks MP init on amd/mandolin: [INFO ] CPU #0 initialized [INFO ] Initializing CPU #3 [INFO ] Initializing CPU #1 [INFO ] Initializing CPU #2 [EMERG] CPU: missing CPU device structureCPU: vendor AMD device 810f81 [DEBUG] CPU: family 17, model 18, stepping 01 [DEBUG] microcode: patch id to apply = 0x08108109 [INFO ] microcode: being updated to patch id = 0x08108109 succeeded [INFO ] CPU #1 initialized [ERROR] MP record 3 timeout. [INFO ] bsp_do_flight_plan done after 1206 msecs. [ERROR] MP initialization failure. [EMERG] mp_init_with_smm failed. Halting. TEST=The board boots again with the revert applied Signed-off-by: Felix Held Change-Id: Ic1cae88f7345f9ff79e8f6e574521095b57c8cb7 Reviewed-on: https://review.coreboot.org/c/coreboot/+/69186 Reviewed-by: Jason Glenesk Reviewed-by: Martin Roth Reviewed-by: Fred Reitberger Tested-by: build bot (Jenkins) Reviewed-by: Angel Pons --- src/cpu/x86/mp_init.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/cpu/x86/mp_init.c b/src/cpu/x86/mp_init.c index fa19104b531e..febc30b9deee 100644 --- a/src/cpu/x86/mp_init.c +++ b/src/cpu/x86/mp_init.c @@ -375,11 +375,9 @@ static int allocate_cpu_devices(struct bus *cpu_bus, struct mp_params *p) /* Build the CPU device path */ cpu_path.type = DEVICE_PATH_APIC; - /* - * Set a bogus apic_id. - * AP will set its own APIC id in the ap_init() path above. - */ - cpu_path.apic.apic_id = UINT32_MAX; + /* Assuming linear APIC space allocation. AP will set its own + APIC id in the ap_init() path above. */ + cpu_path.apic.apic_id = info->cpu->path.apic.apic_id + i; /* Allocate the new CPU device structure */ new = alloc_find_dev(cpu_bus, &cpu_path); -- cgit v1.2.3