From 08ef4f10c76db862e1bc65f4164c4de941b38160 Mon Sep 17 00:00:00 2001 From: Jonathan Zhang Date: Fri, 12 Jun 2020 15:31:51 -0700 Subject: soc/intel/xeon_sp/cpx: consider stack personality Each IIO stack has a personality. Only when personality of a stack is TYPE_UBOX_IIO, the stack has PCIe devices. For example, for CPX-SP, the stack 3 has personality of TYPE_UBOX, it does not have PCIe devices. Signed-off-by: Jonathan Zhang Signed-off-by: Reddy Chagam Change-Id: I2f6bfdac4d1110dd95f1b3a72e2e51f70c79212b Reviewed-on: https://review.coreboot.org/c/coreboot/+/42333 Reviewed-by: Angel Pons Reviewed-by: Philipp Deppenwiese Tested-by: build bot (Jenkins) --- src/soc/intel/xeon_sp/cpx/soc_util.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/soc/intel/xeon_sp/cpx') diff --git a/src/soc/intel/xeon_sp/cpx/soc_util.c b/src/soc/intel/xeon_sp/cpx/soc_util.c index 6919fc21aa..f7cebb55f0 100644 --- a/src/soc/intel/xeon_sp/cpx/soc_util.c +++ b/src/soc/intel/xeon_sp/cpx/soc_util.c @@ -173,11 +173,10 @@ uint8_t get_iiostack_info(struct iiostack_resource *info) for (int s = 0; s < hob->PlatformData.numofIIO; ++s) { for (int x = 0; x < MAX_IIO_STACK; ++x) { const STACK_RES *ri = &hob->PlatformData.IIO_resource[s].StackRes[x]; - // TODO: do we have situation with only bux 0 and one stack? - if (ri->BusBase >= ri->BusLimit) - continue; - assert(info->no_of_stacks < (CONFIG_MAX_SOCKET * MAX_IIO_STACK)); - memcpy(&info->res[info->no_of_stacks++], ri, sizeof(STACK_RES)); + if (ri->Personality == TYPE_UBOX_IIO) { + assert(info->no_of_stacks < ARRAY_SIZE(info->res)); + memcpy(&info->res[info->no_of_stacks++], ri, sizeof(STACK_RES)); + } } } -- cgit v1.2.3