From 8b030ae51ab65f142a2f567ebbcd437c62c276ae Mon Sep 17 00:00:00 2001 From: Nguyen Anh Quynh Date: Sat, 27 Aug 2016 21:49:11 +0800 Subject: [PATCH] fix for issue #523 --- include/uc_priv.h | 4 ++-- qemu/include/exec/memory.h | 4 ++-- qemu/memory.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/uc_priv.h b/include/uc_priv.h index a0879676..81a640fd 100644 --- a/include/uc_priv.h +++ b/include/uc_priv.h @@ -68,9 +68,9 @@ typedef void (*uc_args_uc_long_t)(struct uc_struct*, unsigned long); typedef void (*uc_args_uc_u64_t)(struct uc_struct *, uint64_t addr); -typedef MemoryRegion* (*uc_args_uc_ram_size_t)(struct uc_struct*, ram_addr_t begin, size_t size, uint32_t perms); +typedef MemoryRegion* (*uc_args_uc_ram_size_t)(struct uc_struct*, hwaddr begin, size_t size, uint32_t perms); -typedef MemoryRegion* (*uc_args_uc_ram_size_ptr_t)(struct uc_struct*, ram_addr_t begin, size_t size, uint32_t perms, void *ptr); +typedef MemoryRegion* (*uc_args_uc_ram_size_ptr_t)(struct uc_struct*, hwaddr begin, size_t size, uint32_t perms, void *ptr); typedef void (*uc_mem_unmap_t)(struct uc_struct*, MemoryRegion *mr); diff --git a/qemu/include/exec/memory.h b/qemu/include/exec/memory.h index 3a707522..9dc25cf1 100644 --- a/qemu/include/exec/memory.h +++ b/qemu/include/exec/memory.h @@ -938,8 +938,8 @@ void address_space_unmap(AddressSpace *as, void *buffer, hwaddr len, void memory_register_types(struct uc_struct *uc); -MemoryRegion *memory_map(struct uc_struct *uc, ram_addr_t begin, size_t size, uint32_t perms); -MemoryRegion *memory_map_ptr(struct uc_struct *uc, ram_addr_t begin, size_t size, uint32_t perms, void *ptr); +MemoryRegion *memory_map(struct uc_struct *uc, hwaddr begin, size_t size, uint32_t perms); +MemoryRegion *memory_map_ptr(struct uc_struct *uc, hwaddr begin, size_t size, uint32_t perms, void *ptr); void memory_unmap(struct uc_struct *uc, MemoryRegion *mr); int memory_free(struct uc_struct *uc); diff --git a/qemu/memory.c b/qemu/memory.c index 3ab5c7a3..84d650c7 100644 --- a/qemu/memory.c +++ b/qemu/memory.c @@ -31,7 +31,7 @@ // Unicorn engine -MemoryRegion *memory_map(struct uc_struct *uc, ram_addr_t begin, size_t size, uint32_t perms) +MemoryRegion *memory_map(struct uc_struct *uc, hwaddr begin, size_t size, uint32_t perms) { MemoryRegion *ram = g_new(MemoryRegion, 1); @@ -48,7 +48,7 @@ MemoryRegion *memory_map(struct uc_struct *uc, ram_addr_t begin, size_t size, ui return ram; } -MemoryRegion *memory_map_ptr(struct uc_struct *uc, ram_addr_t begin, size_t size, uint32_t perms, void *ptr) +MemoryRegion *memory_map_ptr(struct uc_struct *uc, hwaddr begin, size_t size, uint32_t perms, void *ptr) { MemoryRegion *ram = g_new(MemoryRegion, 1);