From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mx.groups.io with SMTP id smtpd.web10.35412.1688979760640908328 for ; Mon, 10 Jul 2023 02:02:40 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=Itowcj//; spf=pass (domain: intel.com, ip: 134.134.136.65, mailfrom: marsx.lin@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1688979760; x=1720515760; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=tw4k6qxZ7H8BY/KOs2kpZNnbbN+5od/lRRVCIxLJqAg=; b=Itowcj//7Z93YlW3g+nYAmiiShAlZSFNzHk8g2g5K6whJ6ga7qiJQrCK 69IoRRZIkm/oKGeqp5tJZt789TU/w9VT9uoRWNXfQ4k2mBPwEMYTh4Wa5 BZ0CgsYcU3xiB57cmSKRPcGTn0KdH/Jvz54arhsTuprtOdtuwJv+LGCRO m4f++UBkPas7/FF7UUP0Z4OjDohnObDqox3yeTlMpbDsSvqpxi9Nj4HHb 9uM0J+C8kt1eymbvDCZF7XMxjQBW3TC5vVFSwB0FcG9lzdCty3+gI1DuM MQ38LQ8434RdwO4W3pBxaLfmf1spZ38C+PWxEZbvZNv5R58guRskAu2tD A==; X-IronPort-AV: E=McAfee;i="6600,9927,10766"; a="367788964" X-IronPort-AV: E=Sophos;i="6.01,194,1684825200"; d="scan'208";a="367788964" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Jul 2023 02:02:40 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10766"; a="844805356" X-IronPort-AV: E=Sophos;i="6.01,194,1684825200"; d="scan'208";a="844805356" Received: from unknown (HELO marslinx-desk4.gar.corp.intel.com) ([10.5.215.144]) by orsmga004.jf.intel.com with ESMTP; 10 Jul 2023 02:02:38 -0700 From: marsx.lin@intel.com To: devel@edk2.groups.io Cc: MarsX Lin , Guo Dong , Ray Ni , Sean Rhodes , James Lu , Gua Guo Subject: [PATCH] UefiPayloadPkg: Integrate UiApp and BootManagerMenuApp into MultiFv Date: Mon, 10 Jul 2023 17:02:27 +0800 Message-Id: X-Mailer: git-send-email 2.39.1.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: MarsX Lin REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D4347 To put UiApp.inf and BootManagerMenuApp.inf to proper FV(BDSFV) Cc: Guo Dong Cc: Ray Ni Cc: Sean Rhodes Cc: James Lu Cc: Gua Guo Signed-off-by: MarsX Lin --- .../PlatformBootManager.c | 55 ------------------- .../PlatformBootManagerLib.inf | 4 -- UefiPayloadPkg/UefiPayloadEntry/PrintHob.c | 25 +-------- .../UniversalPayloadEntry.inf | 1 - UefiPayloadPkg/UefiPayloadPkg.dec | 2 - UefiPayloadPkg/UefiPayloadPkg.dsc | 8 +-- UefiPayloadPkg/UefiPayloadPkg.fdf | 9 ++- 7 files changed, 11 insertions(+), 93 deletions(-) diff --git a/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootMana= ger.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 =0D #include "PlatformBootManager.h"=0D #include "PlatformConsole.h"=0D -#include =0D -#include =0D #include =0D =0D /**=0D @@ -364,56 +362,3 @@ PlatformBootManagerUnableToBoot ( {=0D return;=0D }=0D -=0D -/**=0D - Get/update PcdBootManagerMenuFile from GUID HOB which will be assigned i= n bootloader.=0D -=0D - @param ImageHandle The firmware allocated handle for the EFI image.=0D - @param SystemTable A pointer to the EFI System Table.=0D -=0D - @retval EFI_SUCCESS The entry point is executed successfully.=0D - @retval other Some error occurs.=0D -=0D -**/=0D -EFI_STATUS=0D -EFIAPI=0D -PlatformBootManagerLibConstructor (=0D - IN EFI_HANDLE ImageHandle,=0D - IN EFI_SYSTEM_TABLE *SystemTable=0D - )=0D -{=0D - EFI_STATUS Status;=0D - UINTN Size;=0D - VOID *GuidHob;=0D - UNIVERSAL_PAYLOAD_GENERIC_HEADER *GenericHeader;=0D - UNIVERSAL_PAYLOAD_BOOT_MANAGER_MENU *BootManagerMenuFile;=0D -=0D - GuidHob =3D GetFirstGuidHob (&gEdkiiBootManagerMenuFileGuid);=0D -=0D - if (GuidHob =3D=3D NULL) {=0D - //=0D - // If the HOB is not create, the default value of PcdBootManagerMenuFi= le will be used.=0D - //=0D - return EFI_SUCCESS;=0D - }=0D -=0D - GenericHeader =3D (UNIVERSAL_PAYLOAD_GENERIC_HEADER *)GET_GUID_HOB_DATA = (GuidHob);=0D - if ((sizeof (UNIVERSAL_PAYLOAD_GENERIC_HEADER) > GET_GUID_HOB_DATA_SIZE = (GuidHob)) || (GenericHeader->Length > GET_GUID_HOB_DATA_SIZE (GuidHob))) {= =0D - return EFI_NOT_FOUND;=0D - }=0D -=0D - if (GenericHeader->Revision =3D=3D UNIVERSAL_PAYLOAD_BOOT_MANAGER_MENU_R= EVISION) {=0D - BootManagerMenuFile =3D (UNIVERSAL_PAYLOAD_BOOT_MANAGER_MENU *)GET_GUI= D_HOB_DATA (GuidHob);=0D - if (BootManagerMenuFile->Header.Length < UNIVERSAL_PAYLOAD_SIZEOF_THRO= UGH_FIELD (UNIVERSAL_PAYLOAD_BOOT_MANAGER_MENU, FileName)) {=0D - return EFI_NOT_FOUND;=0D - }=0D -=0D - Size =3D sizeof (BootManagerMenuFile->FileName);=0D - Status =3D PcdSetPtrS (PcdBootManagerMenuFile, &Size, &BootManagerMenu= File->FileName);=0D - ASSERT_EFI_ERROR (Status);=0D - } else {=0D - return EFI_NOT_FOUND;=0D - }=0D -=0D - return EFI_SUCCESS;=0D -}=0D diff --git a/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootMana= gerLib.inf b/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootMana= gerLib.inf index a3951b7a7e..ff92c95227 100644 --- a/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.= inf +++ b/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.= inf @@ -13,7 +13,6 @@ MODULE_TYPE =3D DXE_DRIVER=0D VERSION_STRING =3D 1.0=0D LIBRARY_CLASS =3D PlatformBootManagerLib|DXE_DRIVER=0D - CONSTRUCTOR =3D PlatformBootManagerLibConstructor=0D =0D #=0D # The following information is for reference only and not required by the = build tools.=0D @@ -48,11 +47,9 @@ HiiLib=0D PrintLib=0D PlatformHookLib=0D - HobLib=0D =0D [Guids]=0D gEfiEndOfDxeEventGroupGuid=0D - gEdkiiBootManagerMenuFileGuid=0D gUefiShellFileGuid=0D =0D [Protocols]=0D @@ -75,5 +72,4 @@ gEfiMdePkgTokenSpaceGuid.PcdUartDefaultDataBits=0D gEfiMdePkgTokenSpaceGuid.PcdUartDefaultParity=0D gEfiMdePkgTokenSpaceGuid.PcdUartDefaultStopBits=0D - gEfiMdeModulePkgTokenSpaceGuid.PcdBootManagerMenuFile=0D gUefiPayloadPkgTokenSpaceGuid.PcdBootManagerEscape=0D diff --git a/UefiPayloadPkg/UefiPayloadEntry/PrintHob.c b/UefiPayloadPkg/Ue= fiPayloadEntry/PrintHob.c index e959be5d95..3b2b7788d4 100644 --- a/UefiPayloadPkg/UefiPayloadEntry/PrintHob.c +++ b/UefiPayloadPkg/UefiPayloadEntry/PrintHob.c @@ -10,7 +10,6 @@ #include =0D #include =0D #include =0D -#include =0D =0D #define ROW_LIMITER 16=0D =0D @@ -437,27 +436,6 @@ PrintMemoryTypeInfoGuidHob ( return EFI_SUCCESS;=0D }=0D =0D -/**=0D - Print the information in EdkiiBootManagerMenuFileGuid.=0D - @param[in] HobRaw A pointer to the start of gEdkiiBootManagerMe= nuFileGuid HOB.=0D - @param[in] HobLength The size of the HOB data buffer.=0D - @retval EFI_SUCCESS If it completed successfully.=0D -**/=0D -EFI_STATUS=0D -PrintBootManagerMenuGuidHob (=0D - IN UINT8 *HobRaw,=0D - IN UINT16 HobLength=0D - )=0D -{=0D - UNIVERSAL_PAYLOAD_BOOT_MANAGER_MENU *BootManagerMenuFile;=0D -=0D - BootManagerMenuFile =3D (UNIVERSAL_PAYLOAD_BOOT_MANAGER_MENU *)GET_GUID_= HOB_DATA (HobRaw);=0D - ASSERT (HobLength >=3D sizeof (*BootManagerMenuFile));=0D - DEBUG ((DEBUG_INFO, " Revision =3D 0x%x\n", BootManagerMenuFile->Head= er.Revision));=0D - DEBUG ((DEBUG_INFO, " Length =3D 0x%x\n", BootManagerMenuFile->Head= er.Length));=0D - DEBUG ((DEBUG_INFO, " FileName =3D %g\n", &BootManagerMenuFile->FileN= ame));=0D - return EFI_SUCCESS;=0D -}=0D =0D //=0D // Mappint table for dump Guid Hob information.=0D @@ -471,8 +449,7 @@ GUID_HOB_PRINT_HANDLE GuidHobPrintHandleTable[] =3D { { &gUefiAcpiBoardInfoGuid, PrintAcpiBoardInfoGuidHob, = "gUefiAcpiBoardInfoGuid(Acpi Guid)" },=0D { &gUniversalPayloadPciRootBridgeInfoGuid, PrintPciRootBridgeInfoGuidHob= , "gUniversalPayloadPciRootBridgeInfoGuid(Pci Guid)" },=0D { &gEfiMemoryTypeInformationGuid, PrintMemoryTypeInfoGuidHob, = "gEfiMemoryTypeInformationGuid(Memory Type Information Guid)" },=0D - { &gUniversalPayloadExtraDataGuid, PrintExtraDataGuidHob, = "gUniversalPayloadExtraDataGuid(PayLoad Extra Data Guid)" },=0D - { &gEdkiiBootManagerMenuFileGuid, PrintBootManagerMenuGuidHob, = "gEdkiiBootManagerMenuFileGuid(Boot Manager Menu File Guid)" }=0D + { &gUniversalPayloadExtraDataGuid, PrintExtraDataGuidHob, = "gUniversalPayloadExtraDataGuid(PayLoad Extra Data Guid)" }=0D };=0D =0D /**=0D diff --git a/UefiPayloadPkg/UefiPayloadEntry/UniversalPayloadEntry.inf b/Ue= fiPayloadPkg/UefiPayloadEntry/UniversalPayloadEntry.inf index c4f4f28eaa..5112cdc1e5 100644 --- a/UefiPayloadPkg/UefiPayloadEntry/UniversalPayloadEntry.inf +++ b/UefiPayloadPkg/UefiPayloadEntry/UniversalPayloadEntry.inf @@ -69,7 +69,6 @@ gUniversalPayloadAcpiTableGuid=0D gUniversalPayloadPciRootBridgeInfoGuid=0D gUniversalPayloadSmbios3TableGuid=0D - gEdkiiBootManagerMenuFileGuid=0D =0D [FeaturePcd.IA32]=0D gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode ## CONSUME= S=0D diff --git a/UefiPayloadPkg/UefiPayloadPkg.dec b/UefiPayloadPkg/UefiPayload= Pkg.dec index 8d111f3a90..e2e4a79db3 100644 --- a/UefiPayloadPkg/UefiPayloadPkg.dec +++ b/UefiPayloadPkg/UefiPayloadPkg.dec @@ -29,8 +29,6 @@ #=0D gBmpImageGuid =3D { 0x878AC2CC, 0x5343, 0x46F2= , { 0xB5, 0x63, 0x51, 0xF8, 0x9D, 0xAF, 0x56, 0xBA } }=0D =0D - ##include/Guid/BootManagerMenu.h=0D - gEdkiiBootManagerMenuFileGuid =3D { 0xdf939333, 0x42fc, 0x4b2a, { 0xa5, = 0x9e, 0xbb, 0xae, 0x82, 0x81, 0xfe, 0xef }}=0D gEdkiiDebugPrintErrorLevelGuid =3D { 0xad82f436, 0x75c5, 0x4aa9, { 0x92,= 0x93, 0xc5, 0x55, 0x0a, 0x7f, 0xf9, 0x71 }}=0D gUefiAcpiBoardInfoGuid =3D {0xad3d31b, 0xb3d8, 0x4506, {0xae, 0x71, 0x= 2e, 0xf1, 0x10, 0x6, 0xd9, 0xf}}=0D gUefiSerialPortInfoGuid =3D { 0x6c6872fe, 0x56a9, 0x4403, { 0xbb, 0x98,= 0x95, 0x8d, 0x62, 0xde, 0x87, 0xf1 } }=0D diff --git a/UefiPayloadPkg/UefiPayloadPkg.dsc b/UefiPayloadPkg/UefiPayload= Pkg.dsc index 849645a876..47812048dd 100644 --- a/UefiPayloadPkg/UefiPayloadPkg.dsc +++ b/UefiPayloadPkg/UefiPayloadPkg.dsc @@ -441,6 +441,7 @@ gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory|FALSE=0D gEfiMdeModulePkgTokenSpaceGuid.PcdUse1GPageTable|TRUE=0D =0D + gEfiMdeModulePkgTokenSpaceGuid.PcdBootManagerMenuFile|{ 0x21, 0xaa, 0x2c= , 0x46, 0x14, 0x76, 0x03, 0x45, 0x83, 0x6e, 0x8a, 0xb6, 0xf4, 0x66, 0x23, 0= x31 }=0D gUefiPayloadPkgTokenSpaceGuid.PcdPcdDriverFile|{ 0x57, 0x72, 0xcf, 0x80,= 0xab, 0x87, 0xf9, 0x47, 0xa3, 0xfe, 0xD5, 0x0B, 0x76, 0xd8, 0x95, 0x41 }=0D =0D !if $(SOURCE_DEBUG_ENABLE)=0D @@ -651,10 +652,9 @@ NULL|MdeModulePkg/Library/BootManagerUiLib/BootManagerUiLib.inf=0D NULL|MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanc= eManagerUiLib.inf=0D }=0D - MdeModulePkg/Application/BootManagerMenuApp/BootManagerMenuApp.inf {=0D - =0D - NULL|UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManag= erLib.inf=0D - }=0D + MdeModulePkg/Application/BootManagerMenuApp/BootManagerMenuApp.inf=0D +=0D +=0D PcAtChipsetPkg/HpetTimerDxe/HpetTimerDxe.inf=0D MdeModulePkg/Universal/Metronome/Metronome.inf=0D MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf=0D diff --git a/UefiPayloadPkg/UefiPayloadPkg.fdf b/UefiPayloadPkg/UefiPayload= Pkg.fdf index f8c2aa8c4a..835798be1c 100644 --- a/UefiPayloadPkg/UefiPayloadPkg.fdf +++ b/UefiPayloadPkg/UefiPayloadPkg.fdf @@ -59,7 +59,7 @@ INF UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.inf FILE FV_IMAGE =3D 4E35FD93-9C72-4c15-8C4B-E77F1DB2D793 {=0D SECTION FV_IMAGE =3D DXEFV=0D }=0D -=0D +!if $(UNIVERSAL_PAYLOAD) =3D=3D TRUE=0D !if $(NETWORK_DRIVER_ENABLE) =3D=3D TRUE=0D ##########################################################################= ######=0D [FV.NETWORKFV]=0D @@ -112,6 +112,9 @@ READ_LOCK_CAP =3D TRUE READ_LOCK_STATUS =3D TRUE=0D =0D INF MdeModulePkg/Universal/BdsDxe/BdsDxe.inf=0D +INF RuleOverride =3D UI MdeModulePkg/Application/UiApp/UiApp.inf=0D +INF MdeModulePkg/Application/BootManagerMenuApp/BootManagerMenuApp.inf=0D +!endif=0D =0D [FV.DXEFV]=0D FvNameGuid =3D 8063C21A-8E58-4576-95CE-089E87975D23=0D @@ -158,8 +161,6 @@ INF MdeModulePkg/Universal/SecurityStubDxe/SecurityStub= Dxe.inf !endif=0D INF UefiCpuPkg/CpuDxe/CpuDxe.inf=0D =0D -INF RuleOverride =3D UI MdeModulePkg/Application/UiApp/UiApp.inf=0D -INF MdeModulePkg/Application/BootManagerMenuApp/BootManagerMenuApp.inf=0D INF PcAtChipsetPkg/HpetTimerDxe/HpetTimerDxe.inf=0D INF MdeModulePkg/Universal/Metronome/Metronome.inf=0D INF MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf=0D @@ -305,6 +306,8 @@ INF MdeModulePkg/Universal/Acpi/BootGraphicsResourceTa= bleDxe/BootGraphicsResour =0D !if $(UNIVERSAL_PAYLOAD) =3D=3D FALSE=0D INF MdeModulePkg/Universal/BdsDxe/BdsDxe.inf=0D +INF RuleOverride =3D UI MdeModulePkg/Application/UiApp/UiApp.inf=0D +INF MdeModulePkg/Application/BootManagerMenuApp/BootManagerMenuApp.inf=0D #=0D # UEFI network modules=0D #=0D --=20 2.39.1.windows.1