21#define MAX_DEBUG_MESSAGE_LENGTH 0x100
23CONST CHAR8 *mHexTable =
"0123456789ABCDEF";
97 CHAR8 Buffer[MAX_DEBUG_MESSAGE_LENGTH];
116 ASSERT (Format !=
NULL);
121 if (BaseListMarker ==
NULL) {
122 AsciiVSPrint (Buffer,
sizeof (Buffer), Format, VaListMarker);
124 AsciiBSPrint (Buffer,
sizeof (Buffer), Format, BaseListMarker);
202 for (Idx = (
sizeof (
UINTN) * 2) - 1; Idx >= 0; Idx--) {
203 Buffer[Idx] = mHexTable[Value & 0x0F];
230 CHAR8 Buffer[MAX_DEBUG_MESSAGE_LENGTH];
238 if (
sizeof (
UINTN) ==
sizeof (UINT32)) {
241 sizeof (Buffer) /
sizeof (CHAR8),
242 "-> EBP:0x00000000 EIP:0x00000000\n",
243 sizeof (Buffer) /
sizeof (CHAR8) - 1
248 sizeof (Buffer) /
sizeof (CHAR8),
249 "-> RBP:0x0000000000000000 RIP:0x0000000000000000\n",
250 sizeof (Buffer) /
sizeof (CHAR8) - 1
255 while (Frame !=
NULL) {
257 FillHex (Frame[1], Buffer + 9 + (
sizeof (
UINTN) * 2) + 8);
259 if ((Frame[0] > (
UINTN)Frame) && (Frame[0] < (
UINTN)Frame + 0x00100000)) {
260 Frame = (
UINTN *)Frame[0];
345 return (BOOLEAN)((
PcdGet8 (PcdDebugPropertyMask) & DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED) != 0);
364 return (BOOLEAN)((
PcdGet8 (PcdDebugPropertyMask) & DEBUG_PROPERTY_DEBUG_PRINT_ENABLED) != 0);
383 return (BOOLEAN)((
PcdGet8 (PcdDebugPropertyMask) & DEBUG_PROPERTY_DEBUG_CODE_ENABLED) != 0);
402 return (BOOLEAN)((
PcdGet8 (PcdDebugPropertyMask) & DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED) != 0);
420 return (BOOLEAN)((ErrorLevel &
PcdGet32 (PcdFixedDebugPrintErrorLevel)) != 0);
VOID EFIAPI DebugAssert(IN CONST CHAR8 *FileName, IN UINTN LineNumber, IN CONST CHAR8 *Description)
VOID EFIAPI DebugVPrint(IN UINTN ErrorLevel, IN CONST CHAR8 *Format, IN VA_LIST VaListMarker)
VOID DebugPrintMarker(IN UINTN ErrorLevel, IN CONST CHAR8 *Format, IN VA_LIST VaListMarker, IN BASE_LIST BaseListMarker)
VOID EFIAPI DebugBPrint(IN UINTN ErrorLevel, IN CONST CHAR8 *Format, IN BASE_LIST BaseListMarker)
VOID *EFIAPI DebugClearMemory(OUT VOID *Buffer, IN UINTN Length)
VOID EFIAPI DebugPrint(IN UINTN ErrorLevel, IN CONST CHAR8 *Format,...)
BOOLEAN EFIAPI DebugCodeEnabled(VOID)
BOOLEAN EFIAPI DebugClearMemoryEnabled(VOID)
BOOLEAN EFIAPI DebugPrintEnabled(VOID)
BOOLEAN EFIAPI DebugAssertEnabled(VOID)
UINTN EFIAPI SerialPortWrite(IN UINT8 *Buffer, IN UINTN NumberOfBytes)
#define VA_START(Marker, Parameter)
RETURN_STATUS EFIAPI AsciiStrnCpyS(OUT CHAR8 *Destination, IN UINTN DestMax, IN CONST CHAR8 *Source, IN UINTN Length)
UINTN EFIAPI AsciiStrLen(IN CONST CHAR8 *String)
VOID EFIAPI CpuDeadLoop(VOID)
UINT8 EFIAPI GetDebugPrintDeviceEnable(VOID)
UINT32 EFIAPI GetDebugPrintErrorLevel(VOID)
BOOLEAN EFIAPI DebugPrintLevelEnabled(IN CONST UINTN ErrorLevel)
VOID DebugAssertInternal(VOID)
VOID FillHex(UINTN Value, CHAR8 *Buffer)
UINTN *EFIAPI GetStackFramePointer(VOID)
UINTN EFIAPI AsciiBSPrint(OUT CHAR8 *StartOfBuffer, IN UINTN BufferSize, IN CONST CHAR8 *FormatString, IN BASE_LIST Marker)
UINTN EFIAPI AsciiVSPrint(OUT CHAR8 *StartOfBuffer, IN UINTN BufferSize, IN CONST CHAR8 *FormatString, IN VA_LIST Marker)
#define PcdGet8(TokenName)
#define PcdGet32(TokenName)