mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-07-03 17:10:29 +00:00
target/arm: Introduce arm_stage1_mmu_idx
While we could expose stage_1_mmu_idx, the combination is probably going to be more useful. Backports commit 64be86ab1b5ef10b660a4230ee7f27c0da499043 from qemu
This commit is contained in:
parent
9743787d0f
commit
377bd123bd
|
@ -3291,6 +3291,7 @@
|
||||||
#define arm_reset_cpu arm_reset_cpu_aarch64
|
#define arm_reset_cpu arm_reset_cpu_aarch64
|
||||||
#define arm_set_cpu_off arm_set_cpu_off_aarch64
|
#define arm_set_cpu_off arm_set_cpu_off_aarch64
|
||||||
#define arm_set_cpu_on arm_set_cpu_on_aarch64
|
#define arm_set_cpu_on arm_set_cpu_on_aarch64
|
||||||
|
#define arm_stage1_mmu_idx arm_stage1_mmu_idx_aarch64
|
||||||
#define bif_op bif_op_aarch64
|
#define bif_op bif_op_aarch64
|
||||||
#define bit_op bit_op_aarch64
|
#define bit_op bit_op_aarch64
|
||||||
#define bsl_op bsl_op_aarch64
|
#define bsl_op bsl_op_aarch64
|
||||||
|
|
|
@ -3291,6 +3291,7 @@
|
||||||
#define arm_reset_cpu arm_reset_cpu_aarch64eb
|
#define arm_reset_cpu arm_reset_cpu_aarch64eb
|
||||||
#define arm_set_cpu_off arm_set_cpu_off_aarch64eb
|
#define arm_set_cpu_off arm_set_cpu_off_aarch64eb
|
||||||
#define arm_set_cpu_on arm_set_cpu_on_aarch64eb
|
#define arm_set_cpu_on arm_set_cpu_on_aarch64eb
|
||||||
|
#define arm_stage1_mmu_idx arm_stage1_mmu_idx_aarch64eb
|
||||||
#define bif_op bif_op_aarch64eb
|
#define bif_op bif_op_aarch64eb
|
||||||
#define bit_op bit_op_aarch64eb
|
#define bit_op bit_op_aarch64eb
|
||||||
#define bsl_op bsl_op_aarch64eb
|
#define bsl_op bsl_op_aarch64eb
|
||||||
|
|
|
@ -3283,6 +3283,7 @@
|
||||||
#define arm_reset_cpu arm_reset_cpu_arm
|
#define arm_reset_cpu arm_reset_cpu_arm
|
||||||
#define arm_set_cpu_off arm_set_cpu_off_arm
|
#define arm_set_cpu_off arm_set_cpu_off_arm
|
||||||
#define arm_set_cpu_on arm_set_cpu_on_arm
|
#define arm_set_cpu_on arm_set_cpu_on_arm
|
||||||
|
#define arm_stage1_mmu_idx arm_stage1_mmu_idx_arm
|
||||||
#define cmtst_op cmtst_op_arm
|
#define cmtst_op cmtst_op_arm
|
||||||
#define fp_exception_el fp_exception_el_arm
|
#define fp_exception_el fp_exception_el_arm
|
||||||
#define gen_cmtst_i64 gen_cmtst_i64_arm
|
#define gen_cmtst_i64 gen_cmtst_i64_arm
|
||||||
|
|
|
@ -3283,6 +3283,7 @@
|
||||||
#define arm_reset_cpu arm_reset_cpu_armeb
|
#define arm_reset_cpu arm_reset_cpu_armeb
|
||||||
#define arm_set_cpu_off arm_set_cpu_off_armeb
|
#define arm_set_cpu_off arm_set_cpu_off_armeb
|
||||||
#define arm_set_cpu_on arm_set_cpu_on_armeb
|
#define arm_set_cpu_on arm_set_cpu_on_armeb
|
||||||
|
#define arm_stage1_mmu_idx arm_stage1_mmu_idx_armeb
|
||||||
#define cmtst_op cmtst_op_armeb
|
#define cmtst_op cmtst_op_armeb
|
||||||
#define fp_exception_el fp_exception_el_armeb
|
#define fp_exception_el fp_exception_el_armeb
|
||||||
#define gen_cmtst_i64 gen_cmtst_i64_armeb
|
#define gen_cmtst_i64 gen_cmtst_i64_armeb
|
||||||
|
|
|
@ -3292,6 +3292,7 @@ arm_symbols = (
|
||||||
'arm_reset_cpu',
|
'arm_reset_cpu',
|
||||||
'arm_set_cpu_off',
|
'arm_set_cpu_off',
|
||||||
'arm_set_cpu_on',
|
'arm_set_cpu_on',
|
||||||
|
'arm_stage1_mmu_idx',
|
||||||
'cmtst_op',
|
'cmtst_op',
|
||||||
'fp_exception_el',
|
'fp_exception_el',
|
||||||
'gen_cmtst_i64',
|
'gen_cmtst_i64',
|
||||||
|
@ -3329,6 +3330,7 @@ aarch64_symbols = (
|
||||||
'arm_reset_cpu',
|
'arm_reset_cpu',
|
||||||
'arm_set_cpu_off',
|
'arm_set_cpu_off',
|
||||||
'arm_set_cpu_on',
|
'arm_set_cpu_on',
|
||||||
|
'arm_stage1_mmu_idx',
|
||||||
'bif_op',
|
'bif_op',
|
||||||
'bit_op',
|
'bit_op',
|
||||||
'bsl_op',
|
'bsl_op',
|
||||||
|
|
|
@ -12205,6 +12205,13 @@ int cpu_mmu_index(CPUARMState *env, bool ifetch)
|
||||||
return arm_to_core_mmu_idx(arm_mmu_idx(env));
|
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,
|
void cpu_get_tb_cpu_state(CPUARMState *env, target_ulong *pc,
|
||||||
target_ulong *cs_base, uint32_t *pflags)
|
target_ulong *cs_base, uint32_t *pflags)
|
||||||
{
|
{
|
||||||
|
|
|
@ -929,4 +929,19 @@ void arm_cpu_update_vfiq(ARMCPU *cpu);
|
||||||
*/
|
*/
|
||||||
ARMMMUIdx arm_mmu_idx(CPUARMState *env);
|
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
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue