Patrick Georgi has submitted this change. ( https://review.coreboot.org/c/coreboot/+/42333 )
Change subject: soc/intel/xeon_sp/cpx: consider stack personality ......................................................................
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 jonzhang@fb.com Signed-off-by: Reddy Chagam anjaneya.chagam@intel.com Change-Id: I2f6bfdac4d1110dd95f1b3a72e2e51f70c79212b Reviewed-on: https://review.coreboot.org/c/coreboot/+/42333 Reviewed-by: Angel Pons th3fanbus@gmail.com Reviewed-by: Philipp Deppenwiese zaolin.daisuki@gmail.com Tested-by: build bot (Jenkins) no-reply@coreboot.org --- M src/soc/intel/xeon_sp/cpx/soc_util.c 1 file changed, 4 insertions(+), 5 deletions(-)
Approvals: build bot (Jenkins): Verified Philipp Deppenwiese: Looks good to me, approved 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 6919fc2..f7cebb5 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 @@ 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)); + } } }