Replace CONFIG_EXTRA_PCI_ROOTS with dynamic "etc/extra-pci-roots" file.
authorKevin O'Connor <kevin@koconnor.net>
Wed, 6 Jul 2011 00:40:11 +0000 (20:40 -0400)
committerKevin O'Connor <kevin@koconnor.net>
Wed, 6 Jul 2011 00:40:11 +0000 (20:40 -0400)
src/Kconfig
src/paravirt.h
src/pci.c

index 0ffc49e5338e1f3fab71caf33309d032a1f4cf31..e732528fb5db8239928959d4f0f40ffb38a94baf 100644 (file)
@@ -194,17 +194,6 @@ menu "Hardware support"
         help
             Support parallel ports. This also enables int 17 parallel port calls.
 
-    config EXTRA_PCI_ROOTS
-        int "Number of extra root buses"
-        default 0
-        help
-            If the target machine has multiple independent root buses
-            set this to a positive value.  The SeaBIOS PCI probe will
-            then search for the given number of extra root buses.
-
-            Most machines do not have multiple root buses and this
-            setting should be zero.
-
     config USE_SMM
         depends on !COREBOOT
         bool "System Management Mode (SMM)"
index 83166f498a75c61027497104d76af2338589d3b3..4a370a0cb2b738076fda3ab5facdb49e20cd0369 100644 (file)
@@ -1,6 +1,7 @@
 #ifndef __PV_H
 #define __PV_H
 
+#include "config.h" // CONFIG_COREBOOT
 #include "util.h"
 
 /* This CPUID returns the signature 'KVMKVMKVM' in ebx, ecx, and edx.  It
index 23a6878a6440fb613c942ca2e2d51715cdbc8da6..49698ac58b8d0a7481007d9e42021d9c4336155b 100644 (file)
--- a/src/pci.c
+++ b/src/pci.c
@@ -8,8 +8,8 @@
 #include "pci.h" // pci_config_writel
 #include "ioport.h" // outl
 #include "util.h" // dprintf
-#include "config.h" // CONFIG_*
-#include "farptr.h" // CONFIG_*
+#include "paravirt.h" // romfile_loadint
+#include "farptr.h" // MAKE_FLATPTR
 #include "pci_regs.h" // PCI_VENDOR_ID
 #include "pci_ids.h" // PCI_CLASS_DISPLAY_VGA
 
@@ -96,9 +96,9 @@ pci_probe(void)
     struct pci_device *busdevs[256];
     memset(busdevs, 0, sizeof(busdevs));
     struct pci_device **pprev = &PCIDevices;
+    int extraroots = romfile_loadint("etc/extra-pci-roots", 0);
     int bus = -1, lastbus = 0, rootbuses = 0, count=0;
-    while (bus < 0xff && (bus < MaxPCIBus
-                          || rootbuses < CONFIG_EXTRA_PCI_ROOTS)) {
+    while (bus < 0xff && (bus < MaxPCIBus || rootbuses < extraroots)) {
         bus++;
         int bdf;
         foreachbdf(bdf, bus) {