]> git.ipfire.org Git - thirdparty/ipxe.git/commit
[uart] Add support for MMIO-accessible 16550 UARTs
authorMichael Brown <mcb30@ipxe.org>
Thu, 19 Jun 2025 11:57:28 +0000 (12:57 +0100)
committerMichael Brown <mcb30@ipxe.org>
Fri, 20 Jun 2025 11:52:04 +0000 (12:52 +0100)
commit71b4bfb6b2c68a9c07e7f3171721313203f2a432
treed7958b09a92101663ae45b799a9d96e1ef08e85c
parent6c8fb4b89d49c40339fe61b7ec549d90f1ce9480
[uart] Add support for MMIO-accessible 16550 UARTs

16550 UARTs exist on non-x86 platforms but will be accessible via MMIO
rather than port I/O.  It is possible to encounter MMIO-mapped 16550
UARTs on x86 platforms, but there is no real requirement to support
them in iPXE since the standard COM1, COM2, etc ports have been
present on every PC-compatible machine since 1981.

Assume for now that accessing 16550 UART registers requires
inb()/outb() on x86 and readb()/writeb() on other architectures.

Allow for the existence of a register shift on MMIO-mapped 16550
UARTs, since modern SoCs tend to treat register addresses as being
aligned to either 32-bit or 64-bit boundaries.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/include/bits/ns16550.h
src/include/ipxe/ns16550.h