From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mx.groups.io with SMTP id smtpd.web11.119846.1682998155420468580 for ; Mon, 01 May 2023 20:29:15 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=dfgzg/RH; spf=pass (domain: intel.com, ip: 134.134.136.126, 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=1682998155; x=1714534155; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=bE8w97W8Pw5yL6EDg83g83qCkxiMNictW14E3v9bntk=; b=dfgzg/RHuXev5uVISXjgs+83tpU5ACYjkNw80sWT2vl6AdnigTJawwZn k2zxElPCOU6zHEm432MtUE5yGKoVJxelPnagBZoX64AZVV/ex8CBwd30b +r6Ex1JftN2NsJLdiBomIFua4nqmA3YJZrfF7a9MqIMZfK8uH4EkA9i5o DUWDm7oHqBSmaQWk7MOt9+VokcbLBtBSsfnAU+w037ikSEdBKPuf8JJT6 bF5E72Waf4Y4QNQfIJLIDcgNOmk6sfyqTf2h7aY/IkWh5ixrzeAEL3t3k CqdXvNuN2FL3pK6radky0XvkDvzLPNgJixvPK48NWXjEGTtMZf9sXJT2h g==; X-IronPort-AV: E=McAfee;i="6600,9927,10697"; a="332646652" X-IronPort-AV: E=Sophos;i="5.99,243,1677571200"; d="scan'208";a="332646652" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 May 2023 20:29:14 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10697"; a="726580505" X-IronPort-AV: E=Sophos;i="5.99,243,1677571200"; d="scan'208";a="726580505" Received: from unknown (HELO marslinx-DESK1.gar.corp.intel.com) ([10.5.215.145]) by orsmga008.jf.intel.com with ESMTP; 01 May 2023 20:29:12 -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 BdsFv Date: Tue, 2 May 2023 11:29:09 +0800 Message-Id: <991ab64c70bb6fad9476ba7f81a0b013d090151e.1682997883.git.marsx.lin@intel.com> X-Mailer: git-send-email 2.33.0.windows.2 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 | 9 ++- UefiPayloadPkg/UefiPayloadPkg.fdf | 9 ++- 7 files changed, 12 insertions(+), 93 deletions(-) diff --git a/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootMana= ger.c b/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManager.c index 62637ae6aa..31d1d29435 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 =0D /**=0D Signal EndOfDxe event and install SMM Ready to lock protocol.=0D @@ -296,56 +294,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 f9626175e2..b9387a4d36 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 @@ -47,11 +46,9 @@ HiiLib=0D PrintLib=0D PlatformHookLib=0D - HobLib=0D =0D [Guids]=0D gEfiEndOfDxeEventGroupGuid=0D - gEdkiiBootManagerMenuFileGuid=0D =0D [Protocols]=0D gEfiGenericMemTestProtocolGuid ## CONSUMES=0D @@ -74,5 +71,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 a23a7b5a78..017d9fdb17 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 9847f189ff..a731cfaf4d 100644 --- a/UefiPayloadPkg/UefiPayloadPkg.dsc +++ b/UefiPayloadPkg/UefiPayloadPkg.dsc @@ -429,6 +429,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 @@ -474,7 +475,6 @@ !endif=0D =0D [PcdsPatchableInModule.common]=0D - gEfiMdeModulePkgTokenSpaceGuid.PcdBootManagerMenuFile|{ 0x21, 0xaa, 0x2c= , 0x46, 0x14, 0x76, 0x03, 0x45, 0x83, 0x6e, 0x8a, 0xb6, 0xf4, 0x66, 0x23, 0= x31 }=0D gEfiMdePkgTokenSpaceGuid.PcdReportStatusCodePropertyMask|0x7=0D gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x8000004F=0D !if $(USE_CBMEM_FOR_CONSOLE) =3D=3D FALSE=0D @@ -639,10 +639,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..df4898486b 100644 --- a/UefiPayloadPkg/UefiPayloadPkg.fdf +++ b/UefiPayloadPkg/UefiPayloadPkg.fdf @@ -60,6 +60,7 @@ FILE FV_IMAGE =3D 4E35FD93-9C72-4c15-8C4B-E77F1DB2D793 { 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 +113,10 @@ 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 +=0D +!endif=0D =0D [FV.DXEFV]=0D FvNameGuid =3D 8063C21A-8E58-4576-95CE-089E87975D23=0D @@ -158,8 +163,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 +308,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.33.0.windows.2