mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-01-22 13:01:05 +00:00
target/arm: Move regime_tcr to internals.h
We will shortly need this in mte_helper.c as well. Backports commit 38659d311d05e6c5feff6bddcc1c33b60d3b86a1 from qemu
This commit is contained in:
parent
e46cec8543
commit
4488858072
|
@ -9620,15 +9620,6 @@ static inline uint64_t regime_ttbr(CPUARMState *env, ARMMMUIdx mmu_idx,
|
||||||
|
|
||||||
#endif /* !CONFIG_USER_ONLY */
|
#endif /* !CONFIG_USER_ONLY */
|
||||||
|
|
||||||
/* Return the TCR controlling this translation regime */
|
|
||||||
static inline TCR *regime_tcr(CPUARMState *env, ARMMMUIdx mmu_idx)
|
|
||||||
{
|
|
||||||
if (mmu_idx == ARMMMUIdx_Stage2) {
|
|
||||||
return &env->cp15.vtcr_el2;
|
|
||||||
}
|
|
||||||
return &env->cp15.tcr_el[regime_el(env, mmu_idx)];
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Convert a possible stage1+2 MMU index into the appropriate
|
* Convert a possible stage1+2 MMU index into the appropriate
|
||||||
* stage 1 MMU index
|
* stage 1 MMU index
|
||||||
|
|
|
@ -950,6 +950,15 @@ static inline uint32_t regime_el(CPUARMState *env, ARMMMUIdx mmu_idx)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Return the TCR controlling this translation regime */
|
||||||
|
static inline TCR *regime_tcr(CPUARMState *env, ARMMMUIdx mmu_idx)
|
||||||
|
{
|
||||||
|
if (mmu_idx == ARMMMUIdx_Stage2) {
|
||||||
|
return &env->cp15.vtcr_el2;
|
||||||
|
}
|
||||||
|
return &env->cp15.tcr_el[regime_el(env, mmu_idx)];
|
||||||
|
}
|
||||||
|
|
||||||
/* Return the FSR value for a debug exception (watchpoint, hardware
|
/* Return the FSR value for a debug exception (watchpoint, hardware
|
||||||
* breakpoint or BKPT insn) targeting the specified exception level.
|
* breakpoint or BKPT insn) targeting the specified exception level.
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in a new issue