diff options
| author | Michael Brown | 2015-07-31 12:19:19 +0200 |
|---|---|---|
| committer | Michael Brown | 2015-07-31 12:19:19 +0200 |
| commit | 2849932c4853ba36edafb5ae16c67e5976d95372 (patch) | |
| tree | 04b1e744924248d6e45c24655d756c2349d3b61c /src/include/ipxe | |
| parent | [comboot] Avoid dragging in serial console support unconditionally (diff) | |
| download | ipxe-2849932c4853ba36edafb5ae16c67e5976d95372.tar.gz ipxe-2849932c4853ba36edafb5ae16c67e5976d95372.tar.xz ipxe-2849932c4853ba36edafb5ae16c67e5976d95372.zip | |
[serial] Check for UART existence in uart_select()
Check for existence of the UART in uart_select(), not just in
uart_init(). This allows uart_select() to refuse to set a non-working
address in uart->base, which in turns means that the serial console
code will not attempt to use a non-existent UART.
Reported-by: Torgeir Wulfsberg <Torgeir.Wulfsberg@kongsberg.com>
Reported-by: Ján ONDREJ (SAL) <ondrejj@salstar.sk>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/include/ipxe')
| -rw-r--r-- | src/include/ipxe/uart.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/include/ipxe/uart.h b/src/include/ipxe/uart.h index 122c79b13..c63eae615 100644 --- a/src/include/ipxe/uart.h +++ b/src/include/ipxe/uart.h @@ -126,6 +126,7 @@ static inline uint8_t uart_receive ( struct uart *uart ) { extern void uart_transmit ( struct uart *uart, uint8_t data ); extern void uart_flush ( struct uart *uart ); +extern int uart_exists ( struct uart *uart ); extern int uart_init ( struct uart *uart, unsigned int baud, uint8_t lcr ); #endif /* _IPXE_UART_H */ |
