aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2011-07-05 20:40:11 -0400
committerKevin O'Connor <kevin@koconnor.net>2011-07-05 20:40:11 -0400
commitb044e77d531a48302e1b43b739cf4947dbf4f162 (patch)
tree8904d8d37392226b3f36b4cc32ce4a957c0d01f6
parent730230063c4194a1977589bba0beec6bfedb6514 (diff)
downloadseabios-b044e77d531a48302e1b43b739cf4947dbf4f162.tar.gz
Replace CONFIG_EXTRA_PCI_ROOTS with dynamic "etc/extra-pci-roots" file.
-rw-r--r--src/Kconfig11
-rw-r--r--src/paravirt.h1
-rw-r--r--src/pci.c8
3 files changed, 5 insertions, 15 deletions
diff --git a/src/Kconfig b/src/Kconfig
index 0ffc49e..e732528 100644
--- a/src/Kconfig
+++ b/src/Kconfig
@@ -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)"
diff --git a/src/paravirt.h b/src/paravirt.h
index 83166f4..4a370a0 100644
--- a/src/paravirt.h
+++ b/src/paravirt.h
@@ -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
diff --git a/src/pci.c b/src/pci.c
index 23a6878..49698ac 100644
--- 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) {