From acbbec5d438dcf04234519bac53e1f5263572d76 Mon Sep 17 00:00:00 2001 From: Avi Kivity Date: Mon, 21 Nov 2011 12:27:03 +0200 Subject: memory: move mmio access to functions Currently mmio access goes directly to the io_mem_{read,write} arrays. In preparation for eliminating them, add indirection via a function. Signed-off-by: Avi Kivity Reviewed-by: Richard Henderson --- exec-all.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'exec-all.h') diff --git a/exec-all.h b/exec-all.h index c211242bab..23c4598263 100644 --- a/exec-all.h +++ b/exec-all.h @@ -299,8 +299,11 @@ extern void *tci_tb_ptr; #if !defined(CONFIG_USER_ONLY) -extern CPUWriteMemoryFunc *io_mem_write[IO_MEM_NB_ENTRIES][4]; -extern CPUReadMemoryFunc *io_mem_read[IO_MEM_NB_ENTRIES][4]; +uint64_t io_mem_read(int index, target_phys_addr_t addr, unsigned size); +void io_mem_write(int index, target_phys_addr_t addr, uint64_t value, + unsigned size); +extern CPUWriteMemoryFunc *_io_mem_write[IO_MEM_NB_ENTRIES][4]; +extern CPUReadMemoryFunc *_io_mem_read[IO_MEM_NB_ENTRIES][4]; extern void *io_mem_opaque[IO_MEM_NB_ENTRIES]; void tlb_fill(CPUState *env1, target_ulong addr, int is_write, int mmu_idx, -- cgit v1.2.1