TianoCore EDK2 master
|
#include <Uefi.h>
#include <Library/BaseLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/DebugLib.h>
#include <Library/DebugAgentLib.h>
#include <Library/PcdLib.h>
#include <Library/PeCoffExtraActionLib.h>
#include <Library/PeCoffLib.h>
#include <Pi/PiFirmwareFile.h>
#include <Pi/PiFirmwareVolume.h>
Go to the source code of this file.
Macros | |
#define | GET_OCCUPIED_SIZE(ActualSize, Alignment) (ActualSize) + (((Alignment) - ((ActualSize) & ((Alignment) - 1))) & ((Alignment) - 1)) |
Functions | |
VOID | DebugAgentVectorTable (VOID) |
STATIC EFI_FFS_FILE_STATE | GetFileState (IN UINT8 ErasePolarity, IN EFI_FFS_FILE_HEADER *FfsHeader) |
STATIC UINT8 | CalculateHeaderChecksum (IN EFI_FFS_FILE_HEADER *FileHeader) |
EFI_STATUS | GetFfsFile (IN EFI_FIRMWARE_VOLUME_HEADER *FwVolHeader, IN EFI_FV_FILETYPE FileType, OUT EFI_FFS_FILE_HEADER **FileHeader) |
EFI_STATUS | GetImageContext (IN EFI_FFS_FILE_HEADER *FfsHeader, OUT PE_COFF_LOADER_IMAGE_CONTEXT *ImageContext) |
VOID EFIAPI | InitializeDebugAgent (IN UINT32 InitFlag, IN VOID *Context OPTIONAL, IN DEBUG_AGENT_CONTINUE Function OPTIONAL) |
BOOLEAN EFIAPI | SaveAndSetDebugTimerInterrupt (IN BOOLEAN EnableStatus) |
Main file supporting the SEC Phase for Versatile Express
Copyright (c) 2011-2014, ARM Limited. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file DebugAgentSymbolsBaseLib.c.
#define GET_OCCUPIED_SIZE | ( | ActualSize, | |
Alignment | |||
) | (ActualSize) + (((Alignment) - ((ActualSize) & ((Alignment) - 1))) & ((Alignment) - 1)) |
Definition at line 22 of file DebugAgentSymbolsBaseLib.c.
STATIC UINT8 CalculateHeaderChecksum | ( | IN EFI_FFS_FILE_HEADER * | FileHeader | ) |
Calculates the checksum of the header of a file. The header is a zero byte checksum, so zero means header is good
FfsHeader | Pointer to FFS File Header |
Checksum | of the header |
Definition at line 77 of file DebugAgentSymbolsBaseLib.c.
EFI_STATUS GetFfsFile | ( | IN EFI_FIRMWARE_VOLUME_HEADER * | FwVolHeader, |
IN EFI_FV_FILETYPE | FileType, | ||
OUT EFI_FFS_FILE_HEADER ** | FileHeader | ||
) |
Definition at line 96 of file DebugAgentSymbolsBaseLib.c.
STATIC EFI_FFS_FILE_STATE GetFileState | ( | IN UINT8 | ErasePolarity, |
IN EFI_FFS_FILE_HEADER * | FfsHeader | ||
) |
Returns the highest bit set of the State field
ErasePolarity | Erase Polarity as defined by EFI_FVB2_ERASE_POLARITY in the Attributes field. |
FfsHeader | Pointer to FFS File Header |
the | highest bit in the State field |
Definition at line 44 of file DebugAgentSymbolsBaseLib.c.
EFI_STATUS GetImageContext | ( | IN EFI_FFS_FILE_HEADER * | FfsHeader, |
OUT PE_COFF_LOADER_IMAGE_CONTEXT * | ImageContext | ||
) |
Definition at line 167 of file DebugAgentSymbolsBaseLib.c.
VOID EFIAPI InitializeDebugAgent | ( | IN UINT32 | InitFlag, |
IN VOID *Context | OPTIONAL, | ||
IN DEBUG_AGENT_CONTINUE Function | OPTIONAL | ||
) |
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.
[in] | InitFlag | Init flag is used to decide the initialize process. |
[in] | Context | Context needed according to InitFlag; it was optional. |
[in] | Function | Continue function called by debug agent library; it was optional. |
Definition at line 268 of file DebugAgentSymbolsBaseLib.c.
BOOLEAN EFIAPI SaveAndSetDebugTimerInterrupt | ( | IN BOOLEAN | EnableStatus | ) |
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.
[in] | EnableStatus | Enable/Disable. |
Definition at line 331 of file DebugAgentSymbolsBaseLib.c.