From 7fdf6e8639e55fae16b1218395b3912b1113abd0 Mon Sep 17 00:00:00 2001 From: David Karoly Date: Sun, 27 Mar 2022 19:57:26 +0200 Subject: [PATCH] boot/efi/arm: switch serial output to legacy after exiting EFI boot servieces Change-Id: If7ba007d24cc95ce0a43adc320932e3e1678c25b Reviewed-on: https://review.haiku-os.org/c/haiku/+/5159 Tested-by: Commit checker robot Reviewed-by: Adrien Destugues --- src/system/boot/platform/efi/arch/arm/arch_start.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/system/boot/platform/efi/arch/arm/arch_start.cpp b/src/system/boot/platform/efi/arch/arm/arch_start.cpp index bfb7a06b70..90540bb146 100644 --- a/src/system/boot/platform/efi/arch/arm/arch_start.cpp +++ b/src/system/boot/platform/efi/arch/arm/arch_start.cpp @@ -11,6 +11,7 @@ #include "efi_platform.h" #include "mmu.h" +#include "serial.h" #include "smp.h" @@ -195,11 +196,13 @@ arch_start_kernel(addr_t kernelEntry) dprintf("Calling ExitBootServices. So long, EFI!\n"); while (true) { if (kBootServices->ExitBootServices(kImage, mapKey) == EFI_SUCCESS) { - // The console was provided by boot services, disable it. + // If the console was provided by boot services, disable it. stdout = NULL; stderr = NULL; - // Can we adjust gKernelArgs.platform_args.serial_base_ports[0] - // to something fixed in qemu for debugging? + // Also switch to legacy serial output + // (may not work on all systems) + serial_switch_to_legacy(); + dprintf("Switched to legacy serial output\n"); break; }