aboutsummaryrefslogtreecommitdiff
path: root/cpu-common.h
diff options
context:
space:
mode:
authorAvi Kivity <avi@redhat.com>2012-01-02 00:32:15 +0200
committerAvi Kivity <avi@redhat.com>2012-01-04 13:34:50 +0200
commit0e0df1e24de709016c42164d9b22b981a04e4696 (patch)
tree1e5751eef8d10f4ce3ebc841062ddfee376288a3 /cpu-common.h
parentd39e822265e56af761cc506ac45768ab8af940b4 (diff)
Convert IO_MEM_{RAM,ROM,UNASSIGNED,NOTDIRTY} to MemoryRegions
Convert the fixed-address IO_MEM_RAM, IO_MEM_ROM, IO_MEM_UNASSIGNED, and IO_MEM_NOTDIRTY io handlers to MemoryRegions. These aren't real regions, since they are never added to the memory hierarchy, but they allow reuse of the dispatch functionality. Signed-off-by: Avi Kivity <avi@redhat.com> Reviewed-by: Richard Henderson <rth@twiddle.net>
Diffstat (limited to 'cpu-common.h')
-rw-r--r--cpu-common.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/cpu-common.h b/cpu-common.h
index 3c0cff0505..fd787b983d 100644
--- a/cpu-common.h
+++ b/cpu-common.h
@@ -109,10 +109,10 @@ void cpu_physical_memory_write_rom(target_phys_addr_t addr,
#define IO_MEM_SHIFT 3
-#define IO_MEM_RAM (0 << IO_MEM_SHIFT) /* hardcoded offset */
-#define IO_MEM_ROM (1 << IO_MEM_SHIFT) /* hardcoded offset */
-#define IO_MEM_UNASSIGNED (2 << IO_MEM_SHIFT)
-#define IO_MEM_NOTDIRTY (3 << IO_MEM_SHIFT)
+extern struct MemoryRegion io_mem_ram;
+extern struct MemoryRegion io_mem_rom;
+extern struct MemoryRegion io_mem_unassigned;
+extern struct MemoryRegion io_mem_notdirty;
#define IO_MEM_SUBPAGE_RAM (4 << IO_MEM_SHIFT)
/* Acts like a ROM when read and like a device when written. */