From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mx.groups.io with SMTP id smtpd.web08.6241.1631260914894944153 for ; Fri, 10 Sep 2021 01:01:55 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.151, mailfrom: dun.tan@intel.com) X-IronPort-AV: E=McAfee;i="6200,9189,10102"; a="201216118" X-IronPort-AV: E=Sophos;i="5.85,282,1624345200"; d="scan'208";a="201216118" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Sep 2021 01:01:50 -0700 X-IronPort-AV: E=Sophos;i="5.85,282,1624345200"; d="scan'208";a="540338343" Received: from duntan-mobl.ccr.corp.intel.com ([10.238.1.156]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Sep 2021 01:01:48 -0700 From: "duntan" To: devel@edk2.groups.io Cc: duntan , Guo Dong , Ray Ni , Maurice Ma , Benjamin You , Zhiguang Liu Subject: [Patch V3 2/2] UefiPayloadPkg: Dump hob info from gEdkiiBootManagerMenuFileGuid Date: Fri, 10 Sep 2021 16:01:11 +0800 Message-Id: <20210910080111.113-3-dun.tan@intel.com> X-Mailer: git-send-email 2.31.1.windows.1 In-Reply-To: <20210910080111.113-1-dun.tan@intel.com> References: <20210910080111.113-1-dun.tan@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: duntan V1: Dump this hob infomation from gEdkiiBootManagerMenuFileGuid V2: Delete the duplicated assertions V3: Add input parameter in Comment Cc: Guo Dong Reviewed-by: Ray Ni Cc: Maurice Ma Cc: Benjamin You Reviewed-by: Zhiguang Liu Signed-off-by: Dun Tan --- UefiPayloadPkg/UefiPayloadEntry/PrintHob.c | 26 +++++++++++++++++++++++++- UefiPayloadPkg/UefiPayloadEntry/UniversalPayloadEntry.inf | 1 + 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/UefiPayloadPkg/UefiPayloadEntry/PrintHob.c b/UefiPayloadPkg/UefiPayloadEntry/PrintHob.c index f93aeec472..265d47ca9d 100644 --- a/UefiPayloadPkg/UefiPayloadEntry/PrintHob.c +++ b/UefiPayloadPkg/UefiPayloadEntry/PrintHob.c @@ -10,6 +10,7 @@ #include #include #include +#include #define ROW_LIMITER 16 @@ -410,6 +411,28 @@ PrintMemoryTypeInfoGuidHob ( return EFI_SUCCESS; } +/** + Print the information in EdkiiBootManagerMenuFileGuid. + @param[in] HobRaw A pointer to the start of gEdkiiBootManagerMenuFileGuid HOB. + @param[in] HobLength The size of the 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 = (UNIVERSAL_PAYLOAD_BOOT_MANAGER_MENU *) GET_GUID_HOB_DATA (HobRaw); + ASSERT (HobLength >= sizeof (*BootManagerMenuFile)); + DEBUG ((DEBUG_INFO, " Revision = 0x%x\n", BootManagerMenuFile->Header.Revision)); + DEBUG ((DEBUG_INFO, " Length = 0x%x\n", BootManagerMenuFile->Header.Length)); + DEBUG ((DEBUG_INFO, " FileName = %g\n", &BootManagerMenuFile->FileName)); + return EFI_SUCCESS; +} + // // Mappint table for dump Guid Hob information. // This table can be easily extented. @@ -422,7 +445,8 @@ GUID_HOB_PRINT_HANDLE GuidHobPrintHandleTable[] = { {&gUefiAcpiBoardInfoGuid, PrintAcpiBoardInfoGuidHob, "gUefiAcpiBoardInfoGuid(Acpi Guid)"}, {&gUniversalPayloadPciRootBridgeInfoGuid, PrintPciRootBridgeInfoGuidHob, "gUniversalPayloadPciRootBridgeInfoGuid(Pci Guid)"}, {&gEfiMemoryTypeInformationGuid, PrintMemoryTypeInfoGuidHob, "gEfiMemoryTypeInformationGuid(Memory Type Information Guid)"}, - {&gUniversalPayloadExtraDataGuid, PrintExtraDataGuidHob, "gUniversalPayloadExtraDataGuid(PayLoad Extra Data Guid)"} + {&gUniversalPayloadExtraDataGuid, PrintExtraDataGuidHob, "gUniversalPayloadExtraDataGuid(PayLoad Extra Data Guid)"}, + {&gEdkiiBootManagerMenuFileGuid, PrintBootManagerMenuGuidHob, "gEdkiiBootManagerMenuFileGuid(Boot Manager Menu File Guid)"} }; /** diff --git a/UefiPayloadPkg/UefiPayloadEntry/UniversalPayloadEntry.inf b/UefiPayloadPkg/UefiPayloadEntry/UniversalPayloadEntry.inf index 416a620598..3ee449219d 100644 --- a/UefiPayloadPkg/UefiPayloadEntry/UniversalPayloadEntry.inf +++ b/UefiPayloadPkg/UefiPayloadEntry/UniversalPayloadEntry.inf @@ -70,6 +70,7 @@ gUniversalPayloadAcpiTableGuid gUniversalPayloadPciRootBridgeInfoGuid gUniversalPayloadSmbios3TableGuid + gEdkiiBootManagerMenuFileGuid [FeaturePcd.IA32] gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode ## CONSUMES -- 2.31.1.windows.1