708 |
#define IO_MEM_RAM (0 << IO_MEM_SHIFT) /* hardcoded offset */ |
#define IO_MEM_RAM (0 << IO_MEM_SHIFT) /* hardcoded offset */ |
709 |
#define IO_MEM_ROM (1 << IO_MEM_SHIFT) /* hardcoded offset */ |
#define IO_MEM_ROM (1 << IO_MEM_SHIFT) /* hardcoded offset */ |
710 |
#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 */ |
|
711 |
#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 */ |
712 |
|
|
713 |
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); |
742 |
int cpu_memory_rw_debug(CPUState *env, target_ulong addr, |
int cpu_memory_rw_debug(CPUState *env, target_ulong addr, |
743 |
uint8_t *buf, int len, int is_write); |
uint8_t *buf, int len, int is_write); |
744 |
|
|
745 |
#define VGA_DIRTY_FLAG 0x01 |
#define VGA_DIRTY_FLAG 0x01 |
746 |
|
#define CODE_DIRTY_FLAG 0x02 |
747 |
|
|
748 |
/* read dirty bit (return 0 or 1) */ |
/* read dirty bit (return 0 or 1) */ |
749 |
static inline int cpu_physical_memory_is_dirty(target_ulong addr) |
static inline int cpu_physical_memory_is_dirty(ram_addr_t addr) |
750 |
{ |
{ |
751 |
return phys_ram_dirty[addr >> TARGET_PAGE_BITS] == 0xff; |
return phys_ram_dirty[addr >> TARGET_PAGE_BITS] == 0xff; |
752 |
} |
} |
753 |
|
|
754 |
static inline int cpu_physical_memory_get_dirty(target_ulong addr, |
static inline int cpu_physical_memory_get_dirty(ram_addr_t addr, |
755 |
int dirty_flags) |
int dirty_flags) |
756 |
{ |
{ |
757 |
return phys_ram_dirty[addr >> TARGET_PAGE_BITS] & dirty_flags; |
return phys_ram_dirty[addr >> TARGET_PAGE_BITS] & dirty_flags; |
758 |
} |
} |
759 |
|
|
760 |
static inline void cpu_physical_memory_set_dirty(target_ulong addr) |
static inline void cpu_physical_memory_set_dirty(ram_addr_t addr) |
761 |
{ |
{ |
762 |
phys_ram_dirty[addr >> TARGET_PAGE_BITS] = 0xff; |
phys_ram_dirty[addr >> TARGET_PAGE_BITS] = 0xff; |
763 |
} |
} |
764 |
|
|
765 |
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, |
766 |
int dirty_flags); |
int dirty_flags); |
767 |
|
void cpu_tlb_update_dirty(CPUState *env); |
768 |
|
|
769 |
void dump_exec_info(FILE *f, |
void dump_exec_info(FILE *f, |
770 |
int (*cpu_fprintf)(FILE *f, const char *fmt, ...)); |
int (*cpu_fprintf)(FILE *f, const char *fmt, ...)); |