From e4e6b788948817272d37a0cacbc9ca589e65f3dd Mon Sep 17 00:00:00 2001 From: Wei6 Xu Date: Tue, 21 May 2024 11:46:20 +0800 Subject: [PATCH] [Cherry-Pick] StandaloneMmPkg/Core: Dump all HOB info in entrypoint Print HOB information at top of StandaloneMmMain(). Cc: Ard Biesheuvel Cc: Sami Mujawar Cc: Ray Ni Cc: Jiaxin Wu Signed-off-by: Wei6 Xu --- StandaloneMmPkg/Core/StandaloneMmCore.c | 4 ++++ StandaloneMmPkg/Core/StandaloneMmCore.h | 2 +- StandaloneMmPkg/Core/StandaloneMmCore.inf | 1 + StandaloneMmPkg/StandaloneMmPkg.dsc | 1 + 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/StandaloneMmPkg/Core/StandaloneMmCore.c b/StandaloneMmPkg/Core/StandaloneMmCore.c index ed4a9abeca..2e543db2cd 100644 --- a/StandaloneMmPkg/Core/StandaloneMmCore.c +++ b/StandaloneMmPkg/Core/StandaloneMmCore.c @@ -528,6 +528,10 @@ StandaloneMmMain ( DEBUG ((DEBUG_INFO, "MmMain - 0x%x\n", HobStart)); + DEBUG_CODE ( + PrintHobList (HobStart, NULL); + ); + // // Determine if the caller has passed a reference to a MM_CORE_PRIVATE_DATA // structure in the Hoblist. This choice will govern how boot information is diff --git a/StandaloneMmPkg/Core/StandaloneMmCore.h b/StandaloneMmPkg/Core/StandaloneMmCore.h index cfb417d7cc..a8fda6dcc2 100644 --- a/StandaloneMmPkg/Core/StandaloneMmCore.h +++ b/StandaloneMmPkg/Core/StandaloneMmCore.h @@ -40,7 +40,7 @@ #include #include #include - +#include #include #include diff --git a/StandaloneMmPkg/Core/StandaloneMmCore.inf b/StandaloneMmPkg/Core/StandaloneMmCore.inf index 02ecd68f37..8cc9638db5 100644 --- a/StandaloneMmPkg/Core/StandaloneMmCore.inf +++ b/StandaloneMmPkg/Core/StandaloneMmCore.inf @@ -52,6 +52,7 @@ PeCoffLib ReportStatusCodeLib StandaloneMmCoreEntryPoint + HobPrintLib [Protocols] gEfiDxeMmReadyToLockProtocolGuid ## UNDEFINED # SmiHandlerRegister diff --git a/StandaloneMmPkg/StandaloneMmPkg.dsc b/StandaloneMmPkg/StandaloneMmPkg.dsc index 85cf6a34a7..fba831afc5 100644 --- a/StandaloneMmPkg/StandaloneMmPkg.dsc +++ b/StandaloneMmPkg/StandaloneMmPkg.dsc @@ -60,6 +60,7 @@ StandaloneMmCoreEntryPoint|StandaloneMmPkg/Library/StandaloneMmCoreEntryPointNull/StandaloneMmCoreEntryPointNull.inf # MU_CHANGE StandaloneMmDriverEntryPoint|MdePkg/Library/StandaloneMmDriverEntryPoint/StandaloneMmDriverEntryPoint.inf VariableMmDependency|StandaloneMmPkg/Library/VariableMmDependency/VariableMmDependency.inf + HobPrintLib|MdeModulePkg/Library/HobPrintLib/HobPrintLib.inf MmuLib|MdePkg/Library/BaseMmuLibNull/BaseMmuLibNull.inf # MU_CHANGE NULL|MdePkg/Library/StackCheckLibNull/StackCheckLibNull.inf # MU_CHANGE: /GS and -fstack-protector support