summaryrefslogtreecommitdiffstats
path: root/src/cpu/x86/mp_init.c
diff options
context:
space:
mode:
authorArthur Heymans <arthur@aheymans.xyz>2022-11-04 13:03:23 +0100
committerLean Sheng Tan <sheng.tan@9elements.com>2023-04-06 15:27:23 +0000
commit177e13513644b4d3de2529468e827ebfcadbda02 (patch)
tree32e9a7c03d8df3488b121da2ee3c862865cdef0a /src/cpu/x86/mp_init.c
parentddf48eb7c75687398d6a390bc21a50d74aef5df6 (diff)
downloadcoreboot-177e13513644b4d3de2529468e827ebfcadbda02.tar.gz
coreboot-177e13513644b4d3de2529468e827ebfcadbda02.tar.bz2
coreboot-177e13513644b4d3de2529468e827ebfcadbda02.zip
cpu/x86/topology: Add code to fill in topology on struct path
This is needed to generate MADT and SRAT where lapicid for threads need to be added last. When CPUID leaf '0xB' is not present assume some defaults that would result in identical ACPI code generation. Change-Id: I2210eb9b663dd90941a64132aa7154440dc7e5a9 Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/c/coreboot/+/69222 Reviewed-by: Maximilian Brune <maximilian.brune@9elements.com> Reviewed-by: Patrick Rudolph <siro@das-labor.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/cpu/x86/mp_init.c')
-rw-r--r--src/cpu/x86/mp_init.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/cpu/x86/mp_init.c b/src/cpu/x86/mp_init.c
index a5d2ae6caa42..4e92b7595410 100644
--- a/src/cpu/x86/mp_init.c
+++ b/src/cpu/x86/mp_init.c
@@ -13,6 +13,7 @@
#include <cpu/x86/msr.h>
#include <cpu/x86/mtrr.h>
#include <cpu/x86/smm.h>
+#include <cpu/x86/topology.h>
#include <cpu/x86/mp.h>
#include <delay.h>
#include <device/device.h>
@@ -203,6 +204,8 @@ static asmlinkage void ap_init(unsigned int index)
dev->path.apic.initial_lapicid = initial_lapicid();
dev->enabled = 1;
+ set_cpu_topology_from_leaf_b(dev);
+
if (cpu_is_intel())
printk(BIOS_INFO, "AP: slot %u apic_id %x, MCU rev: 0x%08x\n", index,
dev->path.apic.apic_id, get_current_microcode_rev());