From: Stefan Hajnoczi <stefanha@gmail.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: "Julia Suvorova" <jusual@mail.ru>,
"QEMU Developers" <qemu-devel@nongnu.org>,
"Jim Mussared" <jim@groklearning.com>,
"Steffen Görtz" <mail@steffen-goertz.de>,
"Joel Stanley" <joel@jms.id.au>,
"Stefan Hajnoczi" <stefanha@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] nvic: Change NVIC to support ARMv6-M
Date: Thu, 12 Jul 2018 11:05:06 +0100 [thread overview]
Message-ID: <20180712100506.GA17016@stefanha-x1.localdomain> (raw)
In-Reply-To: <CAFEAcA_jekzwR8i3_1nB4smoQjoM6N_eUSP6jFP2gE08y8n9yg@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1519 bytes --]
On Wed, Jul 11, 2018 at 02:33:14PM +0100, Peter Maydell wrote:
> On 11 July 2018 at 14:25, Stefan Hajnoczi <stefanha@gmail.com> wrote:
> > On Tue, Jul 10, 2018 at 06:33:35PM +0300, Julia Suvorova via Qemu-devel wrote:
> >> The differences from ARMv7-M NVIC are:
> >> * ARMv6-M only supports up to 32 external interrupts
> >> (configurable feature already). The ICTR is reserved.
> >> * Active Bit Register is reserved.
> >> * ARMv6-M supports 4 priority levels against 256 in ARMv7-M.
> >>
> >> Signed-off-by: Julia Suvorova <jusual@mail.ru>
> >> ---
> >> hw/intc/armv7m_nvic.c | 29 +++++++++++++++++++++++++----
> >> 1 file changed, 25 insertions(+), 4 deletions(-)
> >>
> >> diff --git a/hw/intc/armv7m_nvic.c b/hw/intc/armv7m_nvic.c
> >> index 38aaf3dc8e..8545c87caa 100644
> >> --- a/hw/intc/armv7m_nvic.c
> >> +++ b/hw/intc/armv7m_nvic.c
> >> @@ -420,6 +420,10 @@ static void set_prio(NVICState *s, unsigned irq, bool secure, uint8_t prio)
> >> assert(irq > ARMV7M_EXCP_NMI); /* only use for configurable prios */
> >> assert(irq < s->num_irq);
> >>
> >> + if (!arm_feature(&s->cpu->env, ARM_FEATURE_V7)) {
> >
> > ARMv8-M also has the NVIC:
> > https://static.docs.arm.com/ddi0553/a/DDI0553A_e_armv8m_arm.pdf
> >
> > Should arm_feature(&s->cpu->env, ARM_FEATURE_V6) be used instead of
> > !arm_feature(&s->cpu->env, ARM_FEATURE_V7)?
>
> All of v6M, v7M and v8M cores will set ARM_FEATURE_V6, so
> testing on it doesn't distinguish them.
Okay.
Stefan
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 455 bytes --]
next prev parent reply other threads:[~2018-07-12 10:05 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-10 15:33 [Qemu-devel] [PATCH] nvic: Change NVIC to support ARMv6-M Julia Suvorova
2018-07-11 13:25 ` Stefan Hajnoczi
2018-07-11 13:33 ` Peter Maydell
2018-07-12 10:05 ` Stefan Hajnoczi [this message]
2018-07-17 12:58 ` Peter Maydell
2018-07-18 13:59 ` Julia Suvorova
2018-07-18 18:02 ` 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=20180712100506.GA17016@stefanha-x1.localdomain \
--to=stefanha@gmail.com \
--cc=jim@groklearning.com \
--cc=joel@jms.id.au \
--cc=jusual@mail.ru \
--cc=mail@steffen-goertz.de \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
/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).