]> rtime.felk.cvut.cz Git - jailhouse.git/blobdiff - hypervisor/arch/arm/dbg-write.c
Merge remote-tracking branch 'kiszka/master'
[jailhouse.git] / hypervisor / arch / arm / dbg-write.c
index 1489ae0c3695cb983e33fb9b02fc4905115fbcb8..dc3989f49c96efd4236b7ba926ade1fdb7e8d1d1 100644 (file)
@@ -10,6 +10,7 @@
  * the COPYING file in the top-level directory.
  */
 
+#include <jailhouse/entry.h>
 #include <jailhouse/printk.h>
 #include <jailhouse/processor.h>
 #include <asm/debug.h>
@@ -20,19 +21,20 @@ static struct uart_chip uart;
 void arch_dbg_write_init(void)
 {
        /* FIXME: parse a device tree */
-       uart.baudrate = 115200;
-       uart.fifo_enabled = true;
-       uart.virt_base = UART_BASE_VIRT;
+       uart.virt_base = hypervisor_header.debug_console_base;
 
        uart_chip_init(&uart);
 }
 
 void arch_dbg_write(const char *msg)
 {
-       char c;
+       char c = 0;
 
        while (1) {
-               c = *msg++;
+               if (c == '\n')
+                       c = '\r';
+               else
+                       c = *msg++;
                if (!c)
                        break;