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>
This commit is contained in:
Jonathan Zhang 2020-06-12 15:31:51 -07:00 committed by Patrick Georgi
parent 7ba0e99127
commit 08ef4f10c7
1 changed files with 4 additions and 5 deletions

View File

@ -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));
}
}
}