mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-02-02 05:30:59 +00:00
target/arm: Split out arm_mmu_idx_el
Backports commit 164690b29f9eaf69fe641859bc9f8954f12e691d from qemu
This commit is contained in:
parent
f4397b0212
commit
3d583cd45f
|
@ -3405,6 +3405,7 @@
|
|||
#define arm_v7m_mmu_idx_for_secstate_and_priv arm_v7m_mmu_idx_for_secstate_and_priv_aarch64
|
||||
#define arm_hcr_el2_eff arm_hcr_el2_eff_aarch64
|
||||
#define arm_mmu_idx arm_mmu_idx_aarch64
|
||||
#define arm_mmu_idx_el arm_mmu_idx_el_aarch64
|
||||
#define arm_mmu_idx_to_el arm_mmu_idx_to_el_aarch64
|
||||
#define arm_register_pre_el_change_hook arm_register_pre_el_change_hook_aarch64
|
||||
#define arm_register_el_change_hook arm_register_el_change_hook_aarch64
|
||||
|
|
|
@ -3405,6 +3405,7 @@
|
|||
#define arm_v7m_mmu_idx_for_secstate_and_priv arm_v7m_mmu_idx_for_secstate_and_priv_aarch64eb
|
||||
#define arm_hcr_el2_eff arm_hcr_el2_eff_aarch64eb
|
||||
#define arm_mmu_idx arm_mmu_idx_aarch64eb
|
||||
#define arm_mmu_idx_el arm_mmu_idx_el_aarch64eb
|
||||
#define arm_mmu_idx_to_el arm_mmu_idx_to_el_aarch64eb
|
||||
#define arm_register_pre_el_change_hook arm_register_pre_el_change_hook_aarch64eb
|
||||
#define arm_register_el_change_hook arm_register_el_change_hook_aarch64eb
|
||||
|
|
|
@ -3397,6 +3397,7 @@
|
|||
#define ARM_REGS_STORAGE_SIZE ARM_REGS_STORAGE_SIZE_arm
|
||||
#define arm_hcr_el2_eff arm_hcr_el2_eff_arm
|
||||
#define arm_mmu_idx arm_mmu_idx_arm
|
||||
#define arm_mmu_idx_el arm_mmu_idx_el_arm
|
||||
#define arm_mmu_idx_to_el arm_mmu_idx_to_el_arm
|
||||
#define arm_register_pre_el_change_hook arm_register_pre_el_change_hook_arm
|
||||
#define arm_register_el_change_hook arm_register_el_change_hook_arm
|
||||
|
|
|
@ -3397,6 +3397,7 @@
|
|||
#define ARM_REGS_STORAGE_SIZE ARM_REGS_STORAGE_SIZE_armeb
|
||||
#define arm_hcr_el2_eff arm_hcr_el2_eff_armeb
|
||||
#define arm_mmu_idx arm_mmu_idx_armeb
|
||||
#define arm_mmu_idx_el arm_mmu_idx_el_armeb
|
||||
#define arm_mmu_idx_to_el arm_mmu_idx_to_el_armeb
|
||||
#define arm_register_pre_el_change_hook arm_register_pre_el_change_hook_armeb
|
||||
#define arm_register_el_change_hook arm_register_el_change_hook_armeb
|
||||
|
|
|
@ -3406,6 +3406,7 @@ arm_symbols = (
|
|||
'ARM_REGS_STORAGE_SIZE',
|
||||
'arm_hcr_el2_eff',
|
||||
'arm_mmu_idx',
|
||||
'arm_mmu_idx_el',
|
||||
'arm_mmu_idx_to_el',
|
||||
'arm_register_pre_el_change_hook',
|
||||
'arm_register_el_change_hook',
|
||||
|
@ -3463,6 +3464,7 @@ aarch64_symbols = (
|
|||
'arm_v7m_mmu_idx_for_secstate_and_priv',
|
||||
'arm_hcr_el2_eff',
|
||||
'arm_mmu_idx',
|
||||
'arm_mmu_idx_el',
|
||||
'arm_mmu_idx_to_el',
|
||||
'arm_register_pre_el_change_hook',
|
||||
'arm_register_el_change_hook',
|
||||
|
|
|
@ -11182,15 +11182,14 @@ ARMMMUIdx arm_v7m_mmu_idx_for_secstate(CPUARMState *env, bool secstate)
|
|||
}
|
||||
#endif
|
||||
|
||||
ARMMMUIdx arm_mmu_idx(CPUARMState *env)
|
||||
{
|
||||
int el;
|
||||
|
||||
|
||||
ARMMMUIdx arm_mmu_idx_el(CPUARMState *env, int el)
|
||||
{
|
||||
if (arm_feature(env, ARM_FEATURE_M)) {
|
||||
return arm_v7m_mmu_idx_for_secstate(env, env->v7m.secure);
|
||||
}
|
||||
|
||||
el = arm_current_el(env);
|
||||
switch (el) {
|
||||
case 0:
|
||||
/* TODO: ARMv8.1-VHE */
|
||||
|
@ -11214,6 +11213,11 @@ ARMMMUIdx arm_mmu_idx(CPUARMState *env)
|
|||
}
|
||||
}
|
||||
|
||||
ARMMMUIdx arm_mmu_idx(CPUARMState *env)
|
||||
{
|
||||
return arm_mmu_idx_el(env, arm_current_el(env));
|
||||
}
|
||||
|
||||
int cpu_mmu_index(CPUARMState *env, bool ifetch)
|
||||
{
|
||||
return arm_to_core_mmu_idx(arm_mmu_idx(env));
|
||||
|
|
|
@ -1002,6 +1002,15 @@ void arm_cpu_update_virq(ARMCPU *cpu);
|
|||
*/
|
||||
void arm_cpu_update_vfiq(ARMCPU *cpu);
|
||||
|
||||
/**
|
||||
* arm_mmu_idx_el:
|
||||
* @env: The cpu environment
|
||||
* @el: The EL to use.
|
||||
*
|
||||
* Return the full ARMMMUIdx for the translation regime for EL.
|
||||
*/
|
||||
ARMMMUIdx arm_mmu_idx_el(CPUARMState *env, int el);
|
||||
|
||||
/**
|
||||
* arm_mmu_idx:
|
||||
* @env: The cpu environment
|
||||
|
|
Loading…
Reference in a new issue