mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-03-23 02:55:06 +00:00
target-arm: Change reset to highest available EL
Update to arm_cpu_reset() to reset into the highest available exception level based on the set ARM features. Backports commit 5097227c15aa89baec1123aac25dd9500a62684d from qemu
This commit is contained in:
parent
2cce33295b
commit
cce21771b3
|
@ -109,7 +109,14 @@ static void arm_cpu_reset(CPUState *s)
|
|||
/* and to the FP/Neon instructions */
|
||||
env->cp15.c1_coproc = deposit64(env->cp15.c1_coproc, 20, 2, 3);
|
||||
#else
|
||||
env->pstate = PSTATE_MODE_EL1h;
|
||||
/* Reset into the highest available EL */
|
||||
if (arm_feature(env, ARM_FEATURE_EL3)) {
|
||||
env->pstate = PSTATE_MODE_EL3h;
|
||||
} else if (arm_feature(env, ARM_FEATURE_EL2)) {
|
||||
env->pstate = PSTATE_MODE_EL2h;
|
||||
} else {
|
||||
env->pstate = PSTATE_MODE_EL1h;
|
||||
}
|
||||
env->pc = cpu->rvbar;
|
||||
#endif
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue