From bb0831670f11b710f36e1932d8ba83f1754f74dd Mon Sep 17 00:00:00 2001 From: "Leahy, Leroy P" Date: Mon, 9 May 2016 10:57:08 -0700 Subject: [PATCH] CorebootModulePkg/BaseSerialPortLib: Set DTR and RTS Ensure communication between the host and the UEFI system running CorebootPayloadPkg. In cases where the host has flow control enabled and the serial connection is providing the flow control signals, the host will not be able to send data to the UEFI system because DTR and RTS are not present. The host may also discard all output data from the UEFI system because DTR is not present. By setting DTR and RTS in the UART initialization code this case works properly. Change-Id: I393f57104d111472cafcae01d4e43d4ea837be3b Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Lee Leahy Reviewed-by: Prince Agyeman --- .../Library/BaseSerialPortLib16550/BaseSerialPortLib16550.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CorebootModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.c b/CorebootModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.c index 45056363c3..ca6db2306a 100644 --- a/CorebootModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.c +++ b/CorebootModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.c @@ -554,9 +554,10 @@ SerialPortInitialize ( SerialPortWriteRegister (SerialRegisterBase, R_UART_FCR, (UINT8)(PcdGet8 (PcdSerialFifoControl) & (B_UART_FCR_FIFOE | B_UART_FCR_FIFO64))); // - // Put Modem Control Register(MCR) into its reset state of 0x00. + // Set RTS and DTR in Modem Control Register(MCR) // - SerialPortWriteRegister (SerialRegisterBase, R_UART_MCR, 0x00); + SerialPortWriteRegister (SerialRegisterBase, R_UART_MCR, + EFI_SERIAL_REQUEST_TO_SEND | EFI_SERIAL_DATA_TERMINAL_READY); return RETURN_SUCCESS; }