cpu/x86/mp_init.c: Set topology on BSP

The BSP might have non-zero lapicid so set the topology accordingly,
without assuming it is 0. This fixes a cpu exception on at least Intel
Meteorlake. This was caused by FSP CPU PPI being giving incorrect
information about the BSP topology.

This problem was introduced by 8b8400a "drivers/fsp2_0/mp_service_ppi:
Use struct device to fill in buffer" which sets the PPI struct based on
struct device.

TESTED on google/rex

Change-Id: I3fae5efa86d8efc474c129b48bdfa1d1e2306acf
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/74374
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Reviewed-by: Tarun Tuli <taruntuli@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Arthur Heymans 2023-04-13 12:20:30 +02:00 committed by Subrata Banik
parent 6f1b7d79b3
commit f4dff389ee
1 changed files with 1 additions and 0 deletions

View File

@ -554,6 +554,7 @@ static enum cb_err init_bsp(struct bus *cpu_bus)
return CB_ERR; return CB_ERR;
} }
bsp->path.apic.initial_lapicid = initial_lapicid(); bsp->path.apic.initial_lapicid = initial_lapicid();
set_cpu_topology_from_leaf_b(bsp);
/* Find the device structure for the boot CPU. */ /* Find the device structure for the boot CPU. */
set_cpu_info(0, bsp); set_cpu_info(0, bsp);