2 * Jailhouse, a Linux-based partitioning hypervisor
4 * Copyright (c) Siemens AG, 2013
7 * Jan Kiszka <jan.kiszka@siemens.com>
9 * This work is licensed under the terms of the GNU GPL, version 2. See
10 * the COPYING file in the top-level directory.
20 #define UART_LCR_8N1 0x03
21 #define UART_LCR_DLAB 0x80
23 #define UART_LSR_THRE 0x20
25 unsigned int printk_uart_base;
27 static void uart_write(const char *msg)
35 while (!(inb(printk_uart_base + UART_LSR) & UART_LSR_THRE))
37 outb(c, printk_uart_base + UART_TX);
41 #define console_write(msg) uart_write(msg)
42 #include "../../../hypervisor/printk-core.c"
44 void printk(const char *fmt, ...)
51 outb(UART_LCR_DLAB, printk_uart_base + UART_LCR);
52 #ifdef CONFIG_UART_OXPCIE952
53 outb(0x22, printk_uart_base + UART_DLL);
55 outb(1, printk_uart_base + UART_DLL);
57 outb(0, printk_uart_base + UART_DLM);
58 outb(UART_LCR_8N1, printk_uart_base + UART_LCR);