Commit 04c504cc4fb6b600e597bc6a869d478d3b7d3db4

Authored by bellard
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,7 +708,6 @@ extern uint8_t *phys_ram_dirty;
708 #define IO_MEM_RAM (0 << IO_MEM_SHIFT) /* hardcoded offset */ 708 #define IO_MEM_RAM (0 << IO_MEM_SHIFT) /* hardcoded offset */
709 #define IO_MEM_ROM (1 << IO_MEM_SHIFT) /* hardcoded offset */ 709 #define IO_MEM_ROM (1 << IO_MEM_SHIFT) /* hardcoded offset */
710 #define IO_MEM_UNASSIGNED (2 << IO_MEM_SHIFT) 710 #define IO_MEM_UNASSIGNED (2 << IO_MEM_SHIFT)
711 -#define IO_MEM_CODE (3 << IO_MEM_SHIFT) /* used internally, never use directly */  
712 #define IO_MEM_NOTDIRTY (4 << IO_MEM_SHIFT) /* used internally, never use directly */ 711 #define IO_MEM_NOTDIRTY (4 << IO_MEM_SHIFT) /* used internally, never use directly */
713 712
714 typedef void CPUWriteMemoryFunc(void *opaque, target_phys_addr_t addr, uint32_t value); 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,27 +742,29 @@ void stl_phys(target_phys_addr_t addr, uint32_t val);
743 int cpu_memory_rw_debug(CPUState *env, target_ulong addr, 742 int cpu_memory_rw_debug(CPUState *env, target_ulong addr,
744 uint8_t *buf, int len, int is_write); 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 /* read dirty bit (return 0 or 1) */ 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 return phys_ram_dirty[addr >> TARGET_PAGE_BITS] == 0xff; 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 int dirty_flags) 755 int dirty_flags)
756 { 756 {
757 return phys_ram_dirty[addr >> TARGET_PAGE_BITS] & dirty_flags; 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 phys_ram_dirty[addr >> TARGET_PAGE_BITS] = 0xff; 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 int dirty_flags); 766 int dirty_flags);
  767 +void cpu_tlb_update_dirty(CPUState *env);
767 768
768 void dump_exec_info(FILE *f, 769 void dump_exec_info(FILE *f,
769 int (*cpu_fprintf)(FILE *f, const char *fmt, ...)); 770 int (*cpu_fprintf)(FILE *f, const char *fmt, ...));