mirror of
https://github.com/ipxe/ipxe
synced 2025-12-21 12:30:20 +03:00
[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>
This commit is contained in:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user