Check for OVMF and prevent doubled messages on serial console
All checks were successful
ci/woodpecker/push/build Pipeline was successful

This commit is contained in:
Rafal Kupiec 2022-09-27 18:39:26 +02:00
parent 67acacf528
commit bf9171b66a
Signed by: belliash
GPG Key ID: 4E829243E0CFE6B4

View File

@ -227,11 +227,15 @@ BlEfiPrint(IN PUINT16 Format,
/* Format and print the string to the stdout */ /* Format and print the string to the stdout */
BlStringPrint(BlConsolePutChar, Format, Arguments); BlStringPrint(BlConsolePutChar, Format, Arguments);
/* Check if EFI serial port is fully initialized */ /* Print to serial console only if not running under OVMF */
if(EfiSerialPort.Flags & COMPORT_FLAG_INIT) if(RtlWideStringCompare(EfiSystemTable->FirmwareVendor, L"EDK II", 6) != 0)
{ {
/* Format and print the string to the serial console */ /* Check if EFI serial port is fully initialized */
BlStringPrint(BlComPortPutChar, Format, Arguments); if(EfiSerialPort.Flags & COMPORT_FLAG_INIT)
{
/* Format and print the string to the serial console */
BlStringPrint(BlComPortPutChar, Format, Arguments);
}
} }
/* Clean up the va_list */ /* Clean up the va_list */