diff options
author | Jiaxin Wu <jiaxin.wu@intel.com> | 2023-12-15 16:37:07 +0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2023-12-26 07:18:26 +0000 |
commit | c7c2de798a50acf796ad36f7e99cc548a743368c (patch) | |
tree | cb414ec1e21497d06859e9d4b9b560f1babacb2b | |
parent | 7b3b39a2e4bdb0f216d539fa1271c49063c49df2 (diff) | |
download | edk2-c7c2de798a50acf796ad36f7e99cc548a743368c.tar.gz |
MdeModulePkg/DebugAgentLibNull: Indicate SMM Debug Agent support or not
This patch is to use the Context to indicate SMM Debug Agent support or
not if InitFlag is DEBUG_AGENT_INIT_SMM. Context must point to a
BOOLEAN if it's not NULL.
Cc: Ray Ni <ray.ni@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com>
Reviewed-by: Ray Ni <ray.ni@Intel.com>
-rw-r--r-- | MdeModulePkg/Library/DebugAgentLibNull/DebugAgentLibNull.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/MdeModulePkg/Library/DebugAgentLibNull/DebugAgentLibNull.c b/MdeModulePkg/Library/DebugAgentLibNull/DebugAgentLibNull.c index 8e70705eb6..27ba486afa 100644 --- a/MdeModulePkg/Library/DebugAgentLibNull/DebugAgentLibNull.c +++ b/MdeModulePkg/Library/DebugAgentLibNull/DebugAgentLibNull.c @@ -24,6 +24,9 @@ If Function() is NULL, Debug Agent Library instance will return after setup debug
environment.
+ If InitFlag is DEBUG_AGENT_INIT_SMM, Context must point to a BOOLEAN if it's not
+ NULL, which indicates SMM Debug Agent supported or not.
+
@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
@@ -38,6 +41,15 @@ InitializeDebugAgent ( IN DEBUG_AGENT_CONTINUE Function OPTIONAL
)
{
+ switch (InitFlag) {
+ case DEBUG_AGENT_INIT_SMM:
+ if (Context != NULL) {
+ *(BOOLEAN *)Context = FALSE;
+ }
+
+ return;
+ }
+
if (Function != NULL) {
Function (Context);
}
|