{\r
CHAR8 Buffer[MAX_DEBUG_MESSAGE_LENGTH];\r
VA_LIST Marker;\r
- UINT8 *Ptr;\r
+ UINTN Length;\r
\r
//\r
// If Format is NULL, then ASSERT().\r
// Convert the DEBUG() message to an ASCII String\r
//\r
VA_START (Marker, Format);\r
- AsciiVSPrint (Buffer, sizeof (Buffer), Format, Marker);\r
+ Length = AsciiVSPrint (Buffer, sizeof (Buffer), Format, Marker);\r
VA_END (Marker);\r
\r
//\r
// Send the print string to the debug I/O port\r
//\r
- for (Ptr = (UINT8 *) Buffer; *Ptr; Ptr++) {\r
- IoWrite8 (PcdGet16(PcdDebugIoPort), *Ptr);\r
- }\r
+ IoWriteFifo8 (PcdGet16 (PcdDebugIoPort), Length, Buffer);\r
}\r
\r
\r
)\r
{\r
CHAR8 Buffer[MAX_DEBUG_MESSAGE_LENGTH];\r
- UINT8 *Ptr;\r
+ UINTN Length;\r
\r
//\r
// Generate the ASSERT() message in Ascii format\r
//\r
- AsciiSPrint (Buffer, sizeof Buffer, "ASSERT %a(%Lu): %a\n", FileName,\r
- (UINT64)LineNumber, Description);\r
+ Length = AsciiSPrint (Buffer, sizeof Buffer, "ASSERT %a(%Lu): %a\n",\r
+ FileName, (UINT64)LineNumber, Description);\r
\r
//\r
- // Send the print string to the Console Output device\r
+ // Send the print string to the debug I/O port\r
//\r
- for (Ptr = (UINT8 *) Buffer; *Ptr; Ptr++) {\r
- IoWrite8 (PcdGet16(PcdDebugIoPort), *Ptr);\r
- }\r
+ IoWriteFifo8 (PcdGet16 (PcdDebugIoPort), Length, Buffer);\r
\r
//\r
// Generate a Breakpoint, DeadLoop, or NOP based on PCD settings\r