target/arm: Add is_secure parameter to get_phys_addr_v6
Remove the use of regime_is_secure from get_phys_addr_v6, passing the new parameter to the lookup instead. Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20220822152741.1617527-15-richard.henderson@linaro.org Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
b29c85d50c
commit
71e73beb51
|
@ -533,7 +533,8 @@ do_fault:
|
||||||
|
|
||||||
static bool get_phys_addr_v6(CPUARMState *env, uint32_t address,
|
static bool get_phys_addr_v6(CPUARMState *env, uint32_t address,
|
||||||
MMUAccessType access_type, ARMMMUIdx mmu_idx,
|
MMUAccessType access_type, ARMMMUIdx mmu_idx,
|
||||||
GetPhysAddrResult *result, ARMMMUFaultInfo *fi)
|
bool is_secure, GetPhysAddrResult *result,
|
||||||
|
ARMMMUFaultInfo *fi)
|
||||||
{
|
{
|
||||||
ARMCPU *cpu = env_archcpu(env);
|
ARMCPU *cpu = env_archcpu(env);
|
||||||
int level = 1;
|
int level = 1;
|
||||||
|
@ -556,8 +557,7 @@ static bool get_phys_addr_v6(CPUARMState *env, uint32_t address,
|
||||||
fi->type = ARMFault_Translation;
|
fi->type = ARMFault_Translation;
|
||||||
goto do_fault;
|
goto do_fault;
|
||||||
}
|
}
|
||||||
desc = arm_ldl_ptw(env, table, regime_is_secure(env, mmu_idx),
|
desc = arm_ldl_ptw(env, table, is_secure, mmu_idx, fi);
|
||||||
mmu_idx, fi);
|
|
||||||
if (fi->type != ARMFault_None) {
|
if (fi->type != ARMFault_None) {
|
||||||
goto do_fault;
|
goto do_fault;
|
||||||
}
|
}
|
||||||
|
@ -610,8 +610,7 @@ static bool get_phys_addr_v6(CPUARMState *env, uint32_t address,
|
||||||
ns = extract32(desc, 3, 1);
|
ns = extract32(desc, 3, 1);
|
||||||
/* Lookup l2 entry. */
|
/* Lookup l2 entry. */
|
||||||
table = (desc & 0xfffffc00) | ((address >> 10) & 0x3fc);
|
table = (desc & 0xfffffc00) | ((address >> 10) & 0x3fc);
|
||||||
desc = arm_ldl_ptw(env, table, regime_is_secure(env, mmu_idx),
|
desc = arm_ldl_ptw(env, table, is_secure, mmu_idx, fi);
|
||||||
mmu_idx, fi);
|
|
||||||
if (fi->type != ARMFault_None) {
|
if (fi->type != ARMFault_None) {
|
||||||
goto do_fault;
|
goto do_fault;
|
||||||
}
|
}
|
||||||
|
@ -2512,7 +2511,7 @@ bool get_phys_addr(CPUARMState *env, target_ulong address,
|
||||||
result, fi);
|
result, fi);
|
||||||
} else if (regime_sctlr(env, mmu_idx) & SCTLR_XP) {
|
} else if (regime_sctlr(env, mmu_idx) & SCTLR_XP) {
|
||||||
return get_phys_addr_v6(env, address, access_type, mmu_idx,
|
return get_phys_addr_v6(env, address, access_type, mmu_idx,
|
||||||
result, fi);
|
is_secure, result, fi);
|
||||||
} else {
|
} else {
|
||||||
return get_phys_addr_v5(env, address, access_type, mmu_idx,
|
return get_phys_addr_v5(env, address, access_type, mmu_idx,
|
||||||
is_secure, result, fi);
|
is_secure, result, fi);
|
||||||
|
|
Loading…
Reference in New Issue