From 0e0df1e24de709016c42164d9b22b981a04e4696 Mon Sep 17 00:00:00 2001 From: Avi Kivity Date: Mon, 2 Jan 2012 00:32:15 +0200 Subject: 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 Reviewed-by: Richard Henderson --- cpu-common.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'cpu-common.h') 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. */ -- cgit v1.2.1