diff options
author | Jonathan Zhang <jonzhang@fb.com> | 2020-06-12 15:31:51 -0700 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2020-06-22 12:21:04 +0000 |
commit | 08ef4f10c76db862e1bc65f4164c4de941b38160 (patch) | |
tree | f814dabfec6a6016199f1de4316fc4a8d531c60d | |
parent | 7ba0e9912781f8d650bcef6a362da6575b59d59b (diff) | |
download | coreboot-08ef4f10c76db862e1bc65f4164c4de941b38160.tar.xz |
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>
-rw-r--r-- | src/soc/intel/xeon_sp/cpx/soc_util.c | 9 |
1 files changed, 4 insertions, 5 deletions
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)); + } } } |