[serial] Check for UART existence in uart_select()
authorMichael Brown <mcb30@ipxe.org>
Fri, 31 Jul 2015 10:19:19 +0000 (11:19 +0100)
committerMichael Brown <mcb30@ipxe.org>
Fri, 31 Jul 2015 10:19:19 +0000 (11:19 +0100)
commit2849932c4853ba36edafb5ae16c67e5976d95372
tree04b1e744924248d6e45c24655d756c2349d3b61c
parent9aa55f811a6f43b83be002a634ccce8b8f2c00f8
[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>
src/arch/x86/core/x86_uart.c
src/core/uart.c
src/include/ipxe/uart.h