target-mips: fix physical address type in MMU functions

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
This commit is contained in:
Aurelien Jarno 2009-11-22 14:37:04 +01:00
parent c0d674b56e
commit 60c9af07aa
2 changed files with 11 additions and 11 deletions

View File

@ -40,7 +40,7 @@ typedef struct CPUMIPSTLBContext CPUMIPSTLBContext;
struct CPUMIPSTLBContext { struct CPUMIPSTLBContext {
uint32_t nb_tlb; uint32_t nb_tlb;
uint32_t tlb_in_use; uint32_t tlb_in_use;
int (*map_address) (struct CPUMIPSState *env, target_ulong *physical, int *prot, target_ulong address, int rw, int access_type); int (*map_address) (struct CPUMIPSState *env, target_phys_addr_t *physical, int *prot, target_ulong address, int rw, int access_type);
void (*helper_tlbwi) (void); void (*helper_tlbwi) (void);
void (*helper_tlbwr) (void); void (*helper_tlbwr) (void);
void (*helper_tlbp) (void); void (*helper_tlbp) (void);
@ -466,11 +466,11 @@ struct CPUMIPSState {
struct QEMUTimer *timer; /* Internal timer */ struct QEMUTimer *timer; /* Internal timer */
}; };
int no_mmu_map_address (CPUMIPSState *env, target_ulong *physical, int *prot, int no_mmu_map_address (CPUMIPSState *env, target_phys_addr_t *physical, int *prot,
target_ulong address, int rw, int access_type); target_ulong address, int rw, int access_type);
int fixed_mmu_map_address (CPUMIPSState *env, target_ulong *physical, int *prot, int fixed_mmu_map_address (CPUMIPSState *env, target_phys_addr_t *physical, int *prot,
target_ulong address, int rw, int access_type); target_ulong address, int rw, int access_type);
int r4k_map_address (CPUMIPSState *env, target_ulong *physical, int *prot, int r4k_map_address (CPUMIPSState *env, target_phys_addr_t *physical, int *prot,
target_ulong address, int rw, int access_type); target_ulong address, int rw, int access_type);
void r4k_helper_tlbwi (void); void r4k_helper_tlbwi (void);
void r4k_helper_tlbwr (void); void r4k_helper_tlbwr (void);

View File

@ -35,7 +35,7 @@ enum {
}; };
/* no MMU emulation */ /* no MMU emulation */
int no_mmu_map_address (CPUState *env, target_ulong *physical, int *prot, int no_mmu_map_address (CPUState *env, target_phys_addr_t *physical, int *prot,
target_ulong address, int rw, int access_type) target_ulong address, int rw, int access_type)
{ {
*physical = address; *physical = address;
@ -44,7 +44,7 @@ int no_mmu_map_address (CPUState *env, target_ulong *physical, int *prot,
} }
/* fixed mapping MMU emulation */ /* fixed mapping MMU emulation */
int fixed_mmu_map_address (CPUState *env, target_ulong *physical, int *prot, int fixed_mmu_map_address (CPUState *env, target_phys_addr_t *physical, int *prot,
target_ulong address, int rw, int access_type) target_ulong address, int rw, int access_type)
{ {
if (address <= (int32_t)0x7FFFFFFFUL) { if (address <= (int32_t)0x7FFFFFFFUL) {
@ -62,7 +62,7 @@ int fixed_mmu_map_address (CPUState *env, target_ulong *physical, int *prot,
} }
/* MIPS32/MIPS64 R4000-style MMU emulation */ /* MIPS32/MIPS64 R4000-style MMU emulation */
int r4k_map_address (CPUState *env, target_ulong *physical, int *prot, int r4k_map_address (CPUState *env, target_phys_addr_t *physical, int *prot,
target_ulong address, int rw, int access_type) target_ulong address, int rw, int access_type)
{ {
uint8_t ASID = env->CP0_EntryHi & 0xFF; uint8_t ASID = env->CP0_EntryHi & 0xFF;
@ -99,7 +99,7 @@ int r4k_map_address (CPUState *env, target_ulong *physical, int *prot,
} }
#if !defined(CONFIG_USER_ONLY) #if !defined(CONFIG_USER_ONLY)
static int get_physical_address (CPUState *env, target_ulong *physical, static int get_physical_address (CPUState *env, target_phys_addr_t *physical,
int *prot, target_ulong address, int *prot, target_ulong address,
int rw, int access_type) int rw, int access_type)
{ {
@ -206,7 +206,7 @@ target_phys_addr_t cpu_get_phys_page_debug(CPUState *env, target_ulong addr)
#if defined(CONFIG_USER_ONLY) #if defined(CONFIG_USER_ONLY)
return addr; return addr;
#else #else
target_ulong phys_addr; target_phys_addr_t phys_addr;
int prot; int prot;
if (get_physical_address(env, &phys_addr, &prot, addr, 0, ACCESS_INT) != 0) if (get_physical_address(env, &phys_addr, &prot, addr, 0, ACCESS_INT) != 0)
@ -219,7 +219,7 @@ int cpu_mips_handle_mmu_fault (CPUState *env, target_ulong address, int rw,
int mmu_idx, int is_softmmu) int mmu_idx, int is_softmmu)
{ {
#if !defined(CONFIG_USER_ONLY) #if !defined(CONFIG_USER_ONLY)
target_ulong physical; target_phys_addr_t physical;
int prot; int prot;
#endif #endif
int exception = 0, error_code = 0; int exception = 0, error_code = 0;
@ -243,7 +243,7 @@ int cpu_mips_handle_mmu_fault (CPUState *env, target_ulong address, int rw,
#else #else
ret = get_physical_address(env, &physical, &prot, ret = get_physical_address(env, &physical, &prot,
address, rw, access_type); address, rw, access_type);
qemu_log("%s address=" TARGET_FMT_lx " ret %d physical " TARGET_FMT_lx " prot %d\n", qemu_log("%s address=" TARGET_FMT_lx " ret %d physical " TARGET_FMT_plx " prot %d\n",
__func__, address, ret, physical, prot); __func__, address, ret, physical, prot);
if (ret == TLBRET_MATCH) { if (ret == TLBRET_MATCH) {
ret = tlb_set_page(env, address & TARGET_PAGE_MASK, ret = tlb_set_page(env, address & TARGET_PAGE_MASK,