aboutsummaryrefslogtreecommitdiff
path: root/hw/prep_pci.c
diff options
context:
space:
mode:
authorAvi Kivity <avi@redhat.com>2011-08-08 16:09:04 +0300
committerAnthony Liguori <aliguori@us.ibm.com>2011-08-08 10:15:53 -0500
commitaee97b840fd0362594c954af750491fafad66a3d (patch)
tree38d92eebc7f845fece1358ef1aeecf6f9741d138 /hw/prep_pci.c
parent309cb471c80e5909710d1ee3c3b50d481496d189 (diff)
downloadqemu-aee97b840fd0362594c954af750491fafad66a3d.zip
qemu-aee97b840fd0362594c954af750491fafad66a3d.tar.gz
qemu-aee97b840fd0362594c954af750491fafad66a3d.tar.bz2
pci: pass I/O address space to new PCI bus
This lets us register BARs in the I/O address space. Reviewed-by: Richard Henderson <rth@twiddle.net> Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/prep_pci.c')
-rw-r--r--hw/prep_pci.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/hw/prep_pci.c b/hw/prep_pci.c
index da02f0e..58619dd 100644
--- a/hw/prep_pci.c
+++ b/hw/prep_pci.c
@@ -110,7 +110,9 @@ static void prep_set_irq(void *opaque, int irq_num, int level)
qemu_set_irq(pic[(irq_num & 1) ? 11 : 9] , level);
}
-PCIBus *pci_prep_init(qemu_irq *pic, MemoryRegion *address_space)
+PCIBus *pci_prep_init(qemu_irq *pic,
+ MemoryRegion *address_space_mem,
+ MemoryRegion *address_space_io)
{
PREPPCIState *s;
PCIDevice *d;
@@ -119,7 +121,9 @@ PCIBus *pci_prep_init(qemu_irq *pic, MemoryRegion *address_space)
s = qemu_mallocz(sizeof(PREPPCIState));
s->bus = pci_register_bus(NULL, "pci",
prep_set_irq, prep_map_irq, pic,
- address_space, 0, 4);
+ address_space_mem,
+ address_space_io,
+ 0, 4);
pci_host_conf_register_ioport(0xcf8, s);