From a63ea89c0418e7350b3473132a4397ec5065faa8 Mon Sep 17 00:00:00 2001 From: Jonathan Zhang Date: Wed, 25 Jan 2023 11:16:58 -0800 Subject: [PATCH] soc/intel/xeon_sp/chip_common.c: check SOC_INTEL_PCIE_64BIT_ALLOC Some FSPs (such as SPR-SP FSP) support SOC_INTEL_PCIE_64BIT_ALLOC. In such case, is_pci64bit_alloc() return 1. Change-Id: Ic33967255baf4675cd72e0db32ef3fb7f5658296 Signed-off-by: Jonathan Zhang Signed-off-by: Johnny Lin Reviewed-on: https://review.coreboot.org/c/coreboot/+/72441 Reviewed-by: Jonathan Zhang Tested-by: build bot (Jenkins) --- src/soc/intel/xeon_sp/chip_common.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/soc/intel/xeon_sp/chip_common.c b/src/soc/intel/xeon_sp/chip_common.c index 0cddec1564..a5062fcf80 100644 --- a/src/soc/intel/xeon_sp/chip_common.c +++ b/src/soc/intel/xeon_sp/chip_common.c @@ -403,9 +403,16 @@ static void assign_stack_resources(struct iiostack_resource *stack_list, static uint8_t is_pci64bit_alloc(void) { +/* + * For SPR-SP FSP which supports SOC_INTEL_PCIE_64BITS_ALLOC, + * Pci64BitResourceAllocation field does not exist in IIO_UDS HOB. + */ +#if CONFIG(SOC_INTEL_PCIE_64BIT_ALLOC) + return 1; +#else const IIO_UDS *hob = get_iio_uds(); - return hob->PlatformData.Pci64BitResourceAllocation; +#endif } static void xeonsp_pci_domain_read_resources(struct device *dev)