]> 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>
Thu, 12 Mar 2015 07:17:15 +0000 (08:17 +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>
(cherry picked from commit 5cc7eece39721f20b417770374a4112c454be801)

src/fw/pciinit.c

index 3e6308a5ba0c7973287f445d54fb73fbcac26156..43c6e2f73f071cb92e4c92387fecd39124bb894f 100644 (file)
@@ -490,8 +490,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);
+        }
+    }
 }