From Alex von Gluck IV <kallisti5@xxxxxxxxxxx>:
Alex von Gluck IV has uploaded this change for review. (
https://review.haiku-os.org/c/haiku/+/3109 ;)
Change subject: kernel/arm: Add 'more sane' assumption of pl011 on qemu -M virt
......................................................................
kernel/arm: Add 'more sane' assumption of pl011 on qemu -M virt
Change-Id: Ic544fa0f12ccef4f1bb120525459df3abfc53f3c
---
M src/system/kernel/arch/arm/arch_debug_console.cpp
1 file changed, 6 insertions(+), 1 deletion(-)
git pull ssh://git.haiku-os.org:22/haiku refs/changes/09/3109/1
diff --git a/src/system/kernel/arch/arm/arch_debug_console.cpp
b/src/system/kernel/arch/arm/arch_debug_console.cpp
index dba5ce5..2b2369f 100644
--- a/src/system/kernel/arch/arm/arch_debug_console.cpp
+++ b/src/system/kernel/arch/arm/arch_debug_console.cpp
@@ -18,6 +18,7 @@
#include <vm/vm.h>
#include <string.h>
+#include <arch_uart_pl011.h>
// TODO: Declare this in some header
DebugUART *gArchDebugUART;
@@ -95,16 +96,20 @@
arch_debug_console_init(kernel_args *args)
{
// first try with hints from the FDT
- // TODO: Use UEFI somehow
//gArchDebugUART = debug_uart_from_fdt(args->platform_args.fdt);
+ // TODO: Get debug console from EFI platform_args?
+ // Based on qemu-system-arm -M virt,dumpdtb=file.dtb
+ gArchDebugUART = arch_get_uart_pl011(0x9000000, 0x16e3600);
+
// Do we can some kind of direct fallback here
// (aka, guess arch_get_uart_pl011 or arch_get_uart_8250?)
if (gArchDebugUART == NULL)
return B_ERROR;
gArchDebugUART->InitEarly();
+ gArchDebugUART->InitPort(115200);
return B_OK;
}
--
To view, visit https://review.haiku-os.org/c/haiku/+/3109
To unsubscribe, or for help writing mail filters, visit
https://review.haiku-os.org/settings
Gerrit-Project: haiku
Gerrit-Branch: master
Gerrit-Change-Id: Ic544fa0f12ccef4f1bb120525459df3abfc53f3c
Gerrit-Change-Number: 3109
Gerrit-PatchSet: 1
Gerrit-Owner: Alex von Gluck IV <kallisti5@xxxxxxxxxxx>
Gerrit-MessageType: newchange