From 50913d9a6fa0d7ab7bb32d584d0b9749024201fc Mon Sep 17 00:00:00 2001 From: David Karoly Date: Fri, 29 Jul 2022 16:47:54 +0200 Subject: [PATCH] boot/efi: fall back to legacy UART if EFI protocol is not available Change-Id: I70ea16aa8842edcb22a3484cf908698c3c5026c8 Reviewed-on: https://review.haiku-os.org/c/haiku/+/5509 Reviewed-by: Alex von Gluck IV Tested-by: Commit checker robot --- src/system/boot/platform/efi/serial.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/system/boot/platform/efi/serial.cpp b/src/system/boot/platform/efi/serial.cpp index 9d74d8ce74..e54bb63838 100644 --- a/src/system/boot/platform/efi/serial.cpp +++ b/src/system/boot/platform/efi/serial.cpp @@ -39,7 +39,9 @@ enum serial_register_offsets { SERIAL_MODEM_STATUS = 6, }; +#if defined(__i386__) || defined(__x86_64__) static uint16 sSerialBasePort = 0x3f8; +#endif DebugUART* gUART = NULL; @@ -125,6 +127,7 @@ serial_init(void) if (status != EFI_SUCCESS || sSerial == NULL) { sSerial = NULL; + sSerialUsesEFI = false; return; }