public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [edk2][PATCH 0/1] MdeModulePkg/UefiBootManagerLib: Signal ReadyToBoot on platform recovery
@ 2020-06-16  9:56 Pete Batard
  2020-06-16  9:56 ` [edk2][PATCH 1/1] " Pete Batard
  0 siblings, 1 reply; 19+ messages in thread
From: Pete Batard @ 2020-06-16  9:56 UTC (permalink / raw)
  To: devel; +Cc: zhichao.gao, ray.ni, ard.biesheuvel, leif

This single patch addresses what we consider to be an overlook of the
current EDK2 codeset in that the ReadyToBoot event is only signaled when
a formal Boot Manager option is executed but not when a Platform Recovery
one is, whereas the boot loaders executed in both cases tend to be similar
in terms of requirements, and therefore, since there is no dedicated event
associated with pre Platform Recovery execution, ReadyToBoot should also
apply there.

Especially, this patch is required to fix an issue that we encounter on
the Raspberry Pi platform (https://github.com/pftf/RPi4/issues/64), as
it uses EmbeddedPkg/Drivers/ConsolePrefDxe to set up the graphical console
as default, but the code to switch to graphical is tied to the ReadyToBoot
event being triggered.

This means that, currently, unless users go to the UEFI options to save
their boot preferences, the console defaults to a non-initialized instance
that happens to be serial.

Obviously, this is very problematic as it means that installation of an
OS such as Debian-Linux (which Platform Recovery will boot into if the
ISO content have been extracted to a bootable drive) will occur on the
serial console rather than the graphical console by default, leaving
users, who do not have a serial adapter plugged in, getting only an
unexpected a black screen instead of the Debian installer...

Also, due to the nature of the UEFI firmware for the Raspberry Pi
platform, which actually resides on the bootable USB or SD media rather
than flash, and therefore is something that platform users are excepted
to update on a whim (with the effect of resetting all the UEFI variables
when they do so), and as opposed to what might be the case for other
platforms, it is not reasonable to expect for users to go to their
settings to set up the Boot Manager options so that they don't end up
using Platform Recovery. As a matter of fact, it's the opposite that is
likely to hold true, with most Raspberry Pi users using Platform
Recovery for their boot process. Especially, considering that the
platform defaults should be fine for most users, we do expect that
the bulk of UEFI vanilla Linux installations on the Raspberry Pi 4 are
going to use Platform Recovery instead of Boot Manager.

As such it is crucial that the Platform Recovery and formal Boot Manager
boot processes do behave similarly in terms of ReadyToBoot event being
signaled, hence the reason for this patch.


Note however that this may require a specs update, as the current UEFI
specs for EFI_BOOT_SERVICES.CreateEventEx() have:

> EFI_EVENT_GROUP_READY_TO_BOOT
>   This event group is notified by the system when the Boot Manager
>   is about to load and execute a boot option.

and, once this patch has been applied, we may want to update this
section to mention that it applies to both Boot Manager and Platform
Recovery.

Regards,

/Pete

Pete Batard (1):
  MdeModulePkg/UefiBootManagerLib: Signal ReadyToBoot on platform
    recovery

 MdeModulePkg/Library/UefiBootManagerLib/BmLoadOption.c | 9 +++++++++
 1 file changed, 9 insertions(+)

-- 
2.21.0.windows.1


^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2021-04-30 18:37 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-06-16  9:56 [edk2][PATCH 0/1] MdeModulePkg/UefiBootManagerLib: Signal ReadyToBoot on platform recovery Pete Batard
2020-06-16  9:56 ` [edk2][PATCH 1/1] " Pete Batard
2020-06-17  8:16   ` [edk2-devel] " Wang, Sunny (HPS SW)
2020-06-17 10:59     ` Pete Batard
2020-06-17 13:04       ` Wang, Sunny (HPS SW)
2020-06-17 16:34         ` Pete Batard
2020-06-17 16:36           ` Andrei Warkentin
2020-06-17 16:41             ` Pete Batard
2020-06-17 16:41             ` Samer El-Haj-Mahmoud
     [not found]             ` <161962620CFC252E.28613@groups.io>
2020-06-17 17:06               ` Samer El-Haj-Mahmoud
2020-06-30 17:17                 ` Pete Batard
2021-02-17 11:42                   ` [EXTERNAL] " Leif Lindholm
2021-02-17 12:18                     ` Pete Batard
2021-02-17 14:25                       ` Laszlo Ersek
2021-02-22  9:28                         ` Wang, Sunny (HPS SW)
2021-02-25 10:54                           ` Pete Batard
2021-04-13 19:47                             ` Samer El-Haj-Mahmoud
     [not found]                             ` <167582A230C8C2FD.9378@groups.io>
2021-04-29 14:50                               ` Samer El-Haj-Mahmoud
2021-04-30 18:36                         ` [EXTERNAL] " Samer El-Haj-Mahmoud

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox