summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOliver Smith-Denny <osde@microsoft.com>2026-01-22 07:31:58 -0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2026-02-03 01:50:23 +0000
commitf0eade598462400380cdd191e0b4b5aeade6ec68 (patch)
treeb65c8df0d47863855a81c6ddb69fe4b2eeb3fdfa
parentffa6fc362aaf0e8d0bb3344e2d2cbe87aaa75531 (diff)
downloadedk2-master.zip
edk2-master.tar.gz
edk2-master.tar.bz2
StandaloneMmPkg: StandaloneMmCore: Log MM Entry/Exit Protocol at VerboseHEADmaster
Currently, StandaloneMmCore prints for every MM entry and exit as well as producing protocols for MM entry and exit that get logged. So there are four logs for every MM entry/exit pair. In a sample OVMF run with StMM enabled, this produced 6800 logs to log MM entry/exit out of 16,400 logs. In other words, > 1/3 of logs were for these prints. Protocol install notifications are useful, but not for these ones that are just entry and exit notifies. This commit only logs at verbose level if the protocol installed is the entry or exit protocol. Signed-off-by: Oliver Smith-Denny <osde@microsoft.com>
-rw-r--r--StandaloneMmPkg/Core/Handle.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/StandaloneMmPkg/Core/Handle.c b/StandaloneMmPkg/Core/Handle.c
index 7df4629..31d6731 100644
--- a/StandaloneMmPkg/Core/Handle.c
+++ b/StandaloneMmPkg/Core/Handle.c
@@ -233,9 +233,15 @@ MmInstallProtocolInterfaceNotify (
}
//
- // Print debug message
+ // Print debug message unless installing MM entry/exit notify protocol as that spams the log
//
- DEBUG ((DEBUG_LOAD | DEBUG_INFO, "MmInstallProtocolInterface: %g %p\n", Protocol, Interface));
+ if (!CompareGuid (Protocol, &gEfiMmEntryNotifyProtocolGuid) &&
+ !CompareGuid (Protocol, &gEfiMmExitNotifyProtocolGuid))
+ {
+ DEBUG ((DEBUG_LOAD | DEBUG_INFO, "MmInstallProtocolInterface: Installing non-entry/exit protocol %g %p\n", Protocol, Interface));
+ } else {
+ DEBUG ((DEBUG_VERBOSE, "MmInstallProtocolInterface: Installing entry/exit protocol %g %p\n", Protocol, Interface));
+ }
Status = EFI_OUT_OF_RESOURCES;
Prot = NULL;