From 8dab4eebe435fc28cae329867a74cee45d040d3e Mon Sep 17 00:00:00 2001 From: MarsX Lin Date: Mon, 10 Jul 2023 16:21:23 +0800 Subject: UefiPayloadPkg: Integrate UiApp and BootManagerMenuApp into MultiFv REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4347 To put UiApp.inf and BootManagerMenuApp.inf to proper FV(BDSFV) Cc: Guo Dong Cc: Ray Ni Cc: Sean Rhodes Reviewed-by: James Lu Reviewed-by: Gua Guo Signed-off-by: MarsX Lin --- .../PlatformBootManagerLib/PlatformBootManager.c | 55 ---------------------- .../PlatformBootManagerLib.inf | 4 -- 2 files changed, 59 deletions(-) (limited to 'UefiPayloadPkg/Library') diff --git a/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManager.c b/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManager.c index 4a0219624d..a4a49da0e9 100644 --- a/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManager.c +++ b/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManager.c @@ -9,8 +9,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #include "PlatformBootManager.h" #include "PlatformConsole.h" -#include -#include #include /** @@ -364,56 +362,3 @@ PlatformBootManagerUnableToBoot ( { return; } - -/** - Get/update PcdBootManagerMenuFile from GUID HOB which will be assigned in bootloader. - - @param ImageHandle The firmware allocated handle for the EFI image. - @param SystemTable A pointer to the EFI System Table. - - @retval EFI_SUCCESS The entry point is executed successfully. - @retval other Some error occurs. - -**/ -EFI_STATUS -EFIAPI -PlatformBootManagerLibConstructor ( - IN EFI_HANDLE ImageHandle, - IN EFI_SYSTEM_TABLE *SystemTable - ) -{ - EFI_STATUS Status; - UINTN Size; - VOID *GuidHob; - UNIVERSAL_PAYLOAD_GENERIC_HEADER *GenericHeader; - UNIVERSAL_PAYLOAD_BOOT_MANAGER_MENU *BootManagerMenuFile; - - GuidHob = GetFirstGuidHob (&gEdkiiBootManagerMenuFileGuid); - - if (GuidHob == NULL) { - // - // If the HOB is not create, the default value of PcdBootManagerMenuFile will be used. - // - return EFI_SUCCESS; - } - - GenericHeader = (UNIVERSAL_PAYLOAD_GENERIC_HEADER *)GET_GUID_HOB_DATA (GuidHob); - if ((sizeof (UNIVERSAL_PAYLOAD_GENERIC_HEADER) > GET_GUID_HOB_DATA_SIZE (GuidHob)) || (GenericHeader->Length > GET_GUID_HOB_DATA_SIZE (GuidHob))) { - return EFI_NOT_FOUND; - } - - if (GenericHeader->Revision == UNIVERSAL_PAYLOAD_BOOT_MANAGER_MENU_REVISION) { - BootManagerMenuFile = (UNIVERSAL_PAYLOAD_BOOT_MANAGER_MENU *)GET_GUID_HOB_DATA (GuidHob); - if (BootManagerMenuFile->Header.Length < UNIVERSAL_PAYLOAD_SIZEOF_THROUGH_FIELD (UNIVERSAL_PAYLOAD_BOOT_MANAGER_MENU, FileName)) { - return EFI_NOT_FOUND; - } - - Size = sizeof (BootManagerMenuFile->FileName); - Status = PcdSetPtrS (PcdBootManagerMenuFile, &Size, &BootManagerMenuFile->FileName); - ASSERT_EFI_ERROR (Status); - } else { - return EFI_NOT_FOUND; - } - - return EFI_SUCCESS; -} diff --git a/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf b/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf index a3951b7a7e..ff92c95227 100644 --- a/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf +++ b/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf @@ -13,7 +13,6 @@ MODULE_TYPE = DXE_DRIVER VERSION_STRING = 1.0 LIBRARY_CLASS = PlatformBootManagerLib|DXE_DRIVER - CONSTRUCTOR = PlatformBootManagerLibConstructor # # The following information is for reference only and not required by the build tools. @@ -48,11 +47,9 @@ HiiLib PrintLib PlatformHookLib - HobLib [Guids] gEfiEndOfDxeEventGroupGuid - gEdkiiBootManagerMenuFileGuid gUefiShellFileGuid [Protocols] @@ -75,5 +72,4 @@ gEfiMdePkgTokenSpaceGuid.PcdUartDefaultDataBits gEfiMdePkgTokenSpaceGuid.PcdUartDefaultParity gEfiMdePkgTokenSpaceGuid.PcdUartDefaultStopBits - gEfiMdeModulePkgTokenSpaceGuid.PcdBootManagerMenuFile gUefiPayloadPkgTokenSpaceGuid.PcdBootManagerEscape -- cgit v1.2.3