diff options
| author | kx <kx@radix.pro> | 2024-06-04 06:43:08 +0300 |
|---|---|---|
| committer | kx <kx@radix.pro> | 2024-06-04 06:43:08 +0300 |
| commit | 7e2ccccace24636f29ddc210b94606abd4c7e42b (patch) | |
| tree | 545d43ea12671048956cafeb12303e84d601e571 /MdeModulePkg/Library/DebugAgentLibNull | |
| parent | 27b044605cd5f6b33a3d231576003850b3fe305b (diff) | |
| download | edk2-trunk.tar.xz | |
Renormalized end-of-lines from master@27b044605cd5f6b33a3d231576003850b3fe305btrunk
Diffstat (limited to 'MdeModulePkg/Library/DebugAgentLibNull')
3 files changed, 124 insertions, 124 deletions
diff --git a/MdeModulePkg/Library/DebugAgentLibNull/DebugAgentLibNull.c b/MdeModulePkg/Library/DebugAgentLibNull/DebugAgentLibNull.c index 27ba486afa..aa9cb4f6c1 100644 --- a/MdeModulePkg/Library/DebugAgentLibNull/DebugAgentLibNull.c +++ b/MdeModulePkg/Library/DebugAgentLibNull/DebugAgentLibNull.c @@ -1,77 +1,77 @@ -/** @file
- Debug Agent library implementition with empty functions.
-
- Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>
- SPDX-License-Identifier: BSD-2-Clause-Patent
-
-**/
-
-#include <Library/DebugAgentLib.h>
-
-/**
- Initialize debug agent.
-
- 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 Library instance will invoke it by
- passing in the Context to be its parameter.
-
- 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
- optional.
-
-**/
-VOID
-EFIAPI
-InitializeDebugAgent (
- IN UINT32 InitFlag,
- IN VOID *Context OPTIONAL,
- 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);
- }
-}
-
-/**
- Enable/Disable the interrupt of debug timer and return the interrupt state
- prior to the operation.
-
- If EnableStatus is TRUE, enable the interrupt of debug timer.
- If EnableStatus is FALSE, disable the interrupt of debug timer.
-
- @param[in] EnableStatus Enable/Disable.
-
- @return FALSE always.
-
-**/
-BOOLEAN
-EFIAPI
-SaveAndSetDebugTimerInterrupt (
- IN BOOLEAN EnableStatus
- )
-{
- return FALSE;
-}
+/** @file + Debug Agent library implementition with empty functions. + + Copyright (c) 2010, Intel Corporation. All rights reserved.<BR> + SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#include <Library/DebugAgentLib.h> + +/** + Initialize debug agent. + + 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 Library instance will invoke it by + passing in the Context to be its parameter. + + 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 + optional. + +**/ +VOID +EFIAPI +InitializeDebugAgent ( + IN UINT32 InitFlag, + IN VOID *Context OPTIONAL, + 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); + } +} + +/** + Enable/Disable the interrupt of debug timer and return the interrupt state + prior to the operation. + + If EnableStatus is TRUE, enable the interrupt of debug timer. + If EnableStatus is FALSE, disable the interrupt of debug timer. + + @param[in] EnableStatus Enable/Disable. + + @return FALSE always. + +**/ +BOOLEAN +EFIAPI +SaveAndSetDebugTimerInterrupt ( + IN BOOLEAN EnableStatus + ) +{ + return FALSE; +} diff --git a/MdeModulePkg/Library/DebugAgentLibNull/DebugAgentLibNull.inf b/MdeModulePkg/Library/DebugAgentLibNull/DebugAgentLibNull.inf index b623e35a1d..dbd2a97da8 100644 --- a/MdeModulePkg/Library/DebugAgentLibNull/DebugAgentLibNull.inf +++ b/MdeModulePkg/Library/DebugAgentLibNull/DebugAgentLibNull.inf @@ -1,31 +1,31 @@ -## @file
-# Null instance of Debug Agent Library with empty functions.
-#
-# Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.<BR>
-#
-# SPDX-License-Identifier: BSD-2-Clause-Patent
-#
-##
-
-[Defines]
- INF_VERSION = 0x00010005
- BASE_NAME = DebugAgentLibNull
- MODULE_UNI_FILE = DebugAgentLibNull.uni
- FILE_GUID = 4904B42F-9FC0-4c2e-BB3F-A2AB35123530
- MODULE_TYPE = BASE
- VERSION_STRING = 1.0
- LIBRARY_CLASS = DebugAgentLib
-
-#
-# The following information is for reference only and not required by the build tools.
-#
-# VALID_ARCHITECTURES = IA32 X64 EBC
-#
-
-[Sources.common]
- DebugAgentLibNull.c
-
-[Packages]
- MdePkg/MdePkg.dec
- MdeModulePkg/MdeModulePkg.dec
-
+## @file +# Null instance of Debug Agent Library with empty functions. +# +# Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.<BR> +# +# SPDX-License-Identifier: BSD-2-Clause-Patent +# +## + +[Defines] + INF_VERSION = 0x00010005 + BASE_NAME = DebugAgentLibNull + MODULE_UNI_FILE = DebugAgentLibNull.uni + FILE_GUID = 4904B42F-9FC0-4c2e-BB3F-A2AB35123530 + MODULE_TYPE = BASE + VERSION_STRING = 1.0 + LIBRARY_CLASS = DebugAgentLib + +# +# The following information is for reference only and not required by the build tools. +# +# VALID_ARCHITECTURES = IA32 X64 EBC +# + +[Sources.common] + DebugAgentLibNull.c + +[Packages] + MdePkg/MdePkg.dec + MdeModulePkg/MdeModulePkg.dec + diff --git a/MdeModulePkg/Library/DebugAgentLibNull/DebugAgentLibNull.uni b/MdeModulePkg/Library/DebugAgentLibNull/DebugAgentLibNull.uni index eeb258b0ca..e524b53633 100644 --- a/MdeModulePkg/Library/DebugAgentLibNull/DebugAgentLibNull.uni +++ b/MdeModulePkg/Library/DebugAgentLibNull/DebugAgentLibNull.uni @@ -1,16 +1,16 @@ -// /** @file
-// Null instance of Debug Agent Library with empty functions.
-//
-// Null instance of Debug Agent Library with empty functions.
-//
-// Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.<BR>
-//
-// SPDX-License-Identifier: BSD-2-Clause-Patent
-//
-// **/
-
-
-#string STR_MODULE_ABSTRACT #language en-US "Null instance of Debug Agent Library with empty functions"
-
-#string STR_MODULE_DESCRIPTION #language en-US "Null instance of Debug Agent Library with empty functions."
-
+// /** @file +// Null instance of Debug Agent Library with empty functions. +// +// Null instance of Debug Agent Library with empty functions. +// +// Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.<BR> +// +// SPDX-License-Identifier: BSD-2-Clause-Patent +// +// **/ + + +#string STR_MODULE_ABSTRACT #language en-US "Null instance of Debug Agent Library with empty functions" + +#string STR_MODULE_DESCRIPTION #language en-US "Null instance of Debug Agent Library with empty functions." + |
