summaryrefslogtreecommitdiff
path: root/src/soc
diff options
context:
space:
mode:
authorPatrick Rudolph <patrick.rudolph@9elements.com>2024-03-25 17:05:05 +0100
committerPatrick Rudolph <patrick.rudolph@9elements.com>2024-04-03 07:35:15 +0000
commit96499840aa3f5376ae8cfa1cefb6fd98800019a9 (patch)
treeaf1f04569226f29193e8c7b308b9cb3307799814 /src/soc
parent9ab5ae76436ee0d20076a4bccbb8c856bf09da1d (diff)
cpu/x86/topology: Add node ID parser
Currently the SRAT table only exposes one proximity group as it uses the LAPIC node_id, which is always initialized to 0. Use CPUID leaf 0x1f or 0xb to gather the node ID and fill it to make sure that at least one proximity group for every socket is advertised. For now the SNC config isn't taken into account. Change-Id: Ia3ed1e5923aa18ca7619b32cde491fdb4da0fa0d Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/81515 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Shuo Liu <shuo.liu@intel.com> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Diffstat (limited to 'src/soc')
-rw-r--r--src/soc/intel/xeon_sp/spr/cpu.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/soc/intel/xeon_sp/spr/cpu.c b/src/soc/intel/xeon_sp/spr/cpu.c
index 2ed8e2290a..f9c8e26273 100644
--- a/src/soc/intel/xeon_sp/spr/cpu.c
+++ b/src/soc/intel/xeon_sp/spr/cpu.c
@@ -14,6 +14,7 @@
#include <cpu/x86/lapic.h>
#include <cpu/x86/mp.h>
#include <cpu/x86/mtrr.h>
+#include <cpu/x86/topology.h>
#include <device/pci_mmio_cfg.h>
#include <intelblocks/cpulib.h>
#include <intelblocks/mp_init.h>
@@ -82,6 +83,10 @@ static void each_cpu_init(struct device *cpu)
__func__, dev_path(cpu), cpu_index(), cpu->path.apic.apic_id,
cpu->path.apic.package_id);
+ /* Populate the node ID. It will be used as proximity ID. */
+ set_cpu_node_id_leaf_1f_b(cpu);
+ assert (cpu->path.apic.node_id < CONFIG_MAX_SOCKET);
+
/*
* Enable PWR_PERF_PLTFRM_OVR and PROCHOT_LOCK.
* The value set by FSP is 20_005f, we set it to 1a_00a4_005b.