qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] ARM Cortex-M IRQs can not be globally disabled
@ 2014-09-01 18:34 David Hoover
  2014-09-02 12:50 ` Peter Maydell
  0 siblings, 1 reply; 2+ messages in thread
From: David Hoover @ 2014-09-01 18:34 UTC (permalink / raw)
  To: qemu-devel

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 <spm@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 <spm@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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-09-02 12:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-01 18:34 [Qemu-devel] ARM Cortex-M IRQs can not be globally disabled David Hoover
2014-09-02 12:50 ` Peter Maydell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).