TianoCore EDK2 master
|
#include "SecPeiDebugAgentLib.h"
Go to the source code of this file.
Functions | |
BOOLEAN | MultiProcessorDebugSupport (VOID) |
EFI_STATUS | DebugReadBreakSymbol (IN DEBUG_PORT_HANDLE Handle, OUT UINT8 *BreakSymbol) |
VOID * | GetLocationSavedMailboxPointerInIdtEntry (VOID) |
VOID | SetLocationSavedMailboxPointerInIdtEntry (IN VOID *MailboxLocation) |
UINT64 * | GetMailboxLocationFromHob (VOID) |
DEBUG_AGENT_MAILBOX * | GetMailboxPointer (VOID) |
DEBUG_PORT_HANDLE | GetDebugPortHandle (VOID) |
EFI_STATUS EFIAPI | DebugAgentCallbackMemoryDiscoveredPpi (IN EFI_PEI_SERVICES **PeiServices, IN EFI_PEI_NOTIFY_DESCRIPTOR *NotifyDescriptor, IN VOID *Ppi) |
VOID EFIAPI | InitializeDebugAgent (IN UINT32 InitFlag, IN VOID *Context OPTIONAL, IN DEBUG_AGENT_CONTINUE Function OPTIONAL) |
VOID EFIAPI | InitializeDebugAgentPhase2 (IN VOID *Context, IN DEBUG_PORT_HANDLE DebugPortHandle) |
SEC Core Debug Agent Library instance implementation.
Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file SecPeiDebugAgentLib.c.
EFI_STATUS EFIAPI DebugAgentCallbackMemoryDiscoveredPpi | ( | IN EFI_PEI_SERVICES ** | PeiServices, |
IN EFI_PEI_NOTIFY_DESCRIPTOR * | NotifyDescriptor, | ||
IN VOID * | Ppi | ||
) |
Debug Agent provided notify callback function on Memory Discovered PPI.
[in] | PeiServices | Indirect reference to the PEI Services Table. |
[in] | NotifyDescriptor | Address of the notification descriptor data structure. |
[in] | Ppi | Address of the PPI that was installed. |
EFI_SUCCESS | If the function completed successfully. |
Definition at line 258 of file SecPeiDebugAgentLib.c.
EFI_STATUS DebugReadBreakSymbol | ( | IN DEBUG_PORT_HANDLE | Handle, |
OUT UINT8 * | BreakSymbol | ||
) |
Read the Attach/Break-in symbols from the debug port.
[in] | Handle | Pointer to Debug Port handle. |
[out] | BreakSymbol | Returned break symbol. |
EFI_SUCCESS | Read the symbol in BreakSymbol. |
EFI_NOT_FOUND | No read the break symbol. |
Definition at line 62 of file SecPeiDebugAgentLib.c.
DEBUG_PORT_HANDLE GetDebugPortHandle | ( | VOID | ) |
Get debug port handle.
Definition at line 235 of file SecPeiDebugAgentLib.c.
VOID * GetLocationSavedMailboxPointerInIdtEntry | ( | VOID | ) |
Get the pointer to location saved Mailbox pointer from IDT entry.
Definition at line 119 of file SecPeiDebugAgentLib.c.
UINT64 * GetMailboxLocationFromHob | ( | VOID | ) |
Get the location of Mailbox pointer from the GUIDed HOB.
Definition at line 154 of file SecPeiDebugAgentLib.c.
DEBUG_AGENT_MAILBOX * GetMailboxPointer | ( | VOID | ) |
Get Debug Agent Mailbox pointer.
Definition at line 175 of file SecPeiDebugAgentLib.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 for SEC and PEI phase.
If InitFlag is DEBUG_AGENT_INIT_PREMEM_SEC, it will override IDT table entries and initialize debug port. It will enable interrupt to support break-in feature. It will set up debug agent Mailbox in cache-as-ramfrom. It will be called before physical memory is ready. If InitFlag is DEBUG_AGENT_INIT_POSTMEM_SEC, debug agent will build one GUIDed HOB to copy debug agent Mailbox. It will be called after physical memory is ready.
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 358 of file SecPeiDebugAgentLib.c.
Caller provided function to be invoked at the end of DebugPortInitialize().
Refer to the description for DebugPortInitialize() for more details.
[in] | Context | The first input argument of DebugPortInitialize(). |
[in] | DebugPortHandle | Debug port handle created by Debug Communication Library. |
Definition at line 668 of file SecPeiDebugAgentLib.c.
BOOLEAN MultiProcessorDebugSupport | ( | VOID | ) |
Check if debug agent support multi-processor.
TRUE | Multi-processor is supported. |
FALSE | Multi-processor is not supported. |
Definition at line 44 of file SecPeiDebugAgentLib.c.
VOID SetLocationSavedMailboxPointerInIdtEntry | ( | IN VOID * | MailboxLocation | ) |
Set the pointer of Mailbox into IDT entry before memory is ready.
[in] | MailboxLocation | Pointer to location saved Mailbox pointer. |
Definition at line 140 of file SecPeiDebugAgentLib.c.
GLOBAL_REMOVE_IF_UNREFERENCED EFI_PEI_NOTIFY_DESCRIPTOR mDebugAgentMemoryDiscoveredNotifyList[1] |
Definition at line 28 of file SecPeiDebugAgentLib.c.
GLOBAL_REMOVE_IF_UNREFERENCED BOOLEAN mSkipBreakpoint = FALSE |
Definition at line 11 of file SecPeiDebugAgentLib.c.
GLOBAL_REMOVE_IF_UNREFERENCED EFI_PEI_VECTOR_HANDOFF_INFO_PPI mVectorHandoffInfoPpi |
Definition at line 13 of file SecPeiDebugAgentLib.c.
GLOBAL_REMOVE_IF_UNREFERENCED EFI_PEI_PPI_DESCRIPTOR mVectorHandoffInfoPpiList[] |
Definition at line 20 of file SecPeiDebugAgentLib.c.