mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2024-12-24 01:15:28 +00:00
target-arm: Add Hyp mode checks to bad_mode_switch()
We don't actually support Hyp mode yet, but add the correct checks for it to the bad_mode_switch() function for completeness. Backports commit e6c8fc07b4fce0729bb747770756835f4b0ca7f4 from qemu
This commit is contained in:
parent
339e3e340e
commit
4919c7287c
|
@ -4521,6 +4521,9 @@ static int bad_mode_switch(CPUARMState *env, int mode)
|
||||||
* allows FIQ mode to be Secure-only. (In v8 this doesn't exist.)
|
* allows FIQ mode to be Secure-only. (In v8 this doesn't exist.)
|
||||||
*/
|
*/
|
||||||
return 0;
|
return 0;
|
||||||
|
case ARM_CPU_MODE_HYP:
|
||||||
|
return !arm_feature(env, ARM_FEATURE_EL2)
|
||||||
|
|| arm_current_el(env) < 2 || arm_is_secure(env);
|
||||||
case ARM_CPU_MODE_MON:
|
case ARM_CPU_MODE_MON:
|
||||||
return !arm_is_secure(env);
|
return !arm_is_secure(env);
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in a new issue