use ram_addr_t

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1543 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
bellard 2005-08-21 09:24:50 +00:00
parent ff7b8f5b0f
commit 04c504cc4f
1 changed files with 7 additions and 6 deletions

View File

@ -708,7 +708,6 @@ extern uint8_t *phys_ram_dirty;
#define IO_MEM_RAM (0 << IO_MEM_SHIFT) /* hardcoded offset */ #define IO_MEM_RAM (0 << IO_MEM_SHIFT) /* hardcoded offset */
#define IO_MEM_ROM (1 << 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_UNASSIGNED (2 << IO_MEM_SHIFT)
#define IO_MEM_CODE (3 << IO_MEM_SHIFT) /* used internally, never use directly */
#define IO_MEM_NOTDIRTY (4 << IO_MEM_SHIFT) /* used internally, never use directly */ #define IO_MEM_NOTDIRTY (4 << IO_MEM_SHIFT) /* used internally, never use directly */
typedef void CPUWriteMemoryFunc(void *opaque, target_phys_addr_t addr, uint32_t value); typedef void CPUWriteMemoryFunc(void *opaque, target_phys_addr_t addr, uint32_t value);
@ -744,26 +743,28 @@ int cpu_memory_rw_debug(CPUState *env, target_ulong addr,
uint8_t *buf, int len, int is_write); uint8_t *buf, int len, int is_write);
#define VGA_DIRTY_FLAG 0x01 #define VGA_DIRTY_FLAG 0x01
#define CODE_DIRTY_FLAG 0x02
/* read dirty bit (return 0 or 1) */ /* read dirty bit (return 0 or 1) */
static inline int cpu_physical_memory_is_dirty(target_ulong addr) static inline int cpu_physical_memory_is_dirty(ram_addr_t addr)
{ {
return phys_ram_dirty[addr >> TARGET_PAGE_BITS] == 0xff; return phys_ram_dirty[addr >> TARGET_PAGE_BITS] == 0xff;
} }
static inline int cpu_physical_memory_get_dirty(target_ulong addr, static inline int cpu_physical_memory_get_dirty(ram_addr_t addr,
int dirty_flags) int dirty_flags)
{ {
return phys_ram_dirty[addr >> TARGET_PAGE_BITS] & dirty_flags; return phys_ram_dirty[addr >> TARGET_PAGE_BITS] & dirty_flags;
} }
static inline void cpu_physical_memory_set_dirty(target_ulong addr) static inline void cpu_physical_memory_set_dirty(ram_addr_t addr)
{ {
phys_ram_dirty[addr >> TARGET_PAGE_BITS] = 0xff; phys_ram_dirty[addr >> TARGET_PAGE_BITS] = 0xff;
} }
void cpu_physical_memory_reset_dirty(target_ulong start, target_ulong end, void cpu_physical_memory_reset_dirty(ram_addr_t start, ram_addr_t end,
int dirty_flags); int dirty_flags);
void cpu_tlb_update_dirty(CPUState *env);
void dump_exec_info(FILE *f, void dump_exec_info(FILE *f,
int (*cpu_fprintf)(FILE *f, const char *fmt, ...)); int (*cpu_fprintf)(FILE *f, const char *fmt, ...));