diff options
author | Arthur Heymans <arthur@aheymans.xyz> | 2020-11-06 11:45:41 +0100 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2020-11-09 07:44:59 +0000 |
commit | 12985c1dd78b4a641ea7bd1ff34f1d7d4361d309 (patch) | |
tree | 881993dfd6bd57df310a6ed24e0b85fcffde23cc /src/soc/intel/xeon_sp | |
parent | befec1e92ef3dca5e7e7cf8e5c8c465e22f68ea2 (diff) |
soc/intel/xeon_sp: Look up the IIO_HOB only once
The HOB does not move, place its location in .bss.
Change-Id: I2c6dbe4d64138e45fa1dfe7580ffa70d0441bd88
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47294
Reviewed-by: Marc Jones <marc@marcjonesconsulting.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc/intel/xeon_sp')
-rw-r--r-- | src/soc/intel/xeon_sp/util.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/soc/intel/xeon_sp/util.c b/src/soc/intel/xeon_sp/util.c index feacca497e..75f8a8a10a 100644 --- a/src/soc/intel/xeon_sp/util.c +++ b/src/soc/intel/xeon_sp/util.c @@ -105,9 +105,12 @@ int get_platform_thread_count(void) const IIO_UDS *get_iio_uds(void) { size_t hob_size; - const IIO_UDS *hob; + static const IIO_UDS *hob; const uint8_t fsp_hob_iio_universal_data_guid[16] = FSP_HOB_IIO_UNIVERSAL_DATA_GUID; + if (hob != NULL) + return hob; + hob = fsp_find_extension_hob_by_guid(fsp_hob_iio_universal_data_guid, &hob_size); assert(hob != NULL && hob_size != 0); return hob; |