From: Andreas Kölbl <[email protected]>

The 8250 chip has two registers to set the baud rate. Write the 8 upper bits to
the UART_DLM register.

Signed-off-by: Andreas Kölbl <[email protected]>
---
 hypervisor/arch/x86/uart.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/hypervisor/arch/x86/uart.c b/hypervisor/arch/x86/uart.c
index 736cf3b2..7c970807 100644
--- a/hypervisor/arch/x86/uart.c
+++ b/hypervisor/arch/x86/uart.c
@@ -69,8 +69,8 @@ void uart_init(void)
                return;
 
        uart_reg_out(UART_LCR, UART_LCR_DLAB);
-       uart_reg_out(UART_DLL, divider);
-       uart_reg_out(UART_DLM, 0);
+       uart_reg_out(UART_DLL, divider & 0xff);
+       uart_reg_out(UART_DLM, (divider >> 8) & 0xff);
        uart_reg_out(UART_LCR, UART_LCR_8N1);
 }
 
-- 
2.11.0

-- 
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].
For more options, visit https://groups.google.com/d/optout.

Reply via email to