[SeaBIOS] [RfC PATCH 2/2] q35: allocate from ioports from 0x2000 up

Gerd Hoffmann kraxel at redhat.com
Mon Jan 14 13:56:05 CET 2013


---
 src/pciinit.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/src/pciinit.c b/src/pciinit.c
index a406bbd..1de34b8 100644
--- a/src/pciinit.c
+++ b/src/pciinit.c
@@ -40,6 +40,8 @@ u64 pcimem_end     = BUILD_PCIMEM_END;
 u64 pcimem64_start = BUILD_PCIMEM64_START;
 u64 pcimem64_end   = BUILD_PCIMEM64_END;
 
+static u32 ioport_base = 0xc000;
+
 struct pci_region_entry {
     struct pci_device *dev;
     int bar;
@@ -312,6 +314,8 @@ void mch_mem_addr_init(struct pci_device *dev, void *arg)
 
     /* setup pci i/o window (above mmconfig) */
     pcimem_start = addr + size;
+
+    ioport_base  = 0x2000;
 }
 
 static const struct pci_device_id pci_platform_tbl[] = {
@@ -610,7 +614,7 @@ static int pci_bios_check_devices(struct pci_bus *busses)
 // Setup region bases (given the regions' size and alignment)
 static int pci_bios_init_root_regions(struct pci_bus *bus)
 {
-    bus->r[PCI_REGION_TYPE_IO].base = 0xc000;
+    bus->r[PCI_REGION_TYPE_IO].base = ioport_base;
 
     struct pci_region *r_end = &bus->r[PCI_REGION_TYPE_PREFMEM];
     struct pci_region *r_start = &bus->r[PCI_REGION_TYPE_MEM];
-- 
1.7.1




More information about the SeaBIOS mailing list