Hi, It seems that interrupts are not disabled by CPSIE instruction. The current code apparently ignores (daif&PSTATE_I) for Cortex-M. The patch below is basically identical to the patch that was attached to the following message:
https://lists.gnu.org/archive/html/qemu-devel/2011-06/msg00513.html Cheers, David From: David Hoover <s...@boiteauxlettres.sent.at> Date: Mon, 1 Sep 2014 14:24:56 +0200 Subject: [PATCH] ARM Cortex-M IRQs can not be globally disabled Signed-off-by: David Hoover <s...@boiteauxlettres.sent.at> --- cpu-exec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpu-exec.c b/cpu-exec.c index c6aad74..fdebe2b 100644 --- a/cpu-exec.c +++ b/cpu-exec.c @@ -610,8 +610,8 @@ int cpu_exec(CPUArchState *env) We avoid this by disabling interrupts when pc contains a magic address. */ if (interrupt_request & CPU_INTERRUPT_HARD - && ((IS_M(env) && env->regs[15] < 0xfffffff0) - || !(env->daif & PSTATE_I))) { + && !(env->daif & PSTATE_I) + && (!IS_M(env) || env->regs[15] < 0xfffffff0)) { cpu->exception_index = EXCP_IRQ; cc->do_interrupt(cpu); next_tb = 0; -- 1.8.5.2