mirror of
https://github.com/qemu/qemu.git
synced 2024-11-25 11:53:39 +08:00
isa: add isa_address_space()
A helper that returns the address space used by ISA devices. Useful for getting rid of isa_mem_base, multiple ISA buses, or ISA buses behind bridges. Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
c5b3572fc6
commit
c839adec88
@ -20,6 +20,7 @@
|
|||||||
#include "monitor.h"
|
#include "monitor.h"
|
||||||
#include "sysbus.h"
|
#include "sysbus.h"
|
||||||
#include "isa.h"
|
#include "isa.h"
|
||||||
|
#include "exec-memory.h"
|
||||||
|
|
||||||
struct ISABus {
|
struct ISABus {
|
||||||
BusState qbus;
|
BusState qbus;
|
||||||
@ -202,4 +203,9 @@ static char *isabus_get_fw_dev_path(DeviceState *dev)
|
|||||||
return strdup(path);
|
return strdup(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MemoryRegion *isa_address_space(ISADevice *dev)
|
||||||
|
{
|
||||||
|
return get_system_memory();
|
||||||
|
}
|
||||||
|
|
||||||
device_init(isabus_register_devices)
|
device_init(isabus_register_devices)
|
||||||
|
1
hw/isa.h
1
hw/isa.h
@ -32,6 +32,7 @@ void isa_init_irq(ISADevice *dev, qemu_irq *p, int isairq);
|
|||||||
void isa_init_ioport(ISADevice *dev, uint16_t ioport);
|
void isa_init_ioport(ISADevice *dev, uint16_t ioport);
|
||||||
void isa_init_ioport_range(ISADevice *dev, uint16_t start, uint16_t length);
|
void isa_init_ioport_range(ISADevice *dev, uint16_t start, uint16_t length);
|
||||||
void isa_qdev_register(ISADeviceInfo *info);
|
void isa_qdev_register(ISADeviceInfo *info);
|
||||||
|
MemoryRegion *isa_address_space(ISADevice *dev);
|
||||||
ISADevice *isa_create(const char *name);
|
ISADevice *isa_create(const char *name);
|
||||||
ISADevice *isa_try_create(const char *name);
|
ISADevice *isa_try_create(const char *name);
|
||||||
ISADevice *isa_create_simple(const char *name);
|
ISADevice *isa_create_simple(const char *name);
|
||||||
|
Loading…
Reference in New Issue
Block a user