From nobody Mon May 6 02:59:34 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+103832+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+103832+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1682998904; cv=none; d=zohomail.com; s=zohoarc; b=BOaxctOtq3go/A33aW5KrGgK+ZTZH2kAS3xvrQWIlKolzNIdd/1pJd2RSveMaUbhIQtap931NU6yT7R1kMB/bKjdvvhMnQL0wuhM9nR+1Rj2mb3DpGMHMycuVIZYc8Wo5+UzzXec4LGbjvwOquw1VhJjmNgpNqEggIMn8CjcPQc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1682998904; h=Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Sender:Subject:To; bh=wKBlLAiHL1BwxBEH2Cetgl2V2/KRGRoREwBHzaVG/ZU=; b=IXnihN0qcvp12GvksQTZRYbjXSpzQW2KPpgQxJeBiQjtVeifR03Q04vyiIRnR7fQQwKUHw2O071mUCleAUSFRYKVmdjGQmXJf/oz7trv5gQhN7fyDWtSArxI6xJ7qECrp3F1k0SqQPObu1sx4w0Z9yfIOi4K8Xy/1DP5DqQLdt4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+103832+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 168299890427659.49334018448337; Mon, 1 May 2023 20:41:44 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id Fu2oYY1788612xIUpFyltBv7; Mon, 01 May 2023 20:41:43 -0700 X-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 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" X-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" X-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: [edk2-devel] [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> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,marsx.lin@intel.com X-Gm-Message-State: LoitBfsHoDXht0eEE9BLvb7Ox1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1682998903; bh=3wKwONYtQjLYDIi3pNinVevSBNO8zgEeCr24DYKSV9U=; h=Cc:Date:From:Reply-To:Subject:To; b=lJjtJu6An5RZIECTKRBVOCnySfa0MYlMskJ2/ZGw/qhqo35iJaWxVVfhfpEEUI4U6uy bSHuhtmwhyoftiHHnPrvE1AfJCrmhL0jG18XTvfd1gjQacC6CEL7VNzL6uj4KYbXy4xRi MDKB6TbkjoZ+CNMEua1H0SJ36ZPCm0jpyrU= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1682998906314100003 Content-Type: text/plain; charset="utf-8" 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 Reviewed-by:Gua Guo --- .../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 =20 #include "PlatformBootManager.h" #include "PlatformConsole.h" -#include -#include =20 /** Signal EndOfDxe event and install SMM Ready to lock protocol. @@ -296,56 +294,3 @@ PlatformBootManagerUnableToBoot ( { return; } - -/** - Get/update PcdBootManagerMenuFile from GUID HOB which will be assigned i= n 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 =3D GetFirstGuidHob (&gEdkiiBootManagerMenuFileGuid); - - if (GuidHob =3D=3D NULL) { - // - // If the HOB is not create, the default value of PcdBootManagerMenuFi= le will be used. - // - return EFI_SUCCESS; - } - - GenericHeader =3D (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 =3D=3D UNIVERSAL_PAYLOAD_BOOT_MANAGER_MENU_R= EVISION) { - BootManagerMenuFile =3D (UNIVERSAL_PAYLOAD_BOOT_MANAGER_MENU *)GET_GUI= D_HOB_DATA (GuidHob); - if (BootManagerMenuFile->Header.Length < UNIVERSAL_PAYLOAD_SIZEOF_THRO= UGH_FIELD (UNIVERSAL_PAYLOAD_BOOT_MANAGER_MENU, FileName)) { - return EFI_NOT_FOUND; - } - - Size =3D sizeof (BootManagerMenuFile->FileName); - Status =3D PcdSetPtrS (PcdBootManagerMenuFile, &Size, &BootManagerMenu= File->FileName); - ASSERT_EFI_ERROR (Status); - } else { - return EFI_NOT_FOUND; - } - - return EFI_SUCCESS; -} 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 VERSION_STRING =3D 1.0 LIBRARY_CLASS =3D PlatformBootManagerLib|DXE_DRIVER - CONSTRUCTOR =3D PlatformBootManagerLibConstructor =20 # # The following information is for reference only and not required by the = build tools. @@ -47,11 +46,9 @@ HiiLib PrintLib PlatformHookLib - HobLib =20 [Guids] gEfiEndOfDxeEventGroupGuid - gEdkiiBootManagerMenuFileGuid =20 [Protocols] gEfiGenericMemTestProtocolGuid ## CONSUMES @@ -74,5 +71,4 @@ gEfiMdePkgTokenSpaceGuid.PcdUartDefaultDataBits gEfiMdePkgTokenSpaceGuid.PcdUartDefaultParity gEfiMdePkgTokenSpaceGuid.PcdUartDefaultStopBits - gEfiMdeModulePkgTokenSpaceGuid.PcdBootManagerMenuFile gUefiPayloadPkgTokenSpaceGuid.PcdBootManagerEscape 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 #include #include -#include =20 #define ROW_LIMITER 16 =20 @@ -437,27 +436,6 @@ PrintMemoryTypeInfoGuidHob ( return EFI_SUCCESS; } =20 -/** - Print the information in EdkiiBootManagerMenuFileGuid. - @param[in] HobRaw A pointer to the start of gEdkiiBootManagerMe= nuFileGuid HOB. - @param[in] HobLength The size of the HOB data buffer. - @retval EFI_SUCCESS If it completed successfully. -**/ -EFI_STATUS -PrintBootManagerMenuGuidHob ( - IN UINT8 *HobRaw, - IN UINT16 HobLength - ) -{ - UNIVERSAL_PAYLOAD_BOOT_MANAGER_MENU *BootManagerMenuFile; - - BootManagerMenuFile =3D (UNIVERSAL_PAYLOAD_BOOT_MANAGER_MENU *)GET_GUID_= HOB_DATA (HobRaw); - ASSERT (HobLength >=3D sizeof (*BootManagerMenuFile)); - DEBUG ((DEBUG_INFO, " Revision =3D 0x%x\n", BootManagerMenuFile->Head= er.Revision)); - DEBUG ((DEBUG_INFO, " Length =3D 0x%x\n", BootManagerMenuFile->Head= er.Length)); - DEBUG ((DEBUG_INFO, " FileName =3D %g\n", &BootManagerMenuFile->FileN= ame)); - return EFI_SUCCESS; -} =20 // // Mappint table for dump Guid Hob information. @@ -471,8 +449,7 @@ GUID_HOB_PRINT_HANDLE GuidHobPrintHandleTable[] =3D { { &gUefiAcpiBoardInfoGuid, PrintAcpiBoardInfoGuidHob, = "gUefiAcpiBoardInfoGuid(Acpi Guid)" }, { &gUniversalPayloadPciRootBridgeInfoGuid, PrintPciRootBridgeInfoGuidHob= , "gUniversalPayloadPciRootBridgeInfoGuid(Pci Guid)" }, { &gEfiMemoryTypeInformationGuid, PrintMemoryTypeInfoGuidHob, = "gEfiMemoryTypeInformationGuid(Memory Type Information Guid)" }, - { &gUniversalPayloadExtraDataGuid, PrintExtraDataGuidHob, = "gUniversalPayloadExtraDataGuid(PayLoad Extra Data Guid)" }, - { &gEdkiiBootManagerMenuFileGuid, PrintBootManagerMenuGuidHob, = "gEdkiiBootManagerMenuFileGuid(Boot Manager Menu File Guid)" } + { &gUniversalPayloadExtraDataGuid, PrintExtraDataGuidHob, = "gUniversalPayloadExtraDataGuid(PayLoad Extra Data Guid)" } }; =20 /** 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 gUniversalPayloadPciRootBridgeInfoGuid gUniversalPayloadSmbios3TableGuid - gEdkiiBootManagerMenuFileGuid =20 [FeaturePcd.IA32] gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode ## CONSUMES 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 @@ # gBmpImageGuid =3D { 0x878AC2CC, 0x5343, 0x46F2= , { 0xB5, 0x63, 0x51, 0xF8, 0x9D, 0xAF, 0x56, 0xBA } } =20 - ##include/Guid/BootManagerMenu.h - gEdkiiBootManagerMenuFileGuid =3D { 0xdf939333, 0x42fc, 0x4b2a, { 0xa5, = 0x9e, 0xbb, 0xae, 0x82, 0x81, 0xfe, 0xef }} gEdkiiDebugPrintErrorLevelGuid =3D { 0xad82f436, 0x75c5, 0x4aa9, { 0x92,= 0x93, 0xc5, 0x55, 0x0a, 0x7f, 0xf9, 0x71 }} gUefiAcpiBoardInfoGuid =3D {0xad3d31b, 0xb3d8, 0x4506, {0xae, 0x71, 0x= 2e, 0xf1, 0x10, 0x6, 0xd9, 0xf}} gUefiSerialPortInfoGuid =3D { 0x6c6872fe, 0x56a9, 0x4403, { 0xbb, 0x98,= 0x95, 0x8d, 0x62, 0xde, 0x87, 0xf1 } } 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 gEfiMdeModulePkgTokenSpaceGuid.PcdUse1GPageTable|TRUE =20 + gEfiMdeModulePkgTokenSpaceGuid.PcdBootManagerMenuFile|{ 0x21, 0xaa, 0x2c= , 0x46, 0x14, 0x76, 0x03, 0x45, 0x83, 0x6e, 0x8a, 0xb6, 0xf4, 0x66, 0x23, 0= x31 } gUefiPayloadPkgTokenSpaceGuid.PcdPcdDriverFile|{ 0x57, 0x72, 0xcf, 0x80,= 0xab, 0x87, 0xf9, 0x47, 0xa3, 0xfe, 0xD5, 0x0B, 0x76, 0xd8, 0x95, 0x41 } =20 !if $(SOURCE_DEBUG_ENABLE) @@ -474,7 +475,6 @@ !endif =20 [PcdsPatchableInModule.common] - gEfiMdeModulePkgTokenSpaceGuid.PcdBootManagerMenuFile|{ 0x21, 0xaa, 0x2c= , 0x46, 0x14, 0x76, 0x03, 0x45, 0x83, 0x6e, 0x8a, 0xb6, 0xf4, 0x66, 0x23, 0= x31 } gEfiMdePkgTokenSpaceGuid.PcdReportStatusCodePropertyMask|0x7 gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x8000004F !if $(USE_CBMEM_FOR_CONSOLE) =3D=3D FALSE @@ -639,10 +639,9 @@ NULL|MdeModulePkg/Library/BootManagerUiLib/BootManagerUiLib.inf NULL|MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanc= eManagerUiLib.inf } - MdeModulePkg/Application/BootManagerMenuApp/BootManagerMenuApp.inf { - - NULL|UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManag= erLib.inf - } + MdeModulePkg/Application/BootManagerMenuApp/BootManagerMenuApp.inf + + PcAtChipsetPkg/HpetTimerDxe/HpetTimerDxe.inf MdeModulePkg/Universal/Metronome/Metronome.inf MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf 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 } =20 +!if $(UNIVERSAL_PAYLOAD) =3D=3D TRUE !if $(NETWORK_DRIVER_ENABLE) =3D=3D TRUE ##########################################################################= ###### [FV.NETWORKFV] @@ -112,6 +113,10 @@ READ_LOCK_CAP =3D TRUE READ_LOCK_STATUS =3D TRUE =20 INF MdeModulePkg/Universal/BdsDxe/BdsDxe.inf +INF RuleOverride =3D UI MdeModulePkg/Application/UiApp/UiApp.inf +INF MdeModulePkg/Application/BootManagerMenuApp/BootManagerMenuApp.inf + +!endif =20 [FV.DXEFV] FvNameGuid =3D 8063C21A-8E58-4576-95CE-089E87975D23 @@ -158,8 +163,6 @@ INF MdeModulePkg/Universal/SecurityStubDxe/SecurityStub= Dxe.inf !endif INF UefiCpuPkg/CpuDxe/CpuDxe.inf =20 -INF RuleOverride =3D UI MdeModulePkg/Application/UiApp/UiApp.inf -INF MdeModulePkg/Application/BootManagerMenuApp/BootManagerMenuApp.inf INF PcAtChipsetPkg/HpetTimerDxe/HpetTimerDxe.inf INF MdeModulePkg/Universal/Metronome/Metronome.inf INF MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf @@ -305,6 +308,8 @@ INF MdeModulePkg/Universal/Acpi/BootGraphicsResourceTa= bleDxe/BootGraphicsResour =20 !if $(UNIVERSAL_PAYLOAD) =3D=3D FALSE INF MdeModulePkg/Universal/BdsDxe/BdsDxe.inf +INF RuleOverride =3D UI MdeModulePkg/Application/UiApp/UiApp.inf +INF MdeModulePkg/Application/BootManagerMenuApp/BootManagerMenuApp.inf # # UEFI network modules # --=20 2.33.0.windows.2 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#103832): https://edk2.groups.io/g/devel/message/103832 Mute This Topic: https://groups.io/mt/98632038/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-