diff options
author | Avi Kivity <avi@redhat.com> | 2011-09-26 14:52:26 +0300 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2011-10-11 15:57:07 +0200 |
commit | 6bf9fd43cfc10022670d1135711d6952d98bcb02 (patch) | |
tree | 77f495b976f71e42980e5f16995e7a0db7f86437 /ioport.h | |
parent | ebf47c24b01857d8b49a892b853bdd13b8e3eb5e (diff) | |
download | qemu-6bf9fd43cfc10022670d1135711d6952d98bcb02.zip qemu-6bf9fd43cfc10022670d1135711d6952d98bcb02.tar.gz qemu-6bf9fd43cfc10022670d1135711d6952d98bcb02.tar.bz2 |
Introduce PortioList
Add a type and methods for manipulating a list of disjoint I/O ports,
used in some older hardware devices.
Based on original patch by Richard Henderson.
Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'ioport.h')
-rw-r--r-- | ioport.h | 21 |
1 files changed, 21 insertions, 0 deletions
@@ -52,4 +52,25 @@ uint8_t cpu_inb(pio_addr_t addr); uint16_t cpu_inw(pio_addr_t addr); uint32_t cpu_inl(pio_addr_t addr); +struct MemoryRegion; +struct MemoryRegionPortio; + +typedef struct PortioList { + const struct MemoryRegionPortio *ports; + struct MemoryRegion *address_space; + unsigned nr; + struct MemoryRegion **regions; + void *opaque; + const char *name; +} PortioList; + +void portio_list_init(PortioList *piolist, + const struct MemoryRegionPortio *callbacks, + void *opaque, const char *name); +void portio_list_destroy(PortioList *piolist); +void portio_list_add(PortioList *piolist, + struct MemoryRegion *address_space, + uint32_t addr); +void portio_list_del(PortioList *piolist); + #endif /* IOPORT_H */ |