Message ID | 1399997768-32014-9-git-send-email-aggelerf@ethz.ch |
---|---|
State | New |
Headers | show |
diff --git a/target-arm/cpu.h b/target-arm/cpu.h index 6ea0432..717b2e7 100644 --- a/target-arm/cpu.h +++ b/target-arm/cpu.h @@ -853,9 +853,12 @@ static inline int arm_current_pl(CPUARMState *env) if ((env->uncached_cpsr & 0x1f) == ARM_CPU_MODE_USR) { return 0; + } else if (arm_is_secure(env)) { + /* Secure PL1 and monitor mode are mapped to PL3 */ + return 3; } - /* We don't currently implement the Virtualization or TrustZone - * extensions, so PL2 and PL3 don't exist for us. + /* We currently do not implement the Virtualization extensions, so PL2 does + * not exist for us. */ return 1; }