\r
**/\r
\r
-//\r
-// Define the maximum debug and assert message length that this library supports \r
-//\r
-#define MAX_DEBUG_MESSAGE_LENGTH 0x100\r
-\r
/**\r
\r
Prints a debug message to the debug output device if the specified error level is enabled.\r
...\r
)\r
{\r
- CHAR8 Buffer[MAX_DEBUG_MESSAGE_LENGTH];\r
- VA_LIST Marker;\r
-\r
- //\r
- // If Format is NULL, then ASSERT().\r
- //\r
- ASSERT (Format != NULL);\r
-\r
- //\r
- // Print the assert message to a buffer\r
- //\r
- VA_START (Marker, Format);\r
- AsciiVSPrint (Buffer, sizeof (Buffer), Format, Marker);\r
- VA_END (Marker);\r
}\r
\r
\r
IN CONST CHAR8 *Description\r
)\r
{\r
- CHAR8 Buffer[MAX_DEBUG_MESSAGE_LENGTH];\r
-\r
- //\r
- // Print the assert message to a buffer\r
- //\r
- AsciiSPrint (Buffer, sizeof (Buffer), "ASSERT %s(%d): %s\n", FileName, LineNumber, Description);\r
-\r
- //\r
- // Generate a Breakpoint, DeadLoop, or NOP based on PCD settings\r
- //\r
- if ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_ASSERT_BREAKPOINT_ENABLED) != 0) {\r
- CpuBreakpoint ();\r
- } else if ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_ASSERT_DEADLOOP_ENABLED) != 0) {\r
- CpuDeadLoop ();\r
- }\r
}\r
\r
\r
IN UINTN Length\r
)\r
{\r
- //\r
- // If Buffer is NULL, then ASSERT().\r
- //\r
- ASSERT (Buffer != NULL);\r
-\r
- //\r
- // SetMem() checks for the the ASSERT() condition on Length and returns Buffer\r
- //\r
- return SetMem (Buffer, Length, PcdGet8(PcdDebugClearMemoryValue));\r
+ return Buffer;\r
}\r
\r
\r
VOID\r
)\r
{\r
- return ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED) != 0);\r
+ return FALSE;\r
}\r
\r
\r
VOID\r
)\r
{\r
- return ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_DEBUG_PRINT_ENABLED) != 0);\r
+ return FALSE;\r
}\r
\r
\r
VOID\r
)\r
{\r
- return ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_DEBUG_CODE_ENABLED) != 0);\r
+ return FALSE;\r
}\r
\r
\r
VOID\r
)\r
{\r
- return ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED) != 0);\r
+ return FALSE;\r
}\r