]> git.proxmox.com Git - mirror_edk2.git/commit - ArmPkg/Library/LinuxBootBootManagerLib/LinuxBootBm.c
ArmPkg: Implement PlatformBootManagerLib for LinuxBoot
authorNhi Pham <nhi@os.amperecomputing.com>
Sat, 23 Oct 2021 07:32:41 +0000 (14:32 +0700)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Sat, 23 Oct 2021 08:38:20 +0000 (08:38 +0000)
commit62540372230ecb5318a9c8a40580a14beeb9ded0
tree80b5bbdace973df98431f2f0cd7e212e89a2f242
parentbd5ec03d87cacc5be2de4284b092aafd4ac4eb31
ArmPkg: Implement PlatformBootManagerLib for LinuxBoot

LinuxBoot is a firmware that replaces specific firmware functionality
like the UEFI DXE phase with a Linux kernel and runtime. It is built-in
UEFI image like an application, which is executed at the end of DXE
phase.

To achieve the LinuxBoot boot flow "SEC->PEI->DXE->BDS->LinuxBoot",
today we use the common well-known GUID of UEFI Shell for LinuxBoot
payload, so LinuxBoot developers can effortlessly find the UEFI Shell
Application and replace it with the LinuxBoot payload without
recompiling platform EDK2 (There might be an issue with a few systems
that don't have a UEFI Shell). Also, we have a hard requirement to force
the BDS to boot into the LinuxBoot as it is essentially required that
only the LinuxBoot boot option is permissible and UEFI is an
intermediate bootstrap phase. Considering all the above, it is
reasonable to just have a new GUID for LinuxBoot and require a LinuxBoot
specific BDS implementation. In addition, with making the BDS
implementation simpler, we can reduce many DXE drivers which we think it
is not necessary for LinuxBoot booting.

This patch adds a new PlatformBootManagerLib implementation which
registers only the gArmTokenSpaceGuid.PcdLinuxBootFileGuid for LinuxBoot
payload as an active boot option. It allows BDS to jump to the LinuxBoot
quickly by skipping the UiApp and UEFI Shell.

The PlatformBootManagerLib library derived from
ArmPkg/Library/PlatformBootManagerLib.

Cc: Leif Lindholm <leif@nuviainc.com>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Signed-off-by: Nhi Pham <nhi@os.amperecomputing.com>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Acked-by: Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com>
Acked-by: Moritz Fischer <moritzf@google.com>
ArmPkg/ArmPkg.dec
ArmPkg/ArmPkg.dsc
ArmPkg/Library/LinuxBootBootManagerLib/LinuxBootBm.c [new file with mode: 0644]
ArmPkg/Library/LinuxBootBootManagerLib/LinuxBootBootManagerLib.inf [new file with mode: 0644]