diff --git a/MdeModulePkg/Core/Dxe/Gcd/Gcd.c b/MdeModulePkg/Core/Dxe/Gcd/Gcd.c index 792cd2e0af..d55aa1a816 100644 --- a/MdeModulePkg/Core/Dxe/Gcd/Gcd.c +++ b/MdeModulePkg/Core/Dxe/Gcd/Gcd.c @@ -150,6 +150,12 @@ CoreDumpGcdMemorySpaceMap ( EFI_GCD_MEMORY_SPACE_DESCRIPTOR *MemorySpaceMap; UINTN Index; + // MU_CHANGE START: Skip this code if DEBUG_GCD is disabled for performance improvement + if (!DebugPrintLevelEnabled (DEBUG_GCD)) { + return; + } + + // MU_CHANGE Status = CoreGetMemorySpaceMap (&NumberOfDescriptors, &MemorySpaceMap); ASSERT (Status == EFI_SUCCESS && MemorySpaceMap != NULL); diff --git a/UefiCpuPkg/CpuDxe/CpuDxe.c b/UefiCpuPkg/CpuDxe/CpuDxe.c index e2d6f9ca43..cc1e07129f 100644 --- a/UefiCpuPkg/CpuDxe/CpuDxe.c +++ b/UefiCpuPkg/CpuDxe/CpuDxe.c @@ -911,6 +911,7 @@ RefreshGcdMemoryAttributes ( } if (IsPagingAndPageAddressExtensionsEnabled ()) { + DEBUG ((DEBUG_INFO, "Syncing GCD...\n")); // MU_CHANGE RefreshGcdMemoryAttributesFromPaging (); }