TianoCore EDK2 master
|
#include "SmmDebugAgentLib.h"
Go to the source code of this file.
Functions | |
BOOLEAN | MultiProcessorDebugSupport (VOID) |
EFI_STATUS | DebugReadBreakSymbol (IN DEBUG_PORT_HANDLE Handle, OUT UINT8 *BreakSymbol) |
DEBUG_AGENT_MAILBOX * | GetMailboxFromHob (VOID) |
DEBUG_AGENT_MAILBOX * | GetMailboxPointer (VOID) |
DEBUG_PORT_HANDLE | GetDebugPortHandle (VOID) |
VOID | SaveDebugRegister (VOID) |
VOID | RestoreDebugRegister (VOID) |
VOID EFIAPI | InitializeDebugAgent (IN UINT32 InitFlag, IN VOID *Context OPTIONAL, IN DEBUG_AGENT_CONTINUE Function OPTIONAL) |
Variables | |
DEBUG_AGENT_MAILBOX * | mMailboxPointer = NULL |
DEBUG_AGENT_MAILBOX | mLocalMailbox |
UINTN | mSavedDebugRegisters [6] |
IA32_IDT_GATE_DESCRIPTOR | mIdtEntryTable [33] |
BOOLEAN | mSkipBreakpoint = FALSE |
BOOLEAN | mSmmDebugIdtInitFlag = FALSE |
BOOLEAN | mApicTimerRestore = FALSE |
BOOLEAN | mPeriodicMode |
UINT32 | mTimerCycle |
UINTN | mApicTimerDivisor |
UINT8 | mVector |
CHAR8 | mWarningMsgIgnoreSmmEntryBreak [] = "Ignore smmentrybreak setting for SMI issued during DXE debugging!\r\n" |
Debug Agent library implementation.
Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file SmmDebugAgentLib.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 51 of file SmmDebugAgentLib.c.
DEBUG_PORT_HANDLE GetDebugPortHandle | ( | VOID | ) |
DEBUG_AGENT_MAILBOX * GetMailboxFromHob | ( | VOID | ) |
Get the pointer to Mailbox from the GUIDed HOB.
Definition at line 69 of file SmmDebugAgentLib.c.
DEBUG_AGENT_MAILBOX * GetMailboxPointer | ( | VOID | ) |
Get Debug Agent Mailbox pointer.
Definition at line 96 of file SmmDebugAgentLib.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 source level debug in SMM code.
If InitFlag is DEBUG_AGENT_INIT_SMM, it will override IDT table entries and initialize debug port. It will get debug agent Mailbox from GUIDed HOB, it it exists, debug agent wiil copied it into the local Mailbox in SMM space. it will override IDT table entries and initialize debug port. Context must point to a BOOLEAN if it's not NULL, which indicates SMM Debug Agent supported or not. If InitFlag is DEBUG_AGENT_INIT_ENTER_SMI, debug agent will save Debug Registers and get local Mailbox in SMM space. Context will be NULL. If InitFlag is DEBUG_AGENT_INIT_EXIT_SMI, debug agent will restore Debug Registers. Context will be NULL.
[in] | InitFlag | Init flag is used to decide initialize process. |
[in] | Context | Context needed according to InitFlag. |
[in] | Function | Continue function called by debug agent library; it was optional. |
Definition at line 178 of file SmmDebugAgentLib.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 33 of file SmmDebugAgentLib.c.
VOID RestoreDebugRegister | ( | VOID | ) |
Restore debug register when SMI exit.
Definition at line 140 of file SmmDebugAgentLib.c.
VOID SaveDebugRegister | ( | VOID | ) |
Store debug register when SMI exit.
Definition at line 123 of file SmmDebugAgentLib.c.
UINTN mApicTimerDivisor |
Definition at line 20 of file SmmDebugAgentLib.c.
BOOLEAN mApicTimerRestore = FALSE |
Definition at line 17 of file SmmDebugAgentLib.c.
IA32_IDT_GATE_DESCRIPTOR mIdtEntryTable[33] |
Definition at line 14 of file SmmDebugAgentLib.c.
DEBUG_AGENT_MAILBOX mLocalMailbox |
Definition at line 12 of file SmmDebugAgentLib.c.
DEBUG_AGENT_MAILBOX* mMailboxPointer = NULL |
Definition at line 11 of file SmmDebugAgentLib.c.
BOOLEAN mPeriodicMode |
Definition at line 18 of file SmmDebugAgentLib.c.
UINTN mSavedDebugRegisters[6] |
Definition at line 13 of file SmmDebugAgentLib.c.
BOOLEAN mSkipBreakpoint = FALSE |
Definition at line 15 of file SmmDebugAgentLib.c.
BOOLEAN mSmmDebugIdtInitFlag = FALSE |
Definition at line 16 of file SmmDebugAgentLib.c.
UINT32 mTimerCycle |
Definition at line 19 of file SmmDebugAgentLib.c.
UINT8 mVector |
Definition at line 21 of file SmmDebugAgentLib.c.
CHAR8 mWarningMsgIgnoreSmmEntryBreak[] = "Ignore smmentrybreak setting for SMI issued during DXE debugging!\r\n" |
Definition at line 23 of file SmmDebugAgentLib.c.