From: Laszlo Ersek <lersek@redhat.com>
To: Supreeth Venkatesh <Supreeth.Venkatesh@arm.com>,
Steve Capper <steve.capper@linaro.org>,
"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>,
Leif Lindholm <leif.lindholm@linaro.org>,
Nariman Poushin <nariman.poushin@linaro.org>
Subject: Re: Boot failure for ArmVExpress-FVP-AArch64, CpuArch protocol does not appear to be registered
Date: Wed, 11 Apr 2018 18:20:46 +0200 [thread overview]
Message-ID: <63ca473d-b032-3e46-b3c1-62734cf7ea6f@redhat.com> (raw)
In-Reply-To: <AM4PR0802MB23063FF4FD335AEAA5A8651080BD0@AM4PR0802MB2306.eurprd08.prod.outlook.com>
On 04/11/18 17:34, Supreeth Venkatesh wrote:
> Laszlo/Steve,
>
> I ran into the same problem on ArmVExpress-FVP-AArch64 while running
> management mode.
> I have fixed this problem in this patch by reordering driver load
> order here:
> https://lists.01.org/pipermail/edk2-devel/2018-April/023550.html
>
> Not sure whether Leif/Ard/Laszlo agree with this.
Unfortunately, that's not a fix, just an unreliable work-around. The
dispatch order between DXE modules is unspecified beyond the order
imposed by their dependency expressions (hence "depex"). I don't claim
that it's always feasible to fix the problem with custom NULL protocols,
but whenever it is, I suggest that we do. The protocol dependency
mechanism is clean and extensible, unlike "BEFORE" depex opcodes, or the
"naked" listing order in FDF files.
Admittedly, sometimes there's no way around specifying a precise
(partial) load order for several modules. For that, the APRIORI DXE file
should be used, if possible. And, the APRIORI DXE file should be kept as
small as possible (listing as few modules as possible).
I think we should implement the following changes.
(1) "ArmPkg/Drivers/ArmGic/ArmGicDxe.inf" produces two custom protocols
already, gHardwareInterruptProtocolGuid and
gHardwareInterrupt2ProtocolGuid. These are installed on the following
call path:
InterruptDxeInitialize() [ArmPkg/Drivers/ArmGic/ArmGicDxe.c]
GicV2DxeInitialize() | GicV3DxeInitialize() [ArmPkg/Drivers/ArmGic/GicV2/ArmGicV2Dxe.c | ArmPkg/Drivers/ArmGic/GicV3/ArmGicV3Dxe.c]
InstallAndRegisterInterruptService() [ArmPkg/Drivers/ArmGic/ArmGicCommonDxe.c]
The GUIDs come from "EmbeddedPkg/Include/Protocol/HardwareInterrupt.h"
and "EmbeddedPkg/Include/Protocol/HardwareInterrupt2.h", respectively.
Annotate "ArmPkg/Drivers/ArmGic/ArmGicDxe.inf" that it produces
gHardwareInterruptProtocolGuid and gHardwareInterrupt2ProtocolGuid, and
that it consumes (with a protocol notify) gEfiCpuArchProtocolGuid.
(2) Replace "AFTER gArmGicDxeFileGuid" in
"ArmPkg/Drivers/CpuDxe/CpuDxe.inf" with "gHardwareInterruptProtocolGuid
OR gHardwareInterrupt2ProtocolGuid".
(3) Replace "BEFORE gVariableRuntimeDxeFileGuid" in
"ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.inf" with
"gEfiCpuArchProtocolGuid".
(4) In all platforms that use NorFlashDxe without formatting a variable
store template at build time, make the variable driver depend on
NorFlashDxe's runtime formatting, with the trick I described earlier.
In fact, I haven't booted ArmVirtQemu in a while, and now I'm finding it
is afflicted by the same assertion failure as the one reported by Steve.
This is somewhat strange because I don't see any Arm*Pkg changes since
my commit 34711bf19833 ("ArmVirtPkg/PlatformBootManagerLib: return to
"-kernel before boot devices"", 2018-03-16). I definitely tested that
commit successfully, so I wonder what may have triggered / exposed the
issue recently. Possibly BaseTools changes? That wouldn't be surprising;
again, the dispatch order is unspecified beyond depexes.
Either way, I guess I better get to work on this.
Thanks,
Laszlo
next prev parent reply other threads:[~2018-04-11 16:20 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-11 10:30 Boot failure for ArmVExpress-FVP-AArch64, CpuArch protocol does not appear to be registered Steve Capper
2018-04-11 12:25 ` Laszlo Ersek
2018-04-11 15:34 ` Supreeth Venkatesh
2018-04-11 16:10 ` Ard Biesheuvel
2018-04-11 16:25 ` Laszlo Ersek
2018-04-11 16:20 ` Laszlo Ersek [this message]
2018-04-11 16:41 ` Steve Capper
2018-04-12 15:02 ` Gao, Liming
2018-04-12 17:31 ` Laszlo Ersek
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=63ca473d-b032-3e46-b3c1-62734cf7ea6f@redhat.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