Currently, we dispatch drivers specified via Driver#### entries after calling PlatformBootManagerBeforeConsole(), which prevents us from loading drivers that provide consoles via Driver#### entries.
This is particularly annoying on AArch64 systems, given that it prevents us from loading AArch64 drivers from the ESP for PCIe graphics cards that shipped with x86 drivers in the option ROM, which is the common case today. So let's reorder the handling of the Driver#### entries with the invocation of PlatformBootManagerBeforeConsole(), which results in Driver#### entries being dispatched in the same way as option ROM images. Signed-off-by: Ard Biesheuvel <ard.biesheu...@linaro.org> --- MdeModulePkg/Universal/BdsDxe/BdsEntry.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/MdeModulePkg/Universal/BdsDxe/BdsEntry.c b/MdeModulePkg/Universal/BdsDxe/BdsEntry.c index 1fb04dcbbcda..ad4c4c0406f6 100644 --- a/MdeModulePkg/Universal/BdsDxe/BdsEntry.c +++ b/MdeModulePkg/Universal/BdsDxe/BdsEntry.c @@ -850,6 +850,14 @@ BdsEntry ( } } + // + // Execute Driver Options. Images will be loaded but dispatch will be + // deferred for 3rd party images until EndOfDxe is signalled. + // + LoadOptions = EfiBootManagerGetLoadOptions (&LoadOptionCount, LoadOptionTypeDriver); + ProcessLoadOptions (LoadOptions, LoadOptionCount); + EfiBootManagerFreeLoadOptions (LoadOptions, LoadOptionCount); + // // Do the platform init, can be customized by OEM/IBV // Possible things that can be done in PlatformBootManagerBeforeConsole: @@ -868,13 +876,6 @@ BdsEntry ( // EfiBootManagerStartHotkeyService (&HotkeyTriggered); - // - // Execute Driver Options - // - LoadOptions = EfiBootManagerGetLoadOptions (&LoadOptionCount, LoadOptionTypeDriver); - ProcessLoadOptions (LoadOptions, LoadOptionCount); - EfiBootManagerFreeLoadOptions (LoadOptions, LoadOptionCount); - // // Connect consoles // -- 2.17.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#51966): https://edk2.groups.io/g/devel/message/51966 Mute This Topic: https://groups.io/mt/67470372/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-