Arthur Heymans has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/47296 )
Change subject: nb/intel/xeon_sp: Use a common function to get the IIO HOB ......................................................................
nb/intel/xeon_sp: Use a common function to get the IIO HOB
TESTED ocp/deltalake still boots.
Change-Id: I69f336c1ff348b8e820340b84494929f2c58ce72 Signed-off-by: Arthur Heymans arthur@aheymans.xyz --- M src/soc/intel/xeon_sp/cpx/soc_util.c M src/soc/intel/xeon_sp/nb_acpi.c M src/soc/intel/xeon_sp/skx/soc_acpi.c M src/soc/intel/xeon_sp/skx/soc_util.c 4 files changed, 6 insertions(+), 29 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/96/47296/1
diff --git a/src/soc/intel/xeon_sp/cpx/soc_util.c b/src/soc/intel/xeon_sp/cpx/soc_util.c index dbaf5d8..1c5a737 100644 --- a/src/soc/intel/xeon_sp/cpx/soc_util.c +++ b/src/soc/intel/xeon_sp/cpx/soc_util.c @@ -165,13 +165,7 @@
uint8_t get_iiostack_info(struct iiostack_resource *info) { - size_t hob_size; - const uint8_t fsp_hob_iio_universal_data_guid[16] = FSP_HOB_IIO_UNIVERSAL_DATA_GUID; - const IIO_UDS *hob; - - hob = fsp_find_extension_hob_by_guid( - fsp_hob_iio_universal_data_guid, &hob_size); - assert(hob != NULL && hob_size != 0); + const IIO_UDS *hob = get_iio_uds();
// copy IIO Stack info from FSP HOB info->no_of_stacks = 0; diff --git a/src/soc/intel/xeon_sp/nb_acpi.c b/src/soc/intel/xeon_sp/nb_acpi.c index cf397f7..de1edc8 100644 --- a/src/soc/intel/xeon_sp/nb_acpi.c +++ b/src/soc/intel/xeon_sp/nb_acpi.c @@ -385,10 +385,7 @@
static unsigned long acpi_fill_dmar(unsigned long current) { - 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); + const IIO_UDS *hob = get_iio_uds();
// DRHD for (int iio = 1; iio <= hob->PlatformData.numofIIO; ++iio) { diff --git a/src/soc/intel/xeon_sp/skx/soc_acpi.c b/src/soc/intel/xeon_sp/skx/soc_acpi.c index b392619..b952cc2 100644 --- a/src/soc/intel/xeon_sp/skx/soc_acpi.c +++ b/src/soc/intel/xeon_sp/skx/soc_acpi.c @@ -99,10 +99,7 @@
void uncore_inject_dsdt(const struct device *device) { - 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); + const IIO_UDS *hob = get_iio_uds();
/* Only add RTxx entries once. */ if (device->bus->secondary != 0) diff --git a/src/soc/intel/xeon_sp/skx/soc_util.c b/src/soc/intel/xeon_sp/skx/soc_util.c index 853846c..6d511ea 100644 --- a/src/soc/intel/xeon_sp/skx/soc_util.c +++ b/src/soc/intel/xeon_sp/skx/soc_util.c @@ -60,15 +60,10 @@
static uint32_t get_socket_stack_busno(uint32_t socket, uint32_t stack) { - size_t hob_size; - const IIO_UDS *hob; - const uint8_t fsp_hob_iio_universal_data_guid[16] = FSP_HOB_IIO_UNIVERSAL_DATA_GUID; + const IIO_UDS *hob = get_iio_uds();
assert(socket < MAX_SOCKET && stack < MAX_IIO_STACK);
- hob = fsp_find_extension_hob_by_guid(fsp_hob_iio_universal_data_guid, &hob_size); - assert(hob != NULL && hob_size != 0); - return hob->PlatformData.CpuQpiInfo[socket].StackBus[stack]; }
@@ -278,13 +273,9 @@
unsigned int soc_get_num_cpus(void) { - size_t hob_size; - const uint8_t fsp_hob_iio_universal_data_guid[16] = FSP_HOB_IIO_UNIVERSAL_DATA_GUID; - const IIO_UDS *hob; + const IIO_UDS *hob = get_iio_uds();
/* these fields are incorrect - need debugging */ - hob = fsp_find_extension_hob_by_guid(fsp_hob_iio_universal_data_guid, &hob_size); - assert(hob != NULL && hob_size != 0); return hob->SystemStatus.numCpus; }
@@ -302,9 +293,7 @@
uint8_t get_iiostack_info(struct iiostack_resource *info) { - size_t hob_size; - const uint8_t fsp_hob_iio_universal_data_guid[16] = FSP_HOB_IIO_UNIVERSAL_DATA_GUID; - const IIO_UDS *hob; + const IIO_UDS *hob = get_iio_uds();
hob = fsp_find_extension_hob_by_guid( fsp_hob_iio_universal_data_guid, &hob_size);