diff options
author | Chris Fernald <chfernal@microsoft.com> | 2023-11-16 15:10:54 -0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2024-12-16 20:49:45 +0000 |
commit | 17e67d26d9f8da373a70fa90146a77a8211c892b (patch) | |
tree | 96d506fa2297263f1dc32e30e7969ce4333ba84a /MdeModulePkg | |
parent | e99d532fd7224e68026543834ed9c0fe3cfaf88c (diff) | |
download | edk2-17e67d26d9f8da373a70fa90146a77a8211c892b.tar.gz |
MdeModulePkg DxeMain: Add late initialization for Debug Agent.
Add a late initialize in DxeMain for the debug agent. This is required
for the debug agent to be able to setup events to handle image loads,
exit boot services, and other important callbacks.
Define a reinitialize debug agent.
Signed-off-by: Aaron Pop <aaronpop@microsoft.com>
Diffstat (limited to 'MdeModulePkg')
-rw-r--r-- | MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c | 5 | ||||
-rw-r--r-- | MdeModulePkg/Include/Library/DebugAgentLib.h | 2 |
2 files changed, 7 insertions, 0 deletions
diff --git a/MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c b/MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c index 5471e4259d..50ab5fb844 100644 --- a/MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c +++ b/MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c @@ -463,6 +463,11 @@ DxeMain ( Status = CoreInitializeEventServices ();
ASSERT_EFI_ERROR (Status);
+ //
+ // Give the debug agent a chance to initialize with events.
+ //
+ InitializeDebugAgent (DEBUG_AGENT_INIT_DXE_CORE_LATE, HobStart, NULL);
+
MemoryProfileInstallProtocol ();
CoreInitializeMemoryAttributesTable ();
diff --git a/MdeModulePkg/Include/Library/DebugAgentLib.h b/MdeModulePkg/Include/Library/DebugAgentLib.h index f44bc5c563..c74254ebb7 100644 --- a/MdeModulePkg/Include/Library/DebugAgentLib.h +++ b/MdeModulePkg/Include/Library/DebugAgentLib.h @@ -21,6 +21,8 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #define DEBUG_AGENT_INIT_DXE_LOAD 10
#define DEBUG_AGENT_INIT_DXE_UNLOAD 11
#define DEBUG_AGENT_INIT_THUNK_PEI_IA32TOX64 12
+#define DEBUG_AGENT_INIT_REINITIALIZE 13
+#define DEBUG_AGENT_INIT_DXE_CORE_LATE 14
//
// Context for DEBUG_AGENT_INIT_POSTMEM_SEC
|