All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Langsdorf <mark.langsdorf@calxeda.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	"paul@codesourcery.com" <paul@codesourcery.com>
Subject: Re: [Qemu-devel] [PATCH 4/9] arm: add dummy gic security registers
Date: Tue, 20 Dec 2011 15:06:48 -0600	[thread overview]
Message-ID: <4EF0F8E8.9050702@calxeda.com> (raw)
In-Reply-To: <CAFEAcA-49Lz3+Uu54w6z8mMSubixJrxEjbTA-nMs5Fa-1Adywg@mail.gmail.com>

On 12/20/2011 01:58 PM, Peter Maydell wrote:
> On 20 December 2011 19:11, Mark Langsdorf<mark.langsdorf@calxeda.com>  wrote:
>> From: Rob Herring<rob.herring@calxeda.com>
>>
>> Signed-off-by: Rob Herring<rob.herring@calxeda.com>
>> Signed-off-by: Mark Langsdorf<mark.langsdorf@calxeda.com>
>> ---
>>   hw/arm_gic.c |   10 ++++++++--
>>   1 files changed, 8 insertions(+), 2 deletions(-)
>>
>> diff --git a/hw/arm_gic.c b/hw/arm_gic.c
>> index 9b52119..5974c2f 100644
>> --- a/hw/arm_gic.c
>> +++ b/hw/arm_gic.c
>> @@ -274,7 +274,7 @@ static uint32_t gic_dist_readb(void *opaque,
>> target_phys_addr_t offset)
>>
>>      cpu = gic_get_current_cpu();
>>      cm = 1<<  cpu;
>> -    if (offset<  0x100) {
>> +    if (offset<  0x80) {
>>   #ifndef NVIC
>>          if (offset == 0)
>>              return s->enabled;
>> @@ -284,6 +284,9 @@ static uint32_t gic_dist_readb(void *opaque,
>> target_phys_addr_t offset)
>>              return 0;
>>   #endif
>>          goto bad_reg;
>> +    } else if (offset<  0x100) {
>> +        /* Interrupt Security */
>> +        return 0;
> 
> This won't actually break anything, but really the handling of 0x80..0xff
> would be inside the first if() clause, because of the way we piggyback
> the v7M NVIC off these functions. (We should clean that up, really).
> Anyway, the v7M NVIC doesn't own 0x0..0xff, which is what the first
> if () clause is marking off. Ditto in the write function.
> 
> It would also be nice to have the comment explicitly say that these
> registers are defined to RAZ/WI in GIC implementations that don't
> implement the security extensions.
> 
I'm not sure what changes you want made here. I can resubmit with
the comment. But I don't know how qemu piggybacks the v7M NVIC so I
don't understand what you want done.

--Mark Langsdorf
Calxeda, Inc.

  reply	other threads:[~2011-12-20 21:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-20 19:11 [Qemu-devel] [PATCH 4/9] arm: add dummy gic security registers Mark Langsdorf
2011-12-20 19:58 ` Peter Maydell
2011-12-20 21:06   ` Mark Langsdorf [this message]
2011-12-20 21:27     ` 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=4EF0F8E8.9050702@calxeda.com \
    --to=mark.langsdorf@calxeda.com \
    --cc=paul@codesourcery.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.