diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2014-05-13 14:09:00 +0200 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2014-05-20 12:15:30 +0200 |
commit | 7eac0c4e9d37a70ae69ee78dfc11f27a63f36b7d (patch) | |
tree | 339d0001dee3e64547ecbd5defdfb78b1c946508 /src | |
parent | a217de932969b2a40a717573b2919337e46710b9 (diff) | |
download | seabios-7eac0c4e9d37a70ae69ee78dfc11f27a63f36b7d.tar.gz |
Allow using full io region on q35.
If qemu is new enough to support acpi table loading,
then go move pmbase out of the way. This allows to
use the whole 0x1000 -> 0xffff io address space on q35.
piix has hotplug ports in the 0xa000 -> 0xafff area,
so we can't do the same there.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/fw/paravirt.c | 5 | ||||
-rw-r--r-- | src/fw/pciinit.c | 16 |
2 files changed, 14 insertions, 7 deletions
diff --git a/src/fw/paravirt.c b/src/fw/paravirt.c index 569fd257..db22ae8f 100644 --- a/src/fw/paravirt.c +++ b/src/fw/paravirt.c @@ -440,4 +440,9 @@ void qemu_cfg_init(void) } qemu_cfg_e820(); + + if (romfile_find("etc/table-loader")) { + acpi_pm_base = 0x0600; + dprintf(1, "Moving pm_base to 0x%x\n", acpi_pm_base); + } } diff --git a/src/fw/pciinit.c b/src/fw/pciinit.c index 9ffda490..2e6382f9 100644 --- a/src/fw/pciinit.c +++ b/src/fw/pciinit.c @@ -36,6 +36,7 @@ u64 pcimem_start = BUILD_PCIMEM_START; u64 pcimem_end = BUILD_PCIMEM_END; u64 pcimem64_start = BUILD_PCIMEM64_START; u64 pcimem64_end = BUILD_PCIMEM64_END; +u64 pci_io_low_end = 0xa000; struct pci_region_entry { struct pci_device *dev; @@ -404,6 +405,12 @@ static void mch_mem_addr_setup(struct pci_device *dev, void *arg) pcimem_start = addr + size; pci_slot_get_irq = mch_pci_slot_get_irq; + + /* setup io address space */ + if (acpi_pm_base < 0x1000) + pci_io_low_end = 0x10000; + else + pci_io_low_end = acpi_pm_base; } static const struct pci_device_id pci_platform_tbl[] = { @@ -721,16 +728,11 @@ static int pci_bios_init_root_regions_io(struct pci_bus *bus) if (sum < 0x4000) { /* traditional region is big enougth, use it */ r_io->base = 0xc000; - } else if (sum < 0x9000) { + } else if (sum < pci_io_low_end - 0x1000) { /* use the larger region at 0x1000 */ r_io->base = 0x1000; } else { - /* - * Not enougth io address space -> error out. - * - * TODO: on q35 we can move PORT_ACPI_PM_BASE out of - * the way, then use the whole 1000 -> ffff region. - */ + /* not enouth io address space -> error out */ return -1; } dprintf(1, "PCI: IO: %4llx - %4llx\n", r_io->base, r_io->base + sum - 1); |