opnsense-src/sys/dev/uart
Colin Percival ad93649d23 uart(4): Add a concept of "unique" serial devices
FreeBSD detects serial ports twice: First, very early in the boot
process, in order to obtain a usable console; and second, during
the device probe/attach process.  When a UART is discovered during
device probing, FreeBSD attempts to determine whether it is a
device which was already being used as a console; without this,
the console doesn't work in userland.

Unfortunately it's possible for a UART to be mapped to a different
location in memory when it is discovered on a bus than it has when
it is announced via the ACPI SPCR table; this breaks the matching
process, which relies on comparing bus addresses.

To address this, we introduce a concept of "unique" serial devices,
i.e. devices which are guaranteed to be present *only once* on any
system.  If we discover one of these during device probing, we can
match it to a same-PCI-vendor-and-device-numbers console which was
announced via the ACPI SPCR table, regardless of the differing bus
addresses.

At present, the only unique serial device is the "Amazon PCI serial
device" (vendor 0x1d0f, device 0x8250) found in some EC2 instances.
This unbreaks the serial console on those systems.

Reviewed by:	imp
MFC after:	3 days
Sponsored by:	https://www.patreon.com/cperciva
Differential Revision:	https://reviews.freebsd.org/D34703
2022-03-31 16:02:24 -07:00
..
uart.h scc(4)/uart(4): Remove obsolete support for Siemens SAB 82532 2020-12-26 13:48:06 +01:00
uart_bus.h Export a sysctl count of RX FIFO overrun events. 2020-04-13 20:59:09 +00:00
uart_bus_acpi.c uart: clean up empty lines in .c and .h files 2020-09-01 21:50:00 +00:00
uart_bus_fdt.c Remove "All Rights Reserved" from FreeBSD Foundation sys/ copyrights 2021-08-08 10:42:24 -04:00
uart_bus_isa.c Regularize my copyright notice 2019-12-04 16:56:11 +00:00
uart_bus_pci.c uart(4): Add a concept of "unique" serial devices 2022-03-31 16:02:24 -07:00
uart_bus_puc.c Regularize my copyright notice 2019-12-04 16:56:11 +00:00
uart_bus_scc.c scc(4)/uart(4): Remove obsolete support for Siemens SAB 82532 2020-12-26 13:48:06 +01:00
uart_core.c uart: Remove CTLFLAG_NEEDGIANT from sysctl. 2021-12-25 21:30:02 -05:00
uart_cpu.h uart(4): Add a concept of "unique" serial devices 2022-03-31 16:02:24 -07:00
uart_cpu_acpi.c uart(4): Add a concept of "unique" serial devices 2022-03-31 16:02:24 -07:00
uart_cpu_acpi.h Use ACPI SPCR on x86 2019-05-23 19:55:53 +00:00
uart_cpu_arm64.c Remove "All Rights Reserved" from FreeBSD Foundation sys/ copyrights 2021-08-08 10:42:24 -04:00
uart_cpu_fdt.c Remove "All Rights Reserved" from FreeBSD Foundation sys/ copyrights 2021-08-08 10:42:24 -04:00
uart_cpu_fdt.h uart: allow UART_DEV_DBGPORT for fdt consoles 2020-12-02 21:01:52 +00:00
uart_cpu_powerpc.c uart: clean up empty lines in .c and .h files 2020-09-01 21:50:00 +00:00
uart_cpu_x86.c Use ACPI SPCR on x86 2019-05-23 19:55:53 +00:00
uart_dbg.c sys/dev: further adoption of SPDX licensing ID tags. 2017-11-27 14:52:40 +00:00
uart_dev_imx.c uart_dev_imx: Make ext_resources non-optional 2022-02-21 17:28:50 +01:00
uart_dev_imx.h Remove "All Rights Reserved" from FreeBSD Foundation sys/ copyrights 2021-08-08 10:42:24 -04:00
uart_dev_lowrisc.c Add support for the UART device found in lowRISC system-on-a-chip. 2018-10-12 15:19:41 +00:00
uart_dev_lowrisc.h Add support for the UART device found in lowRISC system-on-a-chip. 2018-10-12 15:19:41 +00:00
uart_dev_msm.c Support for UART device found in Qualcomm Snapdragon 410E SoC. 2018-01-18 17:43:32 +00:00
uart_dev_msm.h UART Clock Selection Register holds a divider value for a supplied clock, 2018-01-18 18:19:31 +00:00
uart_dev_mu.c uart: clean up empty lines in .c and .h files 2020-09-01 21:50:00 +00:00
uart_dev_mvebu.c uart: clean up empty lines in .c and .h files 2020-09-01 21:50:00 +00:00
uart_dev_ns8250.c uart: Fix an out-of-bounds read in ns8250_bus_probe() 2021-07-13 17:49:39 -04:00
uart_dev_ns8250.h uart: clean up empty lines in .c and .h files 2020-09-01 21:50:00 +00:00
uart_dev_pl011.c uart: clean up empty lines in .c and .h files 2020-09-01 21:50:00 +00:00
uart_dev_quicc.c uart: clean up empty lines in .c and .h files 2020-09-01 21:50:00 +00:00
uart_dev_snps.c uart_dev_snps: Make ext_resources non-optional 2022-02-21 17:28:54 +01:00
uart_dev_ti8250.c Move Ti AM335x to dev/extres/clk framework. 2020-07-30 14:45:05 +00:00
uart_dev_z8530.c sys/dev: further adoption of SPDX licensing ID tags. 2017-11-27 14:52:40 +00:00
uart_if.m
uart_ppstypes.h
uart_subr.c uart: Improve console specification parsing 2021-01-14 17:47:04 -07:00
uart_tty.c Some devices take undesired actions when RTS and DTR are 2019-06-12 18:07:04 +00:00