For the moment, only support the fast&easy output path that is always available: SBI. No UARTs needed for the hypervisor, SBI suffices atm.
Signed-off-by: Ralf Ramsauer <[email protected]> --- hypervisor/arch/riscv/dbg-write.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/hypervisor/arch/riscv/dbg-write.c b/hypervisor/arch/riscv/dbg-write.c index 6bd75887..187d4517 100644 --- a/hypervisor/arch/riscv/dbg-write.c +++ b/hypervisor/arch/riscv/dbg-write.c @@ -4,14 +4,24 @@ * Copyright (c) Siemens AG, 2020 * * Authors: - * Jan Kiszka <[email protected]> + * Konrad Schwarz <[email protected]> * * This work is licensed under the terms of the GNU GPL, version 2. See * the COPYING file in the top-level directory. */ #include <jailhouse/printk.h> +#include <asm/sbi.h> -void arch_dbg_write_init(void) +static void riscv_dbg_write_sbi(const char *msg) { + char ch; + + while ((ch = *msg++)) + sbi_console_putchar_legacy0_1(ch); +} + +void arch_dbg_write_init (void) +{ + arch_dbg_write = riscv_dbg_write_sbi; } -- 2.36.1 -- You received this message because you are subscribed to the Google Groups "Jailhouse" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jailhouse-dev/20220627132905.4338-14-ralf.ramsauer%40oth-regensburg.de.
