aboutsummaryrefslogtreecommitdiff
path: root/ioport.h
diff options
context:
space:
mode:
authorAvi Kivity <avi@redhat.com>2011-09-26 14:52:26 +0300
committerAvi Kivity <avi@redhat.com>2011-10-11 15:57:07 +0200
commit6bf9fd43cfc10022670d1135711d6952d98bcb02 (patch)
tree77f495b976f71e42980e5f16995e7a0db7f86437 /ioport.h
parentebf47c24b01857d8b49a892b853bdd13b8e3eb5e (diff)
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.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/ioport.h b/ioport.h
index 82ffd9d81a..ae3e9da0b5 100644
--- a/ioport.h
+++ b/ioport.h
@@ -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 */