Mark serial port as fully initialized and always check that before printing anything to the serial console
All checks were successful
ci/woodpecker/push/build Pipeline was successful

This commit is contained in:
2022-08-10 17:56:41 +02:00
parent a9171bd512
commit e6aaa1a83c
3 changed files with 25 additions and 11 deletions

View File

@@ -28,14 +28,18 @@ BlDbgPrint(IN PUINT16 Format,
{
VA_LIST Arguments;
/* Initialise the va_list */
VA_START(Arguments, Format);
/* Check if EFI serial port is fully initialized */
if(EfiSerialPort.Flags & COMPORT_FLAG_INIT)
{
/* Initialise the va_list */
VA_START(Arguments, Format);
/* Format and print the string to the serial console */
BlStringPrint(BlComPortPutChar, Format, Arguments);
/* Format and print the string to the serial console */
BlStringPrint(BlComPortPutChar, Format, Arguments);
/* Clean up the va_list */
VA_END(Arguments);
/* Clean up the va_list */
VA_END(Arguments);
}
}
/**
@@ -65,8 +69,12 @@ BlEfiPrint(IN PUINT16 Format,
/* Format and print the string to the stdout */
BlStringPrint(BlConsolePutChar, Format, Arguments);
/* Format and print the string to the serial console */
BlStringPrint(BlComPortPutChar, Format, Arguments);
/* Check if EFI serial port is fully initialized */
if(EfiSerialPort.Flags & COMPORT_FLAG_INIT)
{
/* Format and print the string to the serial console */
BlStringPrint(BlComPortPutChar, Format, Arguments);
}
/* Clean up the va_list */
VA_END(Arguments);