mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 08:13:54 -06:00
target/arm: Move regime_ttbr to ptw.c
Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20220604040607.269301-25-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
0c23d56fc1
commit
3b318aaeef
3 changed files with 16 additions and 17 deletions
|
@ -10475,22 +10475,6 @@ bool regime_translation_disabled(CPUARMState *env, ARMMMUIdx mmu_idx)
|
|||
return (regime_sctlr(env, mmu_idx) & SCTLR_M) == 0;
|
||||
}
|
||||
|
||||
/* Return the TTBR associated with this translation regime */
|
||||
uint64_t regime_ttbr(CPUARMState *env, ARMMMUIdx mmu_idx, int ttbrn)
|
||||
{
|
||||
if (mmu_idx == ARMMMUIdx_Stage2) {
|
||||
return env->cp15.vttbr_el2;
|
||||
}
|
||||
if (mmu_idx == ARMMMUIdx_Stage2_S) {
|
||||
return env->cp15.vsttbr_el2;
|
||||
}
|
||||
if (ttbrn == 0) {
|
||||
return env->cp15.ttbr0_el[regime_el(env, mmu_idx)];
|
||||
} else {
|
||||
return env->cp15.ttbr1_el[regime_el(env, mmu_idx)];
|
||||
}
|
||||
}
|
||||
|
||||
/* Convert a possible stage1+2 MMU index into the appropriate
|
||||
* stage 1 MMU index
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue