Attention is currently required from: Arthur Heymans, Christian Walter, Johnny Lin, Tim Chu.
Patrick Rudolph has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/76556?usp=email )
Change subject: soc/intel/xeon_sp: Introduce soc_cpu_is_enabled ......................................................................
soc/intel/xeon_sp: Introduce soc_cpu_is_enabled
Add a function to check if the CPU placed the specified socket was found usable during QPI init. This is useful for multi-socket platforms were a CPU is missing or has been disabled due to an error.
Change-Id: I135968fcc905928b9bc6511e3ddbd7d12bad0096 Signed-off-by: Patrick Rudolph patrick.rudolph@9elements.com --- M src/soc/intel/xeon_sp/include/soc/util.h M src/soc/intel/xeon_sp/spr/soc_acpi.c M src/soc/intel/xeon_sp/util.c 3 files changed, 14 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/56/76556/1
diff --git a/src/soc/intel/xeon_sp/include/soc/util.h b/src/soc/intel/xeon_sp/include/soc/util.h index a828ffc..8e80c64 100644 --- a/src/soc/intel/xeon_sp/include/soc/util.h +++ b/src/soc/intel/xeon_sp/include/soc/util.h @@ -13,6 +13,7 @@ int get_platform_thread_count(void); const IIO_UDS *get_iio_uds(void); unsigned int soc_get_num_cpus(void); +bool soc_cpu_is_enabled(const size_t idx); void set_bios_init_completion(void); uint8_t soc_get_iio_ioapicid(int socket, int stack);
diff --git a/src/soc/intel/xeon_sp/spr/soc_acpi.c b/src/soc/intel/xeon_sp/spr/soc_acpi.c index 5340b7b..2e77de2 100644 --- a/src/soc/intel/xeon_sp/spr/soc_acpi.c +++ b/src/soc/intel/xeon_sp/spr/soc_acpi.c @@ -394,7 +394,7 @@ const STACK_RES *ri = &hob->PlatformData.IIO_resource[socket].StackRes[stack];
- stack_enabled = hob->PlatformData.IIO_resource[socket].Valid && + stack_enabled = soc_cpu_is_enabled(socket) && ri->Personality < TYPE_RESERVED;
printk(BIOS_DEBUG, "%s processing socket: %d, stack: %d, type: %d\n", diff --git a/src/soc/intel/xeon_sp/util.c b/src/soc/intel/xeon_sp/util.c index e0bf9bc..f17be63 100644 --- a/src/soc/intel/xeon_sp/util.c +++ b/src/soc/intel/xeon_sp/util.c @@ -118,6 +118,18 @@ } }
+/* + * Returns true if the cpu in the specified socket was found + * during QPI init. + */ +bool soc_cpu_is_enabled(const size_t idx) +{ + const IIO_UDS *hob = get_iio_uds(); + assert (idx < CONFIG_MAX_SOCKET); + + return hob->PlatformData.IIO_resource[idx].Valid; +} + unsigned int soc_get_num_cpus(void) { /* The FSP IIO UDS HOB has field numCpus, it is actually socket count */