[SeaBIOS] [PATCH V3 1/2] fw/pci: scan all buses if extraroots romfile is present

Marcel Apfelbaum marcel at redhat.com
Mon Feb 16 18:29:19 CET 2015


From: Marcel Apfelbaum <marcel.a at redhat.com>

If there are extra primary root buses, scanning the bus's 0
subtree is not enough. Scan all the range.

Signed-off-by: Marcel Apfelbaum <marcel at redhat.com>
---
 src/fw/pciinit.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/src/fw/pciinit.c b/src/fw/pciinit.c
index fd5dfb9..a5f6505 100644
--- a/src/fw/pciinit.c
+++ b/src/fw/pciinit.c
@@ -499,8 +499,17 @@ pci_bios_init_bus_rec(int bus, u8 *pci_bus)
 static void
 pci_bios_init_bus(void)
 {
+    u8 extraroots = romfile_loadint("etc/extra-pci-roots", 0);
     u8 pci_bus = 0;
+
     pci_bios_init_bus_rec(0 /* host bus */, &pci_bus);
+
+    if (extraroots) {
+        while (pci_bus < 0xff) {
+            pci_bus++;
+            pci_bios_init_bus_rec(pci_bus, &pci_bus);
+        }
+    }
 }
 
 
-- 
2.1.0




More information about the SeaBIOS mailing list