From ec7ee5581b939232205c8d51ebde517738670874 Mon Sep 17 00:00:00 2001 From: Jeremy Compostella Date: Thu, 12 Dec 2024 13:52:48 -0800 Subject: [PATCH] cpu/x86/topology: Add module_id to CPU topology This commit adds a module_id field to the cpu_topology structure. This field is used to identify the module that a CPU is located on. This information is useful for power management and other purposes. Change-Id: I1c8a76dce48c0539a3f36015674553a2461dec27 Signed-off-by: Jeremy Compostella Reviewed-on: https://review.coreboot.org/c/coreboot/+/85577 Reviewed-by: Subrata Banik Reviewed-by: Frans Hendriks Reviewed-by: Pranava Y N Tested-by: build bot (Jenkins) --- src/cpu/x86/topology.c | 1 + src/include/device/path.h | 1 + 2 files changed, 2 insertions(+) diff --git a/src/cpu/x86/topology.c b/src/cpu/x86/topology.c index b2fd202ed5..58e71fc787 100644 --- a/src/cpu/x86/topology.c +++ b/src/cpu/x86/topology.c @@ -116,6 +116,7 @@ void set_cpu_topology(struct device *cpu) } apic_fields[] = { { LEVEL_TYPE_SMT, &cpu->path.apic.thread_id }, { LEVEL_TYPE_CORE, &cpu->path.apic.core_id }, + { LEVEL_TYPE_MODULE, &cpu->path.apic.module_id }, { LEVEL_TYPE_PACKAGE, &cpu->path.apic.package_id }, { LEVEL_TYPE_PACKAGE, &cpu->path.apic.node_id } }; diff --git a/src/include/device/path.h b/src/include/device/path.h index 8e9ec3bdd5..fdc2f44790 100644 --- a/src/include/device/path.h +++ b/src/include/device/path.h @@ -81,6 +81,7 @@ struct apic_path { unsigned int node_id; unsigned int core_id; unsigned int thread_id; + unsigned int module_id; unsigned char core_type; };