提交 ac100273 编写于 作者: J Julien Grall 提交者: Andreas Färber

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: NJulien Grall <julien.grall@citrix.com>
Acked-by: NAvi Kivity <avi@redhat.com>
Signed-off-by: NAndreas Färber <afaerber@suse.de>
上级 16c6c80a
......@@ -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)
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册