[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH V9 1/8] isa: add isa_address_space_io
From: |
Julien Grall |
Subject: |
[Qemu-devel] [PATCH V9 1/8] isa: add isa_address_space_io |
Date: |
Tue, 4 Sep 2012 16:13:25 +0100 |
This function permits to retrieve ISA IO address space.
It will be usefull when we need to pass IO address space as argument.
Signed-off-by: Julien Grall <address@hidden>
---
hw/isa-bus.c | 9 +++++++++
hw/isa.h | 1 +
2 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/hw/isa-bus.c b/hw/isa-bus.c
index f9b2373..c1d8309 100644
--- a/hw/isa-bus.c
+++ b/hw/isa-bus.c
@@ -244,4 +244,13 @@ MemoryRegion *isa_address_space(ISADevice *dev)
return get_system_memory();
}
+MemoryRegion *isa_address_space_io(ISADevice *dev)
+{
+ if (dev) {
+ return isa_bus_from_device(dev)->address_space_io;
+ }
+
+ return isabus->address_space_io;
+}
+
type_init(isabus_register_types)
diff --git a/hw/isa.h b/hw/isa.h
index dc97052..3891c1f 100644
--- a/hw/isa.h
+++ b/hw/isa.h
@@ -43,6 +43,7 @@ void isa_bus_irqs(ISABus *bus, qemu_irq *irqs);
qemu_irq isa_get_irq(ISADevice *dev, int isairq);
void isa_init_irq(ISADevice *dev, qemu_irq *p, int isairq);
MemoryRegion *isa_address_space(ISADevice *dev);
+MemoryRegion *isa_address_space_io(ISADevice *dev);
ISADevice *isa_create(ISABus *bus, const char *name);
ISADevice *isa_try_create(ISABus *bus, const char *name);
ISADevice *isa_create_simple(ISABus *bus, const char *name);
--
Julien Grall
- [Qemu-devel] [PATCH V9 0/8] memory: unify ioport registration, Julien Grall, 2012/09/04
- [Qemu-devel] [PATCH V9 1/8] isa: add isa_address_space_io,
Julien Grall <=
- [Qemu-devel] [PATCH V9 2/8] hw/apm.c: replace register_ioport*, Julien Grall, 2012/09/04
- [Qemu-devel] [PATCH V9 3/8] smb: replace_register_ioport*, Julien Grall, 2012/09/04
- [Qemu-devel] [PATCH V9 4/8] hw/acpi_piix4.c: replace register_ioport*, Julien Grall, 2012/09/04
- Re: [Qemu-devel] [PATCH V9 4/8] hw/acpi_piix4.c: replace register_ioport*, Avi Kivity, 2012/09/09
- Re: [Qemu-devel] [PATCH V9 4/8] hw/acpi_piix4.c: replace register_ioport*, Julien Grall, 2012/09/10
- Re: [Qemu-devel] [PATCH V9 4/8] hw/acpi_piix4.c: replace register_ioport*, Avi Kivity, 2012/09/10
- Re: [Qemu-devel] [PATCH V9 4/8] hw/acpi_piix4.c: replace register_ioport*, Julien Grall, 2012/09/10
- Re: [Qemu-devel] [PATCH V9 4/8] hw/acpi_piix4.c: replace register_ioport*, Jan Kiszka, 2012/09/10
- Re: [Qemu-devel] [PATCH V9 4/8] hw/acpi_piix4.c: replace register_ioport*, Stefano Stabellini, 2012/09/10
[Qemu-devel] [PATCH V9 5/8] hw/cirrus_vga.c: replace register_ioport*, Julien Grall, 2012/09/04