]> xenbits.xensource.com Git - seabios.git/commitdiff
fw/pci: scan all buses if extraroots romfile is present
authorMarcel Apfelbaum <marcel.a@redhat.com>
Mon, 16 Feb 2015 17:29:19 +0000 (19:29 +0200)
committerGerd Hoffmann <kraxel@redhat.com>
Fri, 6 Mar 2015 06:50:05 +0000 (07:50 +0100)
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@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
src/fw/pciinit.c

index b1c72c413780d3291aca2c93caac9923896f284a..cc3ef77ca37d60e3c9f4831eb033661b7c74a70e 100644 (file)
@@ -494,8 +494,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);
+        }
+    }
 }