diff options
author | vanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-07-19 02:26:09 +0000 |
---|---|---|
committer | vanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-07-19 02:26:09 +0000 |
commit | 4cf7e0380ebf7e07c2ddee3d2c20daaeb66203a3 (patch) | |
tree | c544583667026265f4d5a0c8a46c30a821d14266 /MdeModulePkg/Library | |
parent | 635021c59421db3d837f4e6797c5dc70bbd78b6f (diff) | |
download | edk2-platforms-4cf7e0380ebf7e07c2ddee3d2c20daaeb66203a3.tar.xz |
1. Add init flag DEBUG_AGENT_INIT_DXE_AP.
2. Add definition DEBUG_AGENT_CONTINUE.
3. Update the definition of InitializeDebugAgent() more comments.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10660 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Library')
-rw-r--r-- | MdeModulePkg/Library/DebugAgentLibNull/DebugAgentLibNull.c | 28 |
1 files changed, 23 insertions, 5 deletions
diff --git a/MdeModulePkg/Library/DebugAgentLibNull/DebugAgentLibNull.c b/MdeModulePkg/Library/DebugAgentLibNull/DebugAgentLibNull.c index 0db1e866b6..09e1366189 100644 --- a/MdeModulePkg/Library/DebugAgentLibNull/DebugAgentLibNull.c +++ b/MdeModulePkg/Library/DebugAgentLibNull/DebugAgentLibNull.c @@ -12,23 +12,41 @@ **/
+#include <Library/DebugAgentLib.h>
+
/**
Initialize debug agent.
- This function is used to set up debug enviroment. It may enable interrupts.
+ This function is used to set up debug environment to support source level debugging.
+ If certain Debug Agent Library instance has to save some private data in the stack,
+ this function must work on the mode that doesn't return to the caller, then
+ the caller needs to wrap up all rest of logic after InitializeDebugAgent() into one
+ function and pass it into InitializeDebugAgent(). InitializeDebugAgent() is
+ responsible to invoke the passing-in function at the end of InitializeDebugAgent().
+
+ If the parameter Function is not NULL, Debug Agent Libary instance will invoke it by
+ passing in the Context to be its parameter.
- @param[in] InitFlag Init flag is used to decide initialize process.
- @param[in] Context Context needed according to InitFlag, it was optional.
+ If Function() is NULL, Debug Agent Library instance will return after setup debug
+ environment.
+
+ @param[in] InitFlag Init flag is used to decide the initialize process.
+ @param[in] Context Context needed according to InitFlag; it was optional.
+ @param[in] Function Continue function called by debug agent library; it was
+ optional.
**/
VOID
EFIAPI
InitializeDebugAgent (
IN UINT32 InitFlag,
- IN VOID *Context OPTIONAL
+ IN VOID *Context, OPTIONAL
+ IN DEBUG_AGENT_CONTINUE Function OPTIONAL
)
{
-
+ if (Function != NULL) {
+ Function (Context);
+ }
}
/**
|