2010-02-26 06:38:04 +01:00
|
|
|
/** @file
|
|
|
|
Debug Agent library implementition with empty functions.
|
|
|
|
|
2010-04-24 11:49:11 +02:00
|
|
|
Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>
|
|
|
|
This program and the accompanying materials
|
2010-02-26 06:38:04 +01:00
|
|
|
are licensed and made available under the terms and conditions of the BSD License
|
|
|
|
which accompanies this distribution. The full text of the license may be found at
|
|
|
|
http://opensource.org/licenses/bsd-license.php
|
|
|
|
|
|
|
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
|
|
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|
|
|
|
|
|
|
**/
|
|
|
|
|
2010-07-19 04:26:09 +02:00
|
|
|
#include <Library/DebugAgentLib.h>
|
|
|
|
|
2010-02-26 06:38:04 +01:00
|
|
|
/**
|
|
|
|
Initialize debug agent.
|
|
|
|
|
2010-07-19 04:26:09 +02:00
|
|
|
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().
|
|
|
|
|
2016-10-19 09:01:25 +02:00
|
|
|
If the parameter Function is not NULL, Debug Agent Library instance will invoke it by
|
2010-07-19 04:26:09 +02:00
|
|
|
passing in the Context to be its parameter.
|
2010-02-26 06:38:04 +01:00
|
|
|
|
2010-07-19 04:26:09 +02:00
|
|
|
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.
|
2010-02-26 06:38:04 +01:00
|
|
|
|
|
|
|
**/
|
|
|
|
VOID
|
|
|
|
EFIAPI
|
|
|
|
InitializeDebugAgent (
|
|
|
|
IN UINT32 InitFlag,
|
2010-07-19 04:26:09 +02:00
|
|
|
IN VOID *Context, OPTIONAL
|
|
|
|
IN DEBUG_AGENT_CONTINUE Function OPTIONAL
|
2010-02-26 06:38:04 +01:00
|
|
|
)
|
|
|
|
{
|
2010-07-19 04:26:09 +02:00
|
|
|
if (Function != NULL) {
|
|
|
|
Function (Context);
|
|
|
|
}
|
2010-02-26 06:38:04 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2010-02-27 18:04:12 +01:00
|
|
|
Enable/Disable the interrupt of debug timer and return the interrupt state
|
|
|
|
prior to the operation.
|
2010-02-26 06:38:04 +01:00
|
|
|
|
|
|
|
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.
|
|
|
|
|
2010-02-27 18:04:12 +01:00
|
|
|
@return FALSE always.
|
|
|
|
|
2010-02-26 06:38:04 +01:00
|
|
|
**/
|
2010-02-27 18:04:12 +01:00
|
|
|
BOOLEAN
|
2010-02-26 06:38:04 +01:00
|
|
|
EFIAPI
|
2010-02-27 18:04:12 +01:00
|
|
|
SaveAndSetDebugTimerInterrupt (
|
2010-02-26 06:38:04 +01:00
|
|
|
IN BOOLEAN EnableStatus
|
|
|
|
)
|
|
|
|
{
|
2010-02-27 18:04:12 +01:00
|
|
|
return FALSE;
|
2010-02-26 06:38:04 +01:00
|
|
|
}
|
|
|
|
|