diff --git a/MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c b/MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c index 18c9d6c004..94510691db 100644 --- a/MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c +++ b/MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c @@ -471,6 +471,13 @@ DxeMain ( Status = CoreInitializeEventServices (); ASSERT_EFI_ERROR (Status); + // MU_CHANGE: START + // Give the debug agent a chance to initialize with events. + + InitializeDebugAgent (DEBUG_AGENT_INIT_DXE_CORE_LATE, HobStart, NULL); + + // MU_CHANGE: END + MemoryProfileInstallProtocol (); CoreInitializeMemoryAttributesTable (); diff --git a/MdeModulePkg/Include/Library/DebugAgentLib.h b/MdeModulePkg/Include/Library/DebugAgentLib.h index f44c224724..8d3dd4d9f7 100644 --- a/MdeModulePkg/Include/Library/DebugAgentLib.h +++ b/MdeModulePkg/Include/Library/DebugAgentLib.h @@ -22,6 +22,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #define DEBUG_AGENT_INIT_DXE_UNLOAD 11 #define DEBUG_AGENT_INIT_THUNK_PEI_IA32TOX64 12 #define DEBUG_AGENT_INIT_REINITIALIZE 13 // MS_CHANGE +#define DEBUG_AGENT_INIT_DXE_CORE_LATE 14 // MU_CHANGE // // Context for DEBUG_AGENT_INIT_POSTMEM_SEC