diff options
Diffstat (limited to 'include/exec/cpu-common.h')
-rw-r--r-- | include/exec/cpu-common.h | 32 |
1 files changed, 26 insertions, 6 deletions
diff --git a/include/exec/cpu-common.h b/include/exec/cpu-common.h index 952bcfeb4..9e839e50c 100644 --- a/include/exec/cpu-common.h +++ b/include/exec/cpu-common.h @@ -1,5 +1,5 @@ #ifndef CPU_COMMON_H -#define CPU_COMMON_H +#define CPU_COMMON_H 1 /* CPU interfaces that are target independent. */ @@ -7,6 +7,10 @@ #include "exec/hwaddr.h" #endif +#ifndef NEED_CPU_H +#include "exec/poison.h" +#endif + #include "qemu/bswap.h" #include "qemu/queue.h" #include "qemu/fprintf-fn.h" @@ -23,6 +27,12 @@ typedef struct CPUListState { FILE *file; } CPUListState; +typedef enum MMUAccessType { + MMU_DATA_LOAD = 0, + MMU_DATA_STORE = 1, + MMU_INST_FETCH = 2 +} MMUAccessType; + #if !defined(CONFIG_USER_ONLY) enum device_endian { @@ -51,12 +61,12 @@ typedef uint32_t CPUReadMemoryFunc(void *opaque, hwaddr addr); void qemu_ram_remap(ram_addr_t addr, ram_addr_t length); /* This should not be used by devices. */ -ram_addr_t qemu_ram_addr_from_host(void *ptr); +MemoryRegion *qemu_ram_addr_from_host(void *ptr, ram_addr_t *ram_addr); RAMBlock *qemu_ram_block_by_name(const char *name); RAMBlock *qemu_ram_block_from_host(void *ptr, bool round_offset, - ram_addr_t *offset); -void qemu_ram_set_idstr(RAMBlock *block, const char *name, DeviceState *dev); -void qemu_ram_unset_idstr(RAMBlock *block); + ram_addr_t *ram_addr, ram_addr_t *offset); +void qemu_ram_set_idstr(ram_addr_t addr, const char *name, DeviceState *dev); +void qemu_ram_unset_idstr(ram_addr_t addr); const char *qemu_ram_get_idstr(RAMBlock *rb); void cpu_physical_memory_rw(hwaddr addr, uint8_t *buf, @@ -103,6 +113,16 @@ void stl_be_phys(AddressSpace *as, hwaddr addr, uint32_t val); void stq_le_phys(AddressSpace *as, hwaddr addr, uint64_t val); void stq_be_phys(AddressSpace *as, hwaddr addr, uint64_t val); +#ifdef NEED_CPU_H +uint32_t lduw_phys(AddressSpace *as, hwaddr addr); +uint32_t ldl_phys(AddressSpace *as, hwaddr addr); +uint64_t ldq_phys(AddressSpace *as, hwaddr addr); +void stl_phys_notdirty(AddressSpace *as, hwaddr addr, uint32_t val); +void stw_phys(AddressSpace *as, hwaddr addr, uint32_t val); +void stl_phys(AddressSpace *as, hwaddr addr, uint32_t val); +void stq_phys(AddressSpace *as, hwaddr addr, uint64_t val); +#endif + void cpu_physical_memory_write_rom(AddressSpace *as, hwaddr addr, const uint8_t *buf, int len); void cpu_flush_icache_range(hwaddr start, int len); @@ -117,4 +137,4 @@ int qemu_ram_foreach_block(RAMBlockIterFunc func, void *opaque); #endif -#endif /* CPU_COMMON_H */ +#endif /* !CPU_COMMON_H */ |