mirror of
https://github.com/ipxe/ipxe
synced 2026-02-02 19:57:34 +03:00
[uart] Allow for the existence of non-16550 UARTs
Remove the assumption that all platforms use a fixed number of 16550 UARTs identifiable by a simple numeric index. Create an abstraction allowing for dynamic instantiation and registration of any number of arbitrary UART models. The common case of the serial console on x86 uses a single fixed UART specified at compile time. Avoid unnecessarily dragging in the dynamic instantiation code in this use case by allowing COMCONSOLE to refer to a single static UART object representing the relevant port. When selecting a UART by command-line argument (as used in the "gdbstub serial <port>" command), allow the UART to be specified as either a numeric index (to retain backwards compatiblity) or a case-insensitive port name such as "COM2". Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
#ifndef _BITS_UART_H
|
||||
#define _BITS_UART_H
|
||||
#ifndef _BITS_NS16550_H
|
||||
#define _BITS_NS16550_H
|
||||
|
||||
/** @file
|
||||
*
|
||||
* Dummy architecture-specific UART
|
||||
* Dummy architecture-specific 16550-compatible UART
|
||||
*
|
||||
* This file is included only if the architecture does not provide its
|
||||
* own version of this file.
|
||||
@@ -12,4 +12,4 @@
|
||||
|
||||
FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
|
||||
|
||||
#endif /* _BITS_UART_H */
|
||||
#endif /* _BITS_NS16550_H */
|
||||
Reference in New Issue
Block a user