OSDN Git Service

target-arm: Make Monitor->NS PL1 mode changes illegal if HCR.TGE is 1
authorPeter Maydell <peter.maydell@linaro.org>
Tue, 23 Feb 2016 15:36:44 +0000 (15:36 +0000)
committerPeter Maydell <peter.maydell@linaro.org>
Fri, 26 Feb 2016 15:09:42 +0000 (15:09 +0000)
commit10eacda787ac9990dc22d4437b289200c819712c
treecaa862b1bf1e43cb95f4a913abce22f442d33236
parentaf393ffc6da116b9dd4c70901bad1f4cafb1773d
target-arm: Make Monitor->NS PL1 mode changes illegal if HCR.TGE is 1

If HCR.TGE is 1 then mode changes via CPS and MSR from Monitor to
NonSecure PL1 modes are illegal mode changes. Implement this check
in bad_mode_switch().

(We don't currently implement HCR.TGE, but this is the only missing
check from the v8 ARM ARM G1.9.3 and so it's worth adding now; the
rest of the HCR.TGE checks can be added later as necessary.)

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Sergey Fedorov <serge.fdrv@gmail.com>
Message-id: 1455556977-3644-12-git-send-email-peter.maydell@linaro.org
target-arm/helper.c