qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: Sebastian Huber <sebastian.huber@embedded-brains.de>
Cc: qemu-devel@nongnu.org, Paul Brook <paul@codesourcery.com>
Subject: Re: [Qemu-devel] Disable interrupts on Cortex M3 (lm3s6965evb)
Date: Sun, 5 Jun 2011 15:57:02 +0100	[thread overview]
Message-ID: <BANLkTinLg__spSTPaX3G6Ts3HFSO6oV=gA@mail.gmail.com> (raw)
In-Reply-To: <4DEB900F.5070206@embedded-brains.de>

On 5 June 2011 15:17, Sebastian Huber
<sebastian.huber@embedded-brains.de> wrote:
> On 05/06/11 15:44, Peter Maydell wrote:

>> In any case, M profile exception priority handling is sufficiently
>> complicated that any change which only looks at PRIMASK (which is
>> effectively what the change to look at CPSR_I here is doing) is
>> almost certainly wrong. I think that whatever is raising the
>> interrupt should be looking at the CPU priority and not raising it
>> in the first place.

> Yes.  Please have a look at:
>
> http://lists.nongnu.org/archive/html/qemu-devel/2011-05/msg03132.html

That patch does correct an error in the decode of the basepri
registers (and so we might as well apply it), but it does not
affect the fact that the underlying v7m.basepri field is not
actually used for anything.

>> (It looks suspiciously as if most of the v7M priority handling
>> is simply missing from QEMU, ie you have bigger problems than
>> can be fixed by a small patch like this...)

> Yes, but the current behaviour is definitely not right.  Since the
> PRIMASK is mapped to the I bit in the CPSR I guessed that this was the
> right place to fix it.

I agree that the current behaviour is not right. However, to fix
this problem you need to work on a larger scale than attempting
to apply two line patches which fix your particular use case.

-- PMM

  reply	other threads:[~2011-06-05 14:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-05 10:31 [Qemu-devel] Disable interrupts on Cortex M3 (lm3s6965evb) Sebastian Huber
2011-06-05 13:06 ` Sebastian Huber
2011-06-05 13:44   ` Peter Maydell
2011-06-05 14:17     ` Sebastian Huber
2011-06-05 14:57       ` Peter Maydell [this message]
2011-06-05 16:32         ` Sebastian Huber
2011-06-05 19:23           ` Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='BANLkTinLg__spSTPaX3G6Ts3HFSO6oV=gA@mail.gmail.com' \
    --to=peter.maydell@linaro.org \
    --cc=paul@codesourcery.com \
    --cc=qemu-devel@nongnu.org \
    --cc=sebastian.huber@embedded-brains.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).