From: marc.zyngier@arm.com (Marc Zyngier)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v5 04/20] arm64: boot protocol documentation update for GICv3
Date: Thu, 19 Jun 2014 19:40:02 +0100 [thread overview]
Message-ID: <53A32E82.20803@arm.com> (raw)
In-Reply-To: <20140619140149.GA30188@leverpostej>
Hi Mark,
On 19/06/14 15:01, Mark Rutland wrote:
> Hi Marc,
>
> On Thu, Jun 19, 2014 at 10:19:27AM +0100, Marc Zyngier wrote:
>> Linux has some requirements that must be satisfied in order to boot
>> on a system built with a GICv3.
>>
>> Acked-by: Christoffer Dall <christoffer.dall@linaro.org>
>> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
>> ---
>> Documentation/arm64/booting.txt | 6 ++++++
>> 1 file changed, 6 insertions(+)
>>
>> diff --git a/Documentation/arm64/booting.txt b/Documentation/arm64/booting.txt
>> index 37fc4f6..e28ccec 100644
>> --- a/Documentation/arm64/booting.txt
>> +++ b/Documentation/arm64/booting.txt
>> @@ -141,6 +141,12 @@ Before jumping into the kernel, the following conditions must be met:
>> the kernel image will be entered must be initialised by software at a
>> higher exception level to prevent execution in an UNKNOWN state.
>>
>> + For systems with a GICv3 interrupt controller, it is expected that:
>> + - If EL3 is present, it must program ICC_SRE_EL3.Enable (bit 3) to
>> + 0b1 and ICC_SRE_EL3.SRE (bit 0) to 0b1.
>> + - If the kernel is entered at EL1, EL2 must set ICC_SRE_EL2.Enable
>> + (bit 3) to 0b1 and ICC_SRE_EL2.SRE (bit 0) to 0b1.
>
> Apologies for spotting this so late, but to me this sounds slightly
> ambiguous. The use of "it is expected" doesn't read like a hard
> requirement, and in the first point, it's ambiguous as to what "it" is.
>
> I assume that if the GIC is communicated to the kernel as a GICv2 then
> these points do not hold?
The first point always holds, specially if the kernel is entered at EL2
(see patch #2 and the way we initialize System Registers in head.S). At
this stage, we haven't looked at DT yet, and must setup EL2
independently of what the platform will describe. The only source of
information we have is whether or not this CPU implements GICv3 System
Registers (id_aa64pfr0_el1).
Assuming EL3 doesn't set these two bits, you will end up trapping back
to EL3. You can hope that EL3 will do the right thing (do what is
described above and restart the offending instruction at EL2). If it
doesn't, you're dead.
> How about:
>
> For systems with a GICv3 interrupt controller, where the presence of
> GICv3 is communicated to the kernel:
> - If EL3 is present:
> ICC_SRE_EL3.Enable (bit 3) must be initialiased to 0b1.
> ICC_SRE_EL3.SRE (bit 0) must be initialised to 0b1.
> - If the kernel is entered at EL1:
> ICC.SRE_EL2.Enable (bit 3) must be initialised to 0b1
> ICC_SRE_EL2.SRE (bit 0) must be initialised to 0b1.
I'm happy with that change, provided that we get rid of the ", where the
presence of GICv3 is communicated to the kernel".
Thanks,
M.
--
Jazz is not dead. It just smells funny...
next prev parent reply other threads:[~2014-06-19 18:40 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-19 9:19 [PATCH v5 00/20] arm64: GICv3 support Marc Zyngier
2014-06-19 9:19 ` [PATCH v5 01/20] ARM: GIC: move some bits of GICv2 to a library-type file Marc Zyngier
2014-06-19 9:19 ` [PATCH v5 02/20] arm64: initial support for GICv3 Marc Zyngier
2014-06-20 10:02 ` Mark Rutland
2014-06-20 10:21 ` Marc Zyngier
2014-06-19 9:19 ` [PATCH v5 03/20] arm64: GICv3 device tree binding documentation Marc Zyngier
2014-06-19 9:19 ` [PATCH v5 04/20] arm64: boot protocol documentation update for GICv3 Marc Zyngier
2014-06-19 14:01 ` Mark Rutland
2014-06-19 18:40 ` Marc Zyngier [this message]
2014-06-20 8:54 ` Mark Rutland
2014-06-19 9:19 ` [PATCH v5 05/20] KVM: arm/arm64: vgic: move GICv2 registers to their own structure Marc Zyngier
2014-06-19 9:19 ` [PATCH v5 06/20] KVM: ARM: vgic: introduce vgic_ops and LR manipulation primitives Marc Zyngier
2014-06-19 9:19 ` [PATCH v5 07/20] KVM: ARM: vgic: abstract access to the ELRSR bitmap Marc Zyngier
2014-06-19 9:19 ` [PATCH v5 08/20] KVM: ARM: vgic: abstract EISR bitmap access Marc Zyngier
2014-06-19 9:19 ` [PATCH v5 09/20] KVM: ARM: vgic: abstract MISR decoding Marc Zyngier
2014-06-19 9:19 ` [PATCH v5 10/20] KVM: ARM: vgic: move underflow handling to vgic_ops Marc Zyngier
2014-06-19 9:19 ` [PATCH v5 11/20] KVM: ARM: vgic: abstract VMCR access Marc Zyngier
2014-06-19 9:19 ` [PATCH v5 12/20] KVM: ARM: vgic: introduce vgic_enable Marc Zyngier
2014-06-19 9:19 ` [PATCH v5 13/20] KVM: ARM: introduce vgic_params structure Marc Zyngier
2014-06-19 9:19 ` [PATCH v5 14/20] KVM: ARM: vgic: split GICv2 backend from the main vgic code Marc Zyngier
2014-06-19 9:19 ` [PATCH v5 15/20] KVM: ARM: vgic: revisit implementation of irqchip_in_kernel Marc Zyngier
2014-06-19 9:19 ` [PATCH v5 16/20] arm64: KVM: remove __kvm_hyp_code_{start, end} from hyp.S Marc Zyngier
2014-06-19 9:19 ` [PATCH v5 17/20] arm64: KVM: split GICv2 world switch from hyp code Marc Zyngier
2014-06-19 9:19 ` [PATCH v5 18/20] arm64: KVM: move HCR_EL2.{IMO, FMO} manipulation into the vgic switch code Marc Zyngier
2014-06-19 9:19 ` [PATCH v5 19/20] KVM: ARM: vgic: add the GICv3 backend Marc Zyngier
2014-06-19 9:19 ` [PATCH v5 20/20] arm64: KVM: vgic: add GICv3 world switch Marc Zyngier
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=53A32E82.20803@arm.com \
--to=marc.zyngier@arm.com \
--cc=linux-arm-kernel@lists.infradead.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 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).