diff options
author | BALATON Zoltan <balaton@eik.bme.hu> | 2023-07-06 13:16:42 +0200 |
---|---|---|
committer | Daniel Henrique Barboza <danielhb413@gmail.com> | 2023-07-07 04:47:49 -0300 |
commit | dd0f356dfe363d51b0cc0e1925db902b97338e18 (patch) | |
tree | 6060fe5f92bd99b319589f5ebb842dfbeb1c23dc /hw/ppc/ppc440_pcix.c | |
parent | 97784278880b58952400cafcfd1c12fc1c0b5124 (diff) | |
download | qemu-dd0f356dfe363d51b0cc0e1925db902b97338e18.zip qemu-dd0f356dfe363d51b0cc0e1925db902b97338e18.tar.gz qemu-dd0f356dfe363d51b0cc0e1925db902b97338e18.tar.bz2 |
ppc440_pcix: Stop using system io region for PCI bus
Reduce the iomem region to 64K and use it for the PCI io space and map
it directly from the board without an intermediate alias that is not
really needed.
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <f4ad9af42197a92dd1d0b56c21316dbdad240ee4.1688641673.git.balaton@eik.bme.hu>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Diffstat (limited to 'hw/ppc/ppc440_pcix.c')
-rw-r--r-- | hw/ppc/ppc440_pcix.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/hw/ppc/ppc440_pcix.c b/hw/ppc/ppc440_pcix.c index 899558b..54286cf 100644 --- a/hw/ppc/ppc440_pcix.c +++ b/hw/ppc/ppc440_pcix.c @@ -23,6 +23,7 @@ #include "qemu/error-report.h" #include "qemu/log.h" #include "qemu/module.h" +#include "qemu/units.h" #include "hw/irq.h" #include "hw/ppc/ppc.h" #include "hw/ppc/ppc4xx.h" @@ -491,10 +492,11 @@ static void ppc440_pcix_realize(DeviceState *dev, Error **errp) s = PPC440_PCIX_HOST_BRIDGE(dev); sysbus_init_irq(sbd, &s->irq); - memory_region_init(&s->busmem, OBJECT(dev), "pci bus memory", UINT64_MAX); + memory_region_init(&s->busmem, OBJECT(dev), "pci-mem", UINT64_MAX); + memory_region_init(&s->iomem, OBJECT(dev), "pci-io", 64 * KiB); h->bus = pci_register_root_bus(dev, NULL, ppc440_pcix_set_irq, - ppc440_pcix_map_irq, &s->irq, &s->busmem, - get_system_io(), PCI_DEVFN(0, 0), 1, TYPE_PCI_BUS); + ppc440_pcix_map_irq, &s->irq, &s->busmem, &s->iomem, + PCI_DEVFN(0, 0), 1, TYPE_PCI_BUS); s->dev = pci_create_simple(h->bus, PCI_DEVFN(0, 0), "ppc4xx-host-bridge"); @@ -514,6 +516,7 @@ static void ppc440_pcix_realize(DeviceState *dev, Error **errp) memory_region_add_subregion(&s->container, PCIC0_CFGDATA, &h->data_mem); memory_region_add_subregion(&s->container, PPC440_REG_BASE, &s->regs); sysbus_init_mmio(sbd, &s->container); + sysbus_init_mmio(sbd, &s->iomem); } static void ppc440_pcix_class_init(ObjectClass *klass, void *data) |