Commit 04c504cc4fb6b600e597bc6a869d478d3b7d3db4
1 parent
ff7b8f5b
use ram_addr_t
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1543 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
7 additions
and
6 deletions
cpu-all.h
... | ... | @@ -708,7 +708,6 @@ extern uint8_t *phys_ram_dirty; |
708 | 708 | #define IO_MEM_RAM (0 << IO_MEM_SHIFT) /* hardcoded offset */ |
709 | 709 | #define IO_MEM_ROM (1 << IO_MEM_SHIFT) /* hardcoded offset */ |
710 | 710 | #define IO_MEM_UNASSIGNED (2 << IO_MEM_SHIFT) |
711 | -#define IO_MEM_CODE (3 << IO_MEM_SHIFT) /* used internally, never use directly */ | |
712 | 711 | #define IO_MEM_NOTDIRTY (4 << IO_MEM_SHIFT) /* used internally, never use directly */ |
713 | 712 | |
714 | 713 | typedef void CPUWriteMemoryFunc(void *opaque, target_phys_addr_t addr, uint32_t value); |
... | ... | @@ -743,27 +742,29 @@ void stl_phys(target_phys_addr_t addr, uint32_t val); |
743 | 742 | int cpu_memory_rw_debug(CPUState *env, target_ulong addr, |
744 | 743 | uint8_t *buf, int len, int is_write); |
745 | 744 | |
746 | -#define VGA_DIRTY_FLAG 0x01 | |
745 | +#define VGA_DIRTY_FLAG 0x01 | |
746 | +#define CODE_DIRTY_FLAG 0x02 | |
747 | 747 | |
748 | 748 | /* read dirty bit (return 0 or 1) */ |
749 | -static inline int cpu_physical_memory_is_dirty(target_ulong addr) | |
749 | +static inline int cpu_physical_memory_is_dirty(ram_addr_t addr) | |
750 | 750 | { |
751 | 751 | return phys_ram_dirty[addr >> TARGET_PAGE_BITS] == 0xff; |
752 | 752 | } |
753 | 753 | |
754 | -static inline int cpu_physical_memory_get_dirty(target_ulong addr, | |
754 | +static inline int cpu_physical_memory_get_dirty(ram_addr_t addr, | |
755 | 755 | int dirty_flags) |
756 | 756 | { |
757 | 757 | return phys_ram_dirty[addr >> TARGET_PAGE_BITS] & dirty_flags; |
758 | 758 | } |
759 | 759 | |
760 | -static inline void cpu_physical_memory_set_dirty(target_ulong addr) | |
760 | +static inline void cpu_physical_memory_set_dirty(ram_addr_t addr) | |
761 | 761 | { |
762 | 762 | phys_ram_dirty[addr >> TARGET_PAGE_BITS] = 0xff; |
763 | 763 | } |
764 | 764 | |
765 | -void cpu_physical_memory_reset_dirty(target_ulong start, target_ulong end, | |
765 | +void cpu_physical_memory_reset_dirty(ram_addr_t start, ram_addr_t end, | |
766 | 766 | int dirty_flags); |
767 | +void cpu_tlb_update_dirty(CPUState *env); | |
767 | 768 | |
768 | 769 | void dump_exec_info(FILE *f, |
769 | 770 | int (*cpu_fprintf)(FILE *f, const char *fmt, ...)); | ... | ... |