diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2017-09-14 18:43:16 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2017-09-14 18:43:16 +0100 |
commit | dc3c4c14f0f12854dbd967be3486f4db4e66d25b (patch) | |
tree | 8390f567ab69f296ed090e74c4dc9bcd16345c5e /target/arm/cpu.c | |
parent | 4a16724f06ead684a5962477a557c26c677c2729 (diff) | |
download | qemu-dc3c4c14f0f12854dbd967be3486f4db4e66d25b.zip qemu-dc3c4c14f0f12854dbd967be3486f4db4e66d25b.tar.gz qemu-dc3c4c14f0f12854dbd967be3486f4db4e66d25b.tar.bz2 |
target/arm: Clear exclusive monitor on v7M reset, exception entry/exit
For M profile we must clear the exclusive monitor on reset, exception
entry and exception exit. We weren't doing any of these things; fix
this bug.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Alistair Francis <alistair.francis@xilinx.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 1505137930-13255-3-git-send-email-peter.maydell@linaro.org
Diffstat (limited to 'target/arm/cpu.c')
-rw-r--r-- | target/arm/cpu.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/target/arm/cpu.c b/target/arm/cpu.c index a1acce3..412e94c 100644 --- a/target/arm/cpu.c +++ b/target/arm/cpu.c @@ -235,6 +235,12 @@ static void arm_cpu_reset(CPUState *s) env->regs[15] = 0xFFFF0000; } + /* M profile requires that reset clears the exclusive monitor; + * A profile does not, but clearing it makes more sense than having it + * set with an exclusive access on address zero. + */ + arm_clear_exclusive(env); + env->vfp.xregs[ARM_VFP_FPEXC] = 0; #endif |