diff mbox

[v4,05/33] target-arm: reject switching to monitor mode

Message ID 1404169773-20264-6-git-send-email-greg.bellows@linaro.org
State Superseded
Headers show

Commit Message

Greg Bellows June 30, 2014, 11:09 p.m. UTC
From: Sergey Fedorov <s.fedorov@samsung.com>

...from non-secure state.

Signed-off-by: Sergey Fedorov <s.fedorov@samsung.com>
Signed-off-by: Fabian Aggeler <aggelerf@ethz.ch>
Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Signed-off-by: Greg Bellows <greg.bellows@linaro.org>
---
 target-arm/helper.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox

Patch

diff --git a/target-arm/helper.c b/target-arm/helper.c
index 1ea30fe..ed1e3c7 100644
--- a/target-arm/helper.c
+++ b/target-arm/helper.c
@@ -3064,6 +3064,8 @@  static int bad_mode_switch(CPUARMState *env, int mode)
     case ARM_CPU_MODE_IRQ:
     case ARM_CPU_MODE_FIQ:
         return 0;
+    case ARM_CPU_MODE_MON:
+        return !arm_is_secure(env);
     default:
         return 1;
     }