From 9e5bc74cc7c2a6ced08163418299cc753b8357f0 Mon Sep 17 00:00:00 2001 From: Felix Singer Date: Tue, 13 Oct 2020 18:05:03 +0200 Subject: libpayload/arch/x86: Introduce pacc pointer in sysinfo_t struct Currently, the PCI bus gets scanned multiple times for various reasons (e.g. to read the device class). Therefore, and in preparation to CB:46416, introduce the pacc pointer in the sysinfo_t struct and scan the PCI bus while gathering system information. Change-Id: I496c5a3d78c7fb5d7c9f119a0c9a0314d54e729f Signed-off-by: Felix Singer Reviewed-on: https://review.coreboot.org/c/coreboot/+/46348 Tested-by: build bot (Jenkins) Reviewed-by: Nico Huber --- payloads/libpayload/arch/x86/sysinfo.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'payloads/libpayload/arch/x86') diff --git a/payloads/libpayload/arch/x86/sysinfo.c b/payloads/libpayload/arch/x86/sysinfo.c index ffa57bb08f..5dd606746f 100644 --- a/payloads/libpayload/arch/x86/sysinfo.c +++ b/payloads/libpayload/arch/x86/sysinfo.c @@ -78,5 +78,10 @@ int lib_get_sysinfo(void) lib_sysinfo.memrange[1].type = CB_MEM_RAM; } +#if CONFIG(LP_PCI) + pci_init(&lib_sysinfo.pacc); + pci_scan_bus(&lib_sysinfo.pacc); +#endif + return ret; } -- cgit v1.2.3