public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "duntan" <dun.tan@intel.com>
To: devel@edk2.groups.io
Cc: Guo Dong <guo.dong@intel.com>, Ray Ni <ray.ni@intel.com>,
	Maurice Ma <maurice.ma@intel.com>,
	Benjamin You <benjamin.you@intel.com>, DunTan <dun.tan@intel.com>
Subject: [PATCH] UefiPayloadPkg: Dump hob info from gEdkiiBootManagerMenuFileGuid
Date: Mon, 23 Aug 2021 11:24:04 +0800	[thread overview]
Message-ID: <20210823032404.1720-1-dun.tan@intel.com> (raw)

Dump this hob infomation from gEdkiiBootManagerMenuFileGuid

Cc: Guo Dong <guo.dong@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Maurice Ma <maurice.ma@intel.com>
Cc: Benjamin You <benjamin.you@intel.com>
Signed-off-by: DunTan <dun.tan@intel.com>
---
 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 5fb638d4a4..5ee1d6ba64 100644
--- a/UefiPayloadPkg/UefiPayloadEntry/PrintHob.c
+++ b/UefiPayloadPkg/UefiPayloadEntry/PrintHob.c
@@ -10,6 +10,7 @@
 #include <UniversalPayload/ExtraData.h>
 #include <Guid/MemoryTypeInformation.h>
 #include <Guid/AcpiBoardInfoGuid.h>
+#include <Guid/BootManagerMenu.h>
 
 #define ROW_LIMITER 16
 
@@ -406,6 +407,28 @@ PrintMemoryTypeInfoGuidHob (
   return EFI_SUCCESS;
 }
 
+/**
+  Print the information in EdkiiBootManagerMenuFileGuid.
+  @param[in] HobRaw          A pointer to the start of gEdkiiBootManagerMenuFileGuid HOB.
+  @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));
+  ASSERT (HobLength >= BootManagerMenuFile->Header.Length);
+  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.
@@ -418,7 +441,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


             reply	other threads:[~2021-08-23  3:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-23  3:24 duntan [this message]
2021-08-24  3:38 ` [PATCH] UefiPayloadPkg: Dump hob info from gEdkiiBootManagerMenuFileGuid Ni, Ray

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210823032404.1720-1-dun.tan@intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox