sysbus: add sysbus_address_space()
Given a bus device, retrieves the memory address space for its bus. Signed-off-by: Avi Kivity <avi@redhat.com>
This commit is contained in:
parent
ab0115e10c
commit
62ec4832ea
|
@ -261,3 +261,8 @@ void sysbus_del_io(SysBusDevice *dev, MemoryRegion *mem)
|
||||||
{
|
{
|
||||||
memory_region_del_subregion(get_system_io(), mem);
|
memory_region_del_subregion(get_system_io(), mem);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MemoryRegion *sysbus_address_space(SysBusDevice *dev)
|
||||||
|
{
|
||||||
|
return get_system_memory();
|
||||||
|
}
|
||||||
|
|
|
@ -57,6 +57,7 @@ void sysbus_del_memory(SysBusDevice *dev, MemoryRegion *mem);
|
||||||
void sysbus_add_io(SysBusDevice *dev, target_phys_addr_t addr,
|
void sysbus_add_io(SysBusDevice *dev, target_phys_addr_t addr,
|
||||||
MemoryRegion *mem);
|
MemoryRegion *mem);
|
||||||
void sysbus_del_io(SysBusDevice *dev, MemoryRegion *mem);
|
void sysbus_del_io(SysBusDevice *dev, MemoryRegion *mem);
|
||||||
|
MemoryRegion *sysbus_address_space(SysBusDevice *dev);
|
||||||
|
|
||||||
/* Legacy helper function for creating devices. */
|
/* Legacy helper function for creating devices. */
|
||||||
DeviceState *sysbus_create_varargs(const char *name,
|
DeviceState *sysbus_create_varargs(const char *name,
|
||||||
|
|
Loading…
Reference in a new issue