mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-02-02 10:41:05 +00:00
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. Backports commit dc3c4c14f0f12854dbd967be3486f4db4e66d25b from qemu
This commit is contained in:
parent
09ca9356a3
commit
2a9b62c12b
|
@ -234,6 +234,12 @@ static void arm_cpu_reset(CPUState *s)
|
||||||
env->regs[15] = 0xFFFF0000;
|
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;
|
env->vfp.xregs[ARM_VFP_FPEXC] = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue