[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 23/62] target/arm: Add is_secure parameter to pmsav7_use_backgrou
From: |
Richard Henderson |
Subject: |
[PATCH 23/62] target/arm: Add is_secure parameter to pmsav7_use_background_region |
Date: |
Sun, 3 Jul 2022 13:53:40 +0530 |
Remove the use of regime_is_secure from pmsav7_use_background_region.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/arm/ptw.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/target/arm/ptw.c b/target/arm/ptw.c
index f7892a0c48..23cfccce6c 100644
--- a/target/arm/ptw.c
+++ b/target/arm/ptw.c
@@ -1485,7 +1485,7 @@ static bool m_is_system_region(CPUARMState *env, uint32_t
address)
}
static bool pmsav7_use_background_region(ARMCPU *cpu, ARMMMUIdx mmu_idx,
- bool is_user)
+ bool is_secure, bool is_user)
{
/*
* Return true if we should use the default memory map as a
@@ -1498,8 +1498,7 @@ static bool pmsav7_use_background_region(ARMCPU *cpu,
ARMMMUIdx mmu_idx,
}
if (arm_feature(env, ARM_FEATURE_M)) {
- return env->v7m.mpu_ctrl[regime_is_secure(env, mmu_idx)]
- & R_V7M_MPU_CTRL_PRIVDEFENA_MASK;
+ return env->v7m.mpu_ctrl[is_secure] & R_V7M_MPU_CTRL_PRIVDEFENA_MASK;
} else {
return regime_sctlr(env, mmu_idx) & SCTLR_BR;
}
@@ -1512,6 +1511,7 @@ static bool get_phys_addr_pmsav7(CPUARMState *env,
uint32_t address,
{
ARMCPU *cpu = env_archcpu(env);
int n;
+ bool secure = regime_is_secure(env, mmu_idx);
bool is_user = regime_is_user(env, mmu_idx);
result->phys = address;
@@ -1614,7 +1614,7 @@ static bool get_phys_addr_pmsav7(CPUARMState *env,
uint32_t address,
}
if (n == -1) { /* no hits */
- if (!pmsav7_use_background_region(cpu, mmu_idx, is_user)) {
+ if (!pmsav7_use_background_region(cpu, mmu_idx, secure, is_user)) {
/* background fault */
fi->type = ARMFault_Background;
return true;
@@ -1734,7 +1734,7 @@ bool pmsav8_mpu_lookup(CPUARMState *env, uint32_t address,
} else if (m_is_ppb_region(env, address)) {
hit = true;
} else {
- if (pmsav7_use_background_region(cpu, mmu_idx, is_user)) {
+ if (pmsav7_use_background_region(cpu, mmu_idx, secure, is_user)) {
hit = true;
}
--
2.34.1
- [PATCH 15/62] target/arm: Use GetPhysAddrResult in get_phys_addr_pmsav8, (continued)
- [PATCH 15/62] target/arm: Use GetPhysAddrResult in get_phys_addr_pmsav8, Richard Henderson, 2022/07/03
- [PATCH 17/62] target/arm: Remove is_subpage argument to pmsav8_mpu_lookup, Richard Henderson, 2022/07/03
- [PATCH 18/62] target/arm: Add is_secure parameter to v8m_security_lookup, Richard Henderson, 2022/07/03
- [PATCH 19/62] target/arm: Add is_secure parameter to pmsav8_mpu_lookup, Richard Henderson, 2022/07/03
- [PATCH 20/62] target/arm: Add is_secure parameter to get_phys_addr_v5, Richard Henderson, 2022/07/03
- [PATCH 21/62] target/arm: Add is_secure parameter to get_phys_addr_v6, Richard Henderson, 2022/07/03
- [PATCH 22/62] target/arm: Add secure parameter to get_phys_addr_pmsav8, Richard Henderson, 2022/07/03
- [PATCH 25/62] target/arm: Add is_secure parameter to get_phys_addr_pmsav7, Richard Henderson, 2022/07/03
- [PATCH 24/62] target/arm: Add is_secure parameter to get_phys_addr_lpae, Richard Henderson, 2022/07/03
- [PATCH 26/62] target/arm: Add is_secure parameter to regime_translation_disabled, Richard Henderson, 2022/07/03
- [PATCH 23/62] target/arm: Add is_secure parameter to pmsav7_use_background_region,
Richard Henderson <=
- [PATCH 27/62] target/arm: Add is_secure parameter to get_phys_addr_pmsav5, Richard Henderson, 2022/07/03
- [PATCH 28/62] target/arm: Split out get_phys_addr_with_secure, Richard Henderson, 2022/07/03
- [PATCH 29/62] target/arm: Add is_secure parameter to v7m_read_half_insn, Richard Henderson, 2022/07/03
- [PATCH 30/62] target/arm: Add TBFLAG_M32.SECURE, Richard Henderson, 2022/07/03
- [PATCH 31/62] target/arm: Merge regime_is_secure into get_phys_addr, Richard Henderson, 2022/07/03
- [PATCH 32/62] target/arm: Add is_secure parameter to do_ats_write, Richard Henderson, 2022/07/03
- [PATCH 33/62] target/arm: Fold secure and non-secure a-profile mmu indexes, Richard Henderson, 2022/07/03
- [PATCH 34/62] target/arm: Reorg regime_translation_disabled, Richard Henderson, 2022/07/03
- [PATCH 35/62] target/arm: Drop secure check for HCR.TGE vs SCTLR_EL1.M, Richard Henderson, 2022/07/03
- [PATCH 36/62] target/arm: Introduce arm_hcr_el2_eff_secstate, Richard Henderson, 2022/07/03