aboutsummaryrefslogtreecommitdiff
path: root/hw/isa-bus.c
diff options
context:
space:
mode:
authorJulien Grall <julien.grall@citrix.com>2012-09-19 12:50:02 +0100
committerAndreas Färber <afaerber@suse.de>2012-12-04 14:50:21 +0100
commitac10027327e27c9b360452e01af3ef2147f5a26f (patch)
tree51aeb676b40036422d3a7adc15265aad6af8ba41 /hw/isa-bus.c
parent16c6c80ac3a772b42a87b77dfdf0fdac7c607b0e (diff)
isa: Add isa_address_space_io()
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 <julien.grall@citrix.com> Acked-by: Avi Kivity <avi@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'hw/isa-bus.c')
-rw-r--r--hw/isa-bus.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/hw/isa-bus.c b/hw/isa-bus.c
index 685fdc0f82..144a88e272 100644
--- a/hw/isa-bus.c
+++ b/hw/isa-bus.c
@@ -264,4 +264,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)