From 470f1d38857bfa08aab2991fe5f0080aa7dc2526 Mon Sep 17 00:00:00 2001 From: Arthur Heymans Date: Thu, 31 Aug 2023 18:19:09 +0200 Subject: soc/intel/xeon_sp: Scan and allocate resources on all stacks The code can now deal with stacks that have no resources so just hook them all up. Intel XEON-SP FSP reports all report the state of its stacks, which comprise of PCI root bridges and their respective resources, like PCI busses, IO and MEM resources, via HOB. Parsing all of those into native coreboot structures makes it possible to handle those in a more native fashion like use PCI drivers, native helper functions, ... As opposed parsing those structures again out of the HOB each time. This makes code reuse across the tree more feasible. An additional advantage is that Linux does not need to redo resource allocation since the one done by coreboot will be valid, which potentially decreases boot time. TEST=intel/archercity CRB Signed-off-by: Arthur Heymans Signed-off-by: Shuo Liu Change-Id: Id72c6e4499e99df3b7ca821ab2893cbcc869dbcd Reviewed-on: https://review.coreboot.org/c/coreboot/+/78332 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Rudolph Reviewed-by: Lean Sheng Tan --- src/soc/intel/xeon_sp/skx/soc_util.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'src/soc/intel/xeon_sp/skx') diff --git a/src/soc/intel/xeon_sp/skx/soc_util.c b/src/soc/intel/xeon_sp/skx/soc_util.c index d61d07489f..a5db8fd309 100644 --- a/src/soc/intel/xeon_sp/skx/soc_util.c +++ b/src/soc/intel/xeon_sp/skx/soc_util.c @@ -54,15 +54,9 @@ const struct SystemMemoryMapHob *get_system_memory_map(void) return memmap_addr; } -bool stack_needs_resource_alloc(const STACK_RES *res) -{ - // TODO: do we have situation with only bux 0 and one stack? - return res->BusBase < res->BusLimit; -} - bool is_pcie_iio_stack_res(const STACK_RES *res) { - return stack_needs_resource_alloc(res); + return res->BusBase < res->BusLimit; } uint8_t get_stack_busno(const uint8_t stack) -- cgit v1.2.3