Commit 64be86ab authored by Richard Henderson's avatar Richard Henderson Committed by Peter Maydell
Browse files

target/arm: Introduce arm_stage1_mmu_idx



While we could expose stage_1_mmu_idx, the combination is
probably going to be more useful.

Reviewed-by: default avatarPeter Maydell <peter.maydell@linaro.org>
Signed-off-by: default avatarRichard Henderson <richard.henderson@linaro.org>
Message-id: 20190108223129.5570-18-richard.henderson@linaro.org
Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
parent 50494a27
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -12998,6 +12998,13 @@ int cpu_mmu_index(CPUARMState *env, bool ifetch)
    return arm_to_core_mmu_idx(arm_mmu_idx(env));
}

#ifndef CONFIG_USER_ONLY
ARMMMUIdx arm_stage1_mmu_idx(CPUARMState *env)
{
    return stage_1_mmu_idx(arm_mmu_idx(env));
}
#endif

void cpu_get_tb_cpu_state(CPUARMState *env, target_ulong *pc,
                          target_ulong *cs_base, uint32_t *pflags)
{
+15 −0
Original line number Diff line number Diff line
@@ -927,4 +927,19 @@ void arm_cpu_update_vfiq(ARMCPU *cpu);
 */
ARMMMUIdx arm_mmu_idx(CPUARMState *env);

/**
 * arm_stage1_mmu_idx:
 * @env: The cpu environment
 *
 * Return the ARMMMUIdx for the stage1 traversal for the current regime.
 */
#ifdef CONFIG_USER_ONLY
static inline ARMMMUIdx arm_stage1_mmu_idx(CPUARMState *env)
{
    return ARMMMUIdx_S1NSE0;
}
#else
ARMMMUIdx arm_stage1_mmu_idx(CPUARMState *env);
#endif

#endif