summaryrefslogtreecommitdiff
path: root/payloads
diff options
context:
space:
mode:
Diffstat (limited to 'payloads')
-rw-r--r--payloads/libpayload/arch/x86/sysinfo.c5
-rw-r--r--payloads/libpayload/include/sysinfo.h5
2 files changed, 10 insertions, 0 deletions
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;
}
diff --git a/payloads/libpayload/include/sysinfo.h b/payloads/libpayload/include/sysinfo.h
index fe3d3304c4..a3f61e7ffa 100644
--- a/payloads/libpayload/include/sysinfo.h
+++ b/payloads/libpayload/include/sysinfo.h
@@ -29,6 +29,7 @@
#ifndef _SYSINFO_H
#define _SYSINFO_H
+#include <pci/pci.h>
#include <stdint.h>
/* Maximum number of memory range definitions. */
@@ -130,6 +131,10 @@ struct sysinfo_t {
/* Pointer to FMAP cache in CBMEM */
uintptr_t fmap_cache;
+
+#if CONFIG(LP_PCI)
+ struct pci_access pacc;
+#endif
};
extern struct sysinfo_t lib_sysinfo;