Marc Jones has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/47060 )
Change subject: soc/intel/xeon_sp/acpi: Fix uncore dsdt for multiple cpus ......................................................................
soc/intel/xeon_sp/acpi: Fix uncore dsdt for multiple cpus
Fix the asl to use CONFIG_MAX_CPUS to create entries for multiple cpu uncores. Don't add the RTxx resource entries multiple times. The function is called for each CPUs.
Change-Id: Ia4eb9716ae4bd72fb4eb98649105be629623cbef Signed-off-by: Marc Jones marcjones@sysproconsulting.com --- M src/soc/intel/xeon_sp/acpi/iiostack.asl M src/soc/intel/xeon_sp/cpx/soc_acpi.c M src/soc/intel/xeon_sp/skx/soc_acpi.c 3 files changed, 11 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/60/47060/1
diff --git a/src/soc/intel/xeon_sp/acpi/iiostack.asl b/src/soc/intel/xeon_sp/acpi/iiostack.asl index dca5569..4b2b65b 100644 --- a/src/soc/intel/xeon_sp/acpi/iiostack.asl +++ b/src/soc/intel/xeon_sp/acpi/iiostack.asl @@ -69,7 +69,7 @@ MAKE_IIO_DEV(02, 20) MAKE_IIO_DEV(03, 28)
-#if MAX_SOCKET > 1 +#if (CONFIG_MAX_SOCKET > 1) MAKE_IIO_DEV(06, 40) MAKE_IIO_DEV(07, 50) MAKE_IIO_DEV(08, 60) diff --git a/src/soc/intel/xeon_sp/cpx/soc_acpi.c b/src/soc/intel/xeon_sp/cpx/soc_acpi.c index d60684b..f055913 100644 --- a/src/soc/intel/xeon_sp/cpx/soc_acpi.c +++ b/src/soc/intel/xeon_sp/cpx/soc_acpi.c @@ -60,6 +60,10 @@ { struct iiostack_resource stack_info = {0};
+ /* Only add RTxx entries once. */ + if (dev->bus->secondary != 0) + return; + get_iiostack_info(&stack_info);
acpigen_write_scope("\_SB"); diff --git a/src/soc/intel/xeon_sp/skx/soc_acpi.c b/src/soc/intel/xeon_sp/skx/soc_acpi.c index df2550c..0182b18 100644 --- a/src/soc/intel/xeon_sp/skx/soc_acpi.c +++ b/src/soc/intel/xeon_sp/skx/soc_acpi.c @@ -6,6 +6,7 @@ #include <assert.h> #include <cbmem.h> #include <cpu/intel/turbo.h> +#include <device/device.h> #include <device/mmio.h> #include <device/pci.h> #include <intelblocks/acpi.h> @@ -97,13 +98,17 @@
}
-void uncore_inject_dsdt(const struct device *device) +void uncore_inject_dsdt(const struct device *dev) { size_t hob_size; const uint8_t uds_guid[16] = FSP_HOB_IIO_UNIVERSAL_DATA_GUID; const IIO_UDS *hob = fsp_find_extension_hob_by_guid(uds_guid, &hob_size); assert(hob != NULL && hob_size != 0);
+ /* Only add RTxx entries once. */ + if (dev->bus->secondary != 0) + return; + acpigen_write_scope("\_SB"); for (int socket = 0; socket < hob->PlatformData.numofIIO; ++socket) { IIO_RESOURCE_INSTANCE iio_resource =