// Wait for the serail port to be ready.\r
//\r
do {\r
- Data = CpuIoRead8 (gComBase + LSR_OFFSET);\r
+ Data = CpuIoRead8 ((UINT16) (gComBase + LSR_OFFSET));\r
} while ((Data & LSR_TXRDY) == 0);\r
\r
CpuIoWrite8 (gComBase, Character);\r
\r
VOID\r
DebugSerialPrint (\r
- IN UINT8 *OutputString\r
+ IN CHAR8 *OutputString\r
)\r
/*++\r
\r
\r
--*/\r
{\r
- EFI_STATUS Status;\r
-\r
- Status = EFI_SUCCESS;\r
-\r
for ( ; *OutputString != 0; OutputString++) {\r
DebugSerialWrite (*OutputString);\r
}\r
\r
Buffer[0] = '\0';\r
\r
- if (ReportStatusCodeExtractAssertInfo (CodeType, Value, Data, &Filename, &Description, &LineNumber)) {\r
+ if (Data != NULL && \r
+ ReportStatusCodeExtractAssertInfo (CodeType, Value, Data, &Filename, &Description, &LineNumber)) {\r
//\r
// Processes PEI_ASSERT ()\r
//\r
Description\r
);\r
\r
- } else if (ReportStatusCodeExtractDebugInfo (Data, &ErrorLevel, &Marker, &Format)) {\r
+ } else if (Data != NULL &&\r
+ ReportStatusCodeExtractDebugInfo (Data, &ErrorLevel, &Marker, &Format)) {\r
//\r
// Process PEI_DEBUG () macro to Serial\r
//\r
// Set communications format\r
//\r
OutputData = (UINT8)((DLAB << 7) | ((gBreakSet << 6) | ((gParity << 3) | ((gStop << 2) | Data))));\r
- CpuIoWrite8 (gComBase + LCR_OFFSET, OutputData);\r
+ CpuIoWrite8 ((UINT16) (gComBase + LCR_OFFSET), OutputData);\r
\r
//\r
// Configure baud rate\r
//\r
- CpuIoWrite8 (gComBase + BAUD_HIGH_OFFSET, (UINT8)(Divisor >> 8));\r
- CpuIoWrite8 (gComBase + BAUD_LOW_OFFSET, (UINT8)(Divisor & 0xff));\r
+ CpuIoWrite8 ((UINT16) (gComBase + BAUD_HIGH_OFFSET), (UINT8)(Divisor >> 8));\r
+ CpuIoWrite8 ((UINT16) (gComBase + BAUD_LOW_OFFSET), (UINT8)(Divisor & 0xff));\r
\r
//\r
// Switch back to bank 0\r
//\r
OutputData = (UINT8)((~DLAB<<7)|((gBreakSet<<6)|((gParity<<3)|((gStop<<2)| Data))));\r
- CpuIoWrite8 (gComBase + LCR_OFFSET, OutputData);\r
+ CpuIoWrite8 ((UINT16) (gComBase + LCR_OFFSET), OutputData);\r
\r
*ReportStatusCode = SerialReportStatusCode;\r
}\r