From 62540372230ecb5318a9c8a40580a14beeb9ded0 Mon Sep 17 00:00:00 2001 From: Nhi Pham Date: Sat, 23 Oct 2021 14:32:41 +0700 Subject: 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 Cc: Ard Biesheuvel Signed-off-by: Nhi Pham Acked-by: Ard Biesheuvel Acked-by: Samer El-Haj-Mahmoud Acked-by: Moritz Fischer --- ArmPkg/ArmPkg.dec | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'ArmPkg/ArmPkg.dec') diff --git a/ArmPkg/ArmPkg.dec b/ArmPkg/ArmPkg.dec index 5935663fa9..9da1bbc9f2 100644 --- a/ArmPkg/ArmPkg.dec +++ b/ArmPkg/ArmPkg.dec @@ -3,6 +3,7 @@ # # Copyright (c) 2009 - 2010, Apple Inc. All rights reserved.
# Copyright (c) 2011 - 2021, ARM Limited. All rights reserved. +# Copyright (c) 2021, Ampere Computing LLC. All rights reserved. # # SPDX-License-Identifier: BSD-2-Clause-Patent # @@ -379,3 +380,10 @@ # gArmTokenSpaceGuid.PcdPciBusMin|0x0|UINT32|0x00000059 gArmTokenSpaceGuid.PcdPciBusMax|0x0|UINT32|0x0000005A + +[PcdsDynamicEx] + # + # This dynamic PCD hold the GUID of a firmware FFS which contains + # the LinuxBoot payload. + # + gArmTokenSpaceGuid.PcdLinuxBootFileGuid|{0x0}|VOID*|0x0000005C -- cgit v1.2.3