[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 10/28] target/arm: Move pmsav7_use_background_region to ptw.c
From: |
Richard Henderson |
Subject: |
[PATCH 10/28] target/arm: Move pmsav7_use_background_region to ptw.c |
Date: |
Fri, 3 Jun 2022 21:05:49 -0700 |
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/arm/ptw.h | 2 --
target/arm/helper.c | 19 -------------------
target/arm/ptw.c | 21 +++++++++++++++++++++
3 files changed, 21 insertions(+), 21 deletions(-)
diff --git a/target/arm/ptw.h b/target/arm/ptw.h
index 8d2e239714..d2d2711908 100644
--- a/target/arm/ptw.h
+++ b/target/arm/ptw.h
@@ -36,8 +36,6 @@ simple_ap_to_rw_prot(CPUARMState *env, ARMMMUIdx mmu_idx, int
ap)
bool m_is_ppb_region(CPUARMState *env, uint32_t address);
bool m_is_system_region(CPUARMState *env, uint32_t address);
-bool pmsav7_use_background_region(ARMCPU *cpu, ARMMMUIdx mmu_idx, bool
is_user);
-
bool get_phys_addr_lpae(CPUARMState *env, uint64_t address,
MMUAccessType access_type, ARMMMUIdx mmu_idx,
bool s1_is_el0,
diff --git a/target/arm/helper.c b/target/arm/helper.c
index a8186ac138..a2a5dab969 100644
--- a/target/arm/helper.c
+++ b/target/arm/helper.c
@@ -11642,25 +11642,6 @@ do_fault:
return true;
}
-bool pmsav7_use_background_region(ARMCPU *cpu, ARMMMUIdx mmu_idx, bool is_user)
-{
- /* Return true if we should use the default memory map as a
- * "background" region if there are no hits against any MPU regions.
- */
- CPUARMState *env = &cpu->env;
-
- if (is_user) {
- return false;
- }
-
- if (arm_feature(env, ARM_FEATURE_M)) {
- return env->v7m.mpu_ctrl[regime_is_secure(env, mmu_idx)]
- & R_V7M_MPU_CTRL_PRIVDEFENA_MASK;
- } else {
- return regime_sctlr(env, mmu_idx) & SCTLR_BR;
- }
-}
-
bool m_is_ppb_region(CPUARMState *env, uint32_t address)
{
/* True if address is in the M profile PPB region 0xe0000000 - 0xe00fffff
*/
diff --git a/target/arm/ptw.c b/target/arm/ptw.c
index 989e783cce..b82638b5a0 100644
--- a/target/arm/ptw.c
+++ b/target/arm/ptw.c
@@ -415,6 +415,27 @@ static void get_phys_addr_pmsav7_default(CPUARMState *env,
ARMMMUIdx mmu_idx,
}
}
+static bool pmsav7_use_background_region(ARMCPU *cpu, ARMMMUIdx mmu_idx,
+ bool is_user)
+{
+ /*
+ * Return true if we should use the default memory map as a
+ * "background" region if there are no hits against any MPU regions.
+ */
+ CPUARMState *env = &cpu->env;
+
+ if (is_user) {
+ return false;
+ }
+
+ if (arm_feature(env, ARM_FEATURE_M)) {
+ return env->v7m.mpu_ctrl[regime_is_secure(env, mmu_idx)]
+ & R_V7M_MPU_CTRL_PRIVDEFENA_MASK;
+ } else {
+ return regime_sctlr(env, mmu_idx) & SCTLR_BR;
+ }
+}
+
static bool get_phys_addr_pmsav7(CPUARMState *env, uint32_t address,
MMUAccessType access_type, ARMMMUIdx mmu_idx,
hwaddr *phys_ptr, int *prot,
--
2.34.1
- Re: [PATCH 01/28] target/arm: Move stage_1_mmu_idx decl to internals.h, (continued)
- [PATCH 03/28] target/arm: Move get_phys_addr_v5 to ptw.c, Richard Henderson, 2022/06/04
- [PATCH 02/28] target/arm: Move get_phys_addr to ptw.c, Richard Henderson, 2022/06/04
- [PATCH 04/28] target/arm: Move get_phys_addr_v6 to ptw.c, Richard Henderson, 2022/06/04
- [PATCH 08/28] target/arm: Move get_phys_addr_pmsav8 to ptw.c, Richard Henderson, 2022/06/04
- [PATCH 09/28] target/arm: Move pmsav8_mpu_lookup to ptw.c, Richard Henderson, 2022/06/04
- [PATCH 06/28] target/arm: Move get_phys_addr_pmsav7_default to ptw.c, Richard Henderson, 2022/06/04
- [PATCH 07/28] target/arm: Move get_phys_addr_pmsav7 to ptw.c, Richard Henderson, 2022/06/04
- [PATCH 12/28] target/arm: Move m_is_{ppb,system}_region to ptw.c, Richard Henderson, 2022/06/04
- [PATCH 05/28] target/arm: Move get_phys_addr_pmsav5 to ptw.c, Richard Henderson, 2022/06/04
- [PATCH 10/28] target/arm: Move pmsav7_use_background_region to ptw.c,
Richard Henderson <=
- [PATCH 11/28] target/arm: Move v8m_security_lookup to ptw.c, Richard Henderson, 2022/06/04
- [PATCH 13/28] target/arm: Move get_level1_table_address to ptw.c, Richard Henderson, 2022/06/04
- [PATCH 14/28] target/arm: Move combine_cacheattrs and subroutines to ptw.c, Richard Henderson, 2022/06/04
- [PATCH 15/28] target/arm: Move get_phys_addr_lpae to ptw.c, Richard Henderson, 2022/06/04
- [PATCH 16/28] target/arm: Move arm_{ldl,ldq}_ptw to ptw.c, Richard Henderson, 2022/06/04
- [PATCH 17/28] target/arm: Move {arm_s1_, }regime_using_lpae_format to tlb_helper.c, Richard Henderson, 2022/06/04
- [PATCH 18/28] target/arm: Move arm_pamax, pamax_map into ptw.c, Richard Henderson, 2022/06/04
- [PATCH 22/28] target/arm: Move ap_to_tw_prot etc to ptw.c, Richard Henderson, 2022/06/04
- [PATCH 20/28] target/arm: Move check_s2_mmu_setup to ptw.c, Richard Henderson, 2022/06/04
- [PATCH 19/28] target/arm: Move get_S1prot, get_S2prot to ptw.c, Richard Henderson, 2022/06/04