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);
Arthur Heymans has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47296 )
Change subject: nb/intel/xeon_sp: Use a common function to get the IIO HOB ......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/c/coreboot/+/47296/1//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/47296/1//COMMIT_MSG@7 PS1, Line 7: nb soc
Marc Jones has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47296 )
Change subject: nb/intel/xeon_sp: Use a common function to get the IIO HOB ......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/c/coreboot/+/47296/1/src/soc/intel/xeon_sp/skx/s... File src/soc/intel/xeon_sp/skx/soc_util.c:
https://review.coreboot.org/c/coreboot/+/47296/1/src/soc/intel/xeon_sp/skx/s... PS1, Line 298: hob = fsp_find_extension_hob_by_guid( : fsp_hob_iio_universal_data_guid, &hob_size); : assert(hob != NULL && hob_size != 0); : Missed this one.
Hello Marc Jones, build bot (Jenkins), Jonathan Zhang, Patrick Rudolph,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/47296
to look at the new patch set (#2).
Change subject: soc/intel/xeon_sp: Use a common function to get the IIO HOB ......................................................................
soc/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, 5 insertions(+), 28 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/96/47296/2
Marc Jones has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47296 )
Change subject: soc/intel/xeon_sp: Use a common function to get the IIO HOB ......................................................................
Patch Set 2: Code-Review+2
Hello build bot (Jenkins), Marc Jones, Jonathan Zhang, Patrick Rudolph,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/47296
to look at the new patch set (#3).
Change subject: soc/intel/xeon_sp: Use a common function to get the IIO HOB ......................................................................
soc/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(+), 28 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/96/47296/3
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47296 )
Change subject: soc/intel/xeon_sp: Use a common function to get the IIO HOB ......................................................................
Patch Set 3: Code-Review+2
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47296 )
Change subject: soc/intel/xeon_sp: Use a common function to get the IIO HOB ......................................................................
Patch Set 3:
(2 comments)
https://review.coreboot.org/c/coreboot/+/47296/1//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/47296/1//COMMIT_MSG@7 PS1, Line 7: nb
soc
Done
https://review.coreboot.org/c/coreboot/+/47296/1/src/soc/intel/xeon_sp/skx/s... File src/soc/intel/xeon_sp/skx/soc_util.c:
https://review.coreboot.org/c/coreboot/+/47296/1/src/soc/intel/xeon_sp/skx/s... PS1, Line 298: hob = fsp_find_extension_hob_by_guid( : fsp_hob_iio_universal_data_guid, &hob_size); : assert(hob != NULL && hob_size != 0); :
Missed this one.
Done
Patrick Georgi has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47296 )
Change subject: soc/intel/xeon_sp: Use a common function to get the IIO HOB ......................................................................
Patch Set 3:
needs manual rebase
Hello build bot (Jenkins), Marc Jones, Jonathan Zhang, Angel Pons, Patrick Rudolph,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/47296
to look at the new patch set (#4).
Change subject: soc/intel/xeon_sp: Use a common function to get the IIO HOB ......................................................................
soc/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, 7 insertions(+), 32 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/96/47296/4
Arthur Heymans has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47296 )
Change subject: soc/intel/xeon_sp: Use a common function to get the IIO HOB ......................................................................
Patch Set 4:
Patch Set 3:
needs manual rebase
done
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47296 )
Change subject: soc/intel/xeon_sp: Use a common function to get the IIO HOB ......................................................................
Patch Set 4: Code-Review+2
Arthur Heymans has submitted this change. ( https://review.coreboot.org/c/coreboot/+/47296 )
Change subject: soc/intel/xeon_sp: Use a common function to get the IIO HOB ......................................................................
soc/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 Reviewed-on: https://review.coreboot.org/c/coreboot/+/47296 Reviewed-by: Angel Pons th3fanbus@gmail.com Tested-by: build bot (Jenkins) no-reply@coreboot.org --- 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, 7 insertions(+), 32 deletions(-)
Approvals: build bot (Jenkins): Verified Angel Pons: Looks good to me, approved
diff --git a/src/soc/intel/xeon_sp/cpx/soc_util.c b/src/soc/intel/xeon_sp/cpx/soc_util.c index 973d258..d2d12d1 100644 --- a/src/soc/intel/xeon_sp/cpx/soc_util.c +++ b/src/soc/intel/xeon_sp/cpx/soc_util.c @@ -29,13 +29,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 4a29c08..55c3d82 100644 --- a/src/soc/intel/xeon_sp/nb_acpi.c +++ b/src/soc/intel/xeon_sp/nb_acpi.c @@ -362,10 +362,7 @@
static unsigned long acpi_create_rhsa(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();
for (int socket = 0; socket < hob->PlatformData.numofIIO; ++socket) { IIO_RESOURCE_INSTANCE iio_resource = @@ -386,10 +383,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 95563f5..3ac46ff 100644 --- a/src/soc/intel/xeon_sp/skx/soc_acpi.c +++ b/src/soc/intel/xeon_sp/skx/soc_acpi.c @@ -17,6 +17,7 @@ #include <soc/pci_devs.h> #include <soc/pm.h> #include <soc/soc_util.h> +#include <soc/util.h>
/* TODO: Check if the common/acpi weak function can be used */ unsigned long acpi_fill_mcfg(unsigned long current) @@ -99,10 +100,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 469fd60..af6dfcc3 100644 --- a/src/soc/intel/xeon_sp/skx/soc_util.c +++ b/src/soc/intel/xeon_sp/skx/soc_util.c @@ -57,13 +57,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; @@ -83,15 +77,10 @@
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]; }