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>
This commit is contained in:
Jiaxin Wu 2023-12-15 16:37:07 +08:00 committed by mergify[bot]
parent 7b3b39a2e4
commit c7c2de798a
1 changed files with 12 additions and 0 deletions

View File

@ -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);
}