From 015c4a37c3e9c4eae88eed7efdbe7650f6a38602 Mon Sep 17 00:00:00 2001 From: Kun Qin Date: Wed, 5 Mar 2025 15:25:59 -0800 Subject: [PATCH] StandaloneMmPkg: Disable assert when gMmCommBufferHobGuid not found. For AARCH64 using StandaloneMmPkg, gMmCommBufferHobGuid will not exist. Aarch64 makes use of their own Root MmiHandler that will get the communication buffer out of a separate buffer, and will call MmiMange directly with the information. For x64, where gMmCommBufferHobGuid is expected to be supplied in the hob list passed to StandaloneCore, if the hob does not exist, print out a debug message describing the failure scenario. Its important to note that a mising gMmCommBufferHobGuid will mean non-root MmiHandlers will not be dispatched in the x64 scenario, but that root MmiHandlers will still be dispatched. Signed-off-by: Aaron Pop Co-authored-by: Aaron Pop --- StandaloneMmPkg/Core/StandaloneMmCore.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/StandaloneMmPkg/Core/StandaloneMmCore.c b/StandaloneMmPkg/Core/StandaloneMmCore.c index 36be31ca53..ba36c5cdb6 100644 --- a/StandaloneMmPkg/Core/StandaloneMmCore.c +++ b/StandaloneMmPkg/Core/StandaloneMmCore.c @@ -446,8 +446,9 @@ MmCorePrepareCommunicationBuffer ( mInternalCommBufferCopy = NULL; GuidHob = GetFirstGuidHob (&gMmCommBufferHobGuid); - ASSERT (GuidHob != NULL); if (GuidHob == NULL) { + DEBUG ((DEBUG_ERROR, "Failed to find MM Communication Buffer HOB\n")); + DEBUG ((DEBUG_ERROR, "Only Root MMI Handlers will be supported!\n")); return; }