Attention is currently required from: Anjaneya "Reddy" Chagam, Jonathan Zhang, Johnny Lin, Christian Walter, Arthur Heymans, Patrick Rudolph, Tim Chu. Hello Arthur Heymans,
I'd like you to do a code review. Please visit
https://review.coreboot.org/c/coreboot/+/59396
to review the following change.
Change subject: soc/intel/xeon_sp: Use BusLimit during PCI bus allocation ......................................................................
soc/intel/xeon_sp: Use BusLimit during PCI bus allocation
When probing PCI buses use the stack buslimit instead of 0xff. This could avoid overflowing bus numbers into the next stack.
Change-Id: I5f698e3ddb73282d2351cde24091085cd02b9d97 Signed-off-by: Arthur Heymans arthur@aheymans.xyz --- M src/soc/intel/xeon_sp/chip_common.c 1 file changed, 5 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/96/59396/1
diff --git a/src/soc/intel/xeon_sp/chip_common.c b/src/soc/intel/xeon_sp/chip_common.c index 47d8f5c..a38aae7 100644 --- a/src/soc/intel/xeon_sp/chip_common.c +++ b/src/soc/intel/xeon_sp/chip_common.c @@ -497,8 +497,11 @@ get_iiostack_info(&stack_info); for (int s = 0; s < stack_info.no_of_stacks; ++s) { /* only non zero bus no. needs to be enumerated */ - if (stack_info.res[s].BusBase == 0) + if (stack_info.res[s].BusBase == 0) { + /* Update BUS 0 BusLimit */ + dev->link_list->max_subordinate = stack_info.res[s]. BusLimit; continue; + }
iiostack_bus = malloc(sizeof(struct bus)); if (iiostack_bus == NULL) @@ -507,6 +510,7 @@ memcpy(iiostack_bus, dev->bus, sizeof(*iiostack_bus)); iiostack_bus->secondary = stack_info.res[s].BusBase; iiostack_bus->subordinate = stack_info.res[s].BusBase; + iiostack_bus->max_subordinate = stack_info.res[s].BusLimit; iiostack_bus->dev = NULL; iiostack_bus->children = NULL; iiostack_bus->next = NULL;