TianoCore EDK2 master
Loading...
Searching...
No Matches
DebugAgentSymbolsBaseLib.c File Reference

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)
 

Detailed Description

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.

Macro Definition Documentation

◆ GET_OCCUPIED_SIZE

#define GET_OCCUPIED_SIZE (   ActualSize,
  Alignment 
)     (ActualSize) + (((Alignment) - ((ActualSize) & ((Alignment) - 1))) & ((Alignment) - 1))

Definition at line 22 of file DebugAgentSymbolsBaseLib.c.

Function Documentation

◆ CalculateHeaderChecksum()

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

Parameters
FfsHeaderPointer to FFS File Header
Return values
Checksumof the header

Definition at line 77 of file DebugAgentSymbolsBaseLib.c.

◆ GetFfsFile()

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.

◆ GetFileState()

STATIC EFI_FFS_FILE_STATE GetFileState ( IN UINT8  ErasePolarity,
IN EFI_FFS_FILE_HEADER FfsHeader 
)

Returns the highest bit set of the State field

Parameters
ErasePolarityErase Polarity as defined by EFI_FVB2_ERASE_POLARITY in the Attributes field.
FfsHeaderPointer to FFS File Header
Return values
thehighest bit in the State field

Definition at line 44 of file DebugAgentSymbolsBaseLib.c.

◆ GetImageContext()

EFI_STATUS GetImageContext ( IN EFI_FFS_FILE_HEADER FfsHeader,
OUT PE_COFF_LOADER_IMAGE_CONTEXT ImageContext 
)

Definition at line 167 of file DebugAgentSymbolsBaseLib.c.

◆ InitializeDebugAgent()

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.

Parameters
[in]InitFlagInit flag is used to decide the initialize process.
[in]ContextContext needed according to InitFlag; it was optional.
[in]FunctionContinue function called by debug agent library; it was optional.

Definition at line 268 of file DebugAgentSymbolsBaseLib.c.

◆ SaveAndSetDebugTimerInterrupt()

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.

Parameters
[in]EnableStatusEnable/Disable.
Returns
FALSE always.

Definition at line 331 of file DebugAgentSymbolsBaseLib.c.