21#define MAX_DEBUG_MESSAGE_LENGTH 0x100
83 CHAR8 AsciiBuffer[MAX_DEBUG_MESSAGE_LENGTH];
88 ASSERT (Format !=
NULL);
93 if ((ErrorLevel &
PcdGet32 (PcdDebugPrintErrorLevel)) == 0) {
100 if (BaseListMarker ==
NULL) {
101 AsciiVSPrint (AsciiBuffer,
sizeof (AsciiBuffer), Format, VaListMarker);
103 AsciiBSPrint (AsciiBuffer,
sizeof (AsciiBuffer), Format, BaseListMarker);
106 SemihostWriteString (AsciiBuffer);
194 CHAR8 AsciiBuffer[MAX_DEBUG_MESSAGE_LENGTH];
199 AsciiSPrint (AsciiBuffer,
sizeof (AsciiBuffer),
"ASSERT %a(%d): %a\n", FileName, LineNumber, Description);
201 SemihostWriteString (AsciiBuffer);
206 if ((
PcdGet8 (PcdDebugPropertyMask) & DEBUG_PROPERTY_ASSERT_BREAKPOINT_ENABLED) != 0) {
208 }
else if ((
PcdGet8 (PcdDebugPropertyMask) & DEBUG_PROPERTY_ASSERT_DEADLOOP_ENABLED) != 0) {
240 ASSERT (Buffer !=
NULL);
245 return SetMem (Buffer, Length,
PcdGet8 (PcdDebugClearMemoryValue));
265 return (BOOLEAN)((
PcdGet8 (PcdDebugPropertyMask) & DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED) != 0);
285 return (BOOLEAN)((
PcdGet8 (PcdDebugPropertyMask) & DEBUG_PROPERTY_DEBUG_PRINT_ENABLED) != 0);
305 return (BOOLEAN)((
PcdGet8 (PcdDebugPropertyMask) & DEBUG_PROPERTY_DEBUG_CODE_ENABLED) != 0);
325 return (BOOLEAN)((
PcdGet8 (PcdDebugPropertyMask) & DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED) != 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)
#define VA_START(Marker, Parameter)
VOID EFIAPI CpuDeadLoop(VOID)
VOID EFIAPI CpuBreakpoint(VOID)
VOID *EFIAPI SetMem(OUT VOID *Buffer, IN UINTN Length, IN UINT8 Value)
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)
UINTN EFIAPI AsciiSPrint(OUT CHAR8 *StartOfBuffer, IN UINTN BufferSize, IN CONST CHAR8 *FormatString,...)
#define PcdGet8(TokenName)
#define PcdGet32(TokenName)