public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
To: Leif Lindholm <leif.lindholm@linaro.org>
Cc: Sergei Temerkhanov <s.temerkhanov@gmail.com>,
	 "edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Subject: Re: [PATCH] Arm: GICv3: Don't access GIC_ICDIPR for interrupts 0..31
Date: Tue, 23 May 2017 03:23:35 -0700	[thread overview]
Message-ID: <CAKv+Gu8Hspj=158Hf5Xf4hUjzvMCosgs7=-TcpCn2i-vx7BgZQ@mail.gmail.com> (raw)
In-Reply-To: <20170522174512.GK1657@bivouac.eciton.net>

On 22 May 2017 at 10:45, Leif Lindholm <leif.lindholm@linaro.org> wrote:
> On Fri, May 19, 2017 at 05:31:36PM +0300, Sergei Temerkhanov wrote:
>> On Fri, May 19, 2017 at 1:26 PM, Leif Lindholm <leif.lindholm@linaro.org> wrote:
>> > On Fri, May 19, 2017 at 05:37:02AM +0300, Sergei Temerkhanov wrote:
>> >> On Thu, May 18, 2017 at 7:08 PM, Ard Biesheuvel
>> >> <ard.biesheuvel@linaro.org> wrote:
>> >> > On 16 May 2017 at 03:56, Sergey Temerkhanov <s.temerkhanov@gmail.com> wrote:
>> >> >> These registers are reserved for PPIs and unimplemented on
>> >> >> some architectures
>> >> >>
>> >> >
>> >> >
>> >> > What do you mean by 'architectures'?
>> >>
>> >> GIC core implementations.
>> >>
>> >> > Could you elaborate on which SoC
>> >> > needs this?
>> >> At least Cavium ThunderX/OcteonTX need it.
>> >>
>> >> The GICv3 spec says this on the subject:
>> >>
>> >> 8.9.12 GICD_IPRIORITYR, Interrupt Priority Registers, n = 0 - 254
>> >>
>> >> "These registers are always used when affinity routing is not enabled.
>> >> When affinity routing is enabled for the Security state of an
>> >> interrupt: • GICR_IPRIORITYR is used instead of GICD_IPRIORITYR where
>> >> n = 0 to 7 (that is, for SGIs and PPIs). • GICD_IPRIORITYR is RAZ/WI
>> >> where n = 0 to 7."
>> >
>> > Since they are RAZ/WI, why is this change needed?
>>
>> B/c for some GICv3 cores accessing these registers result in exceptions
>
> Right, so that's architecturally non-compliant.
>
> At which point, as a workaround for a hardware erratum, I think this
> should either be a configurable option (ArmPkg Pcd), or the code
> should be modified to use GICR_IPRIORITYR as the text describes (if
> applicable).
>

That is a good point. The intention of the code is to disable all
interrupt sources, so it is incorrect to begin with, given that PPIs
and SGIs need to be disabled at the respective redistributor of each
CPU. Fix that, and it should no longer raise exceptions on the broken
hardware.

-- 
Ard.


      reply	other threads:[~2017-05-23 10:23 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-16  2:56 [PATCH] Arm: GICv3: Don't access GIC_ICDIPR for interrupts 0..31 Sergey Temerkhanov
2017-05-16  2:56 ` [PATCH] MdePkg: Fix undefined behavior on variadic parameters Sergey Temerkhanov
2017-05-16  5:10   ` Gao, Liming
2017-05-16 12:10     ` Sergei Temerkhanov
2017-05-17 15:30       ` Gao, Liming
2017-05-18  0:26         ` Sergei Temerkhanov
2017-05-18  3:06           ` Andrew Fish
2017-05-19  3:01             ` Sergei Temerkhanov
2017-05-18 10:19       ` Laszlo Ersek
2017-05-19  1:35         ` Gao, Liming
2017-05-19  8:12           ` Laszlo Ersek
2017-05-19  2:45         ` Sergei Temerkhanov
2017-05-19  8:16           ` Laszlo Ersek
2017-05-24  2:14             ` Gao, Liming
2017-05-24  2:46               ` Kinney, Michael D
2017-05-24 11:15                 ` Sergei Temerkhanov
2017-05-16  2:56 ` [PATCH] MdeModulePkg: " Sergey Temerkhanov
2017-05-18 16:08 ` [PATCH] Arm: GICv3: Don't access GIC_ICDIPR for interrupts 0..31 Ard Biesheuvel
2017-05-19  2:37   ` Sergei Temerkhanov
2017-05-19 10:26     ` Leif Lindholm
2017-05-19 14:31       ` Sergei Temerkhanov
2017-05-22 17:45         ` Leif Lindholm
2017-05-23 10:23           ` Ard Biesheuvel [this message]

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-list 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='CAKv+Gu8Hspj=158Hf5Xf4hUjzvMCosgs7=-TcpCn2i-vx7BgZQ@mail.gmail.com' \
    --to=devel@edk2.groups.io \
    /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