mirror of https://github.com/xemu-project/xemu.git
target/mips: Restrict CPUMIPSTLBContext::map_address() handlers scope
The 3 map_address() handlers are local to tlb_helper.c, no need to have their prototype declared publically. Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20210428170410.479308-23-f4bug@amsat.org>
This commit is contained in:
parent
920b48cc14
commit
f3185ec2f3
|
@ -152,12 +152,6 @@ struct CPUMIPSTLBContext {
|
||||||
} mmu;
|
} mmu;
|
||||||
};
|
};
|
||||||
|
|
||||||
int no_mmu_map_address(CPUMIPSState *env, hwaddr *physical, int *prot,
|
|
||||||
target_ulong address, MMUAccessType access_type);
|
|
||||||
int fixed_mmu_map_address(CPUMIPSState *env, hwaddr *physical, int *prot,
|
|
||||||
target_ulong address, MMUAccessType access_type);
|
|
||||||
int r4k_map_address(CPUMIPSState *env, hwaddr *physical, int *prot,
|
|
||||||
target_ulong address, MMUAccessType access_type);
|
|
||||||
void r4k_helper_tlbwi(CPUMIPSState *env);
|
void r4k_helper_tlbwi(CPUMIPSState *env);
|
||||||
void r4k_helper_tlbwr(CPUMIPSState *env);
|
void r4k_helper_tlbwr(CPUMIPSState *env);
|
||||||
void r4k_helper_tlbp(CPUMIPSState *env);
|
void r4k_helper_tlbp(CPUMIPSState *env);
|
||||||
|
|
|
@ -26,8 +26,8 @@
|
||||||
#include "hw/mips/cpudevs.h"
|
#include "hw/mips/cpudevs.h"
|
||||||
|
|
||||||
/* no MMU emulation */
|
/* no MMU emulation */
|
||||||
int no_mmu_map_address(CPUMIPSState *env, hwaddr *physical, int *prot,
|
static int no_mmu_map_address(CPUMIPSState *env, hwaddr *physical, int *prot,
|
||||||
target_ulong address, MMUAccessType access_type)
|
target_ulong address, MMUAccessType access_type)
|
||||||
{
|
{
|
||||||
*physical = address;
|
*physical = address;
|
||||||
*prot = PAGE_READ | PAGE_WRITE | PAGE_EXEC;
|
*prot = PAGE_READ | PAGE_WRITE | PAGE_EXEC;
|
||||||
|
@ -35,8 +35,9 @@ int no_mmu_map_address(CPUMIPSState *env, hwaddr *physical, int *prot,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* fixed mapping MMU emulation */
|
/* fixed mapping MMU emulation */
|
||||||
int fixed_mmu_map_address(CPUMIPSState *env, hwaddr *physical, int *prot,
|
static int fixed_mmu_map_address(CPUMIPSState *env, hwaddr *physical,
|
||||||
target_ulong address, MMUAccessType access_type)
|
int *prot, target_ulong address,
|
||||||
|
MMUAccessType access_type)
|
||||||
{
|
{
|
||||||
if (address <= (int32_t)0x7FFFFFFFUL) {
|
if (address <= (int32_t)0x7FFFFFFFUL) {
|
||||||
if (!(env->CP0_Status & (1 << CP0St_ERL))) {
|
if (!(env->CP0_Status & (1 << CP0St_ERL))) {
|
||||||
|
@ -55,8 +56,8 @@ int fixed_mmu_map_address(CPUMIPSState *env, hwaddr *physical, int *prot,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* MIPS32/MIPS64 R4000-style MMU emulation */
|
/* MIPS32/MIPS64 R4000-style MMU emulation */
|
||||||
int r4k_map_address(CPUMIPSState *env, hwaddr *physical, int *prot,
|
static int r4k_map_address(CPUMIPSState *env, hwaddr *physical, int *prot,
|
||||||
target_ulong address, MMUAccessType access_type)
|
target_ulong address, MMUAccessType access_type)
|
||||||
{
|
{
|
||||||
uint16_t ASID = env->CP0_EntryHi & env->CP0_EntryHi_ASID_mask;
|
uint16_t ASID = env->CP0_EntryHi & env->CP0_EntryHi_ASID_mask;
|
||||||
uint32_t MMID = env->CP0_MemoryMapID;
|
uint32_t MMID = env->CP0_MemoryMapID;
|
||||||
|
|
Loading…
Reference in New Issue