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 <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
This commit is contained in:
David Karoly
2022-03-29 07:08:48 +00:00
committed by Adrien Destugues
parent a3ef09d41e
commit 7fdf6e8639
@@ -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;
}