From c7c2de798a50acf796ad36f7e99cc548a743368c Mon Sep 17 00:00:00 2001 From: Jiaxin Wu Date: Fri, 15 Dec 2023 16:37:07 +0800 Subject: 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 Cc: Liming Gao Signed-off-by: Jiaxin Wu Reviewed-by: Ray Ni --- MdeModulePkg/Library/DebugAgentLibNull/DebugAgentLibNull.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'MdeModulePkg') 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); } -- cgit v1.2.3