opnsense-src/sys/dev
Colin Percival 5cc5cd739e 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
Sponsored by:	https://www.patreon.com/cperciva
Differential Revision:	https://reviews.freebsd.org/D34703

(cherry picked from commit ad93649d23)
2022-04-04 12:11:41 -07:00
..
aac
aacraid
acpi_support
acpica Extend device_get_property API 2022-03-30 00:24:29 +02:00
adb
adlink
ae
age
agp
ahci
aic7xxx
al_eth
alc
ale
alpm
altera
amd_ecc_inject
amdgpio
amdpm
amdsbwd
amdsmb
amdsmn
amdtemp
amr
an
arcmsr
asmc
ata
ath ath: Fix a typo in a source code comment 2022-03-30 18:37:54 +02:00
atkbdc
axgbe
backlight
bce
beri
bfe
bge
bhnd
bnxt
bwi
bwn
bxe
cadence
cardbus
cas
ce
cesa
cfe
cfi
chromebook_platform
ciss
coretemp
cp
cpuctl
cpufreq
cxgb
cxgbe cxgbe: fix enabling lro & rxtimestamps 2022-04-04 11:57:15 -07:00
cyapa
dc
dcons
dme
dpaa
dpms
drm2 drm2: Fix a typo in a source code comment 2022-04-02 15:31:02 +02:00
dwc
dwwdt
e1000
efidev
ena
esp
et
etherswitch
evdev
exca exca(4): Fix a typo in a source code comment 2022-04-02 15:30:13 +02:00
extres
fb
fdc
fdt Extend device_get_property API 2022-03-30 00:24:29 +02:00
ffec
filemon
firewire
flash
ftwd
fxp
gem
glxiic
glxsb
goldfish
gpio
gxemul
hdmi
hid
hifn
hpt27xx
hptiop
hptmv
hptnr
hptrr
hwpmc
hyperv
iavf
ic
ice
ichiic
ichsmb
ichwd
ida
if_ndis
igc
iicbus
iir
imcsmb
intel
intpm
io
ioat
iommu
ipmi ipmi: Make all sysctls also tunables. 2022-03-23 20:50:25 -04:00
ips
ipw
isci isci(4): Fix a typo in a source code comment 2022-04-02 15:31:30 +02:00
iscsi
iscsi_initiator
iser
isl
ismt
isp
ispfw
itwd
iwi
iwm
iwn
ixgbe
ixl
jedec_dimm
jme
kbd
kbdmux
ksyms
kvm_clock
le
led
lge
liquidio
malo
mbox
md
mdio
mem
mfi
mgb
mge
mii bus_if: Add a default implementation of get_property 2022-03-30 00:24:28 +02:00
mlx
mlx4
mlx5 mlx5en(4): Fix a few typos in source code comments 2022-04-02 15:35:02 +02:00
mlxfw
mly
mmc Extend device_get_property API 2022-03-30 00:24:29 +02:00
mmcnull
mn
mpr mpr/mps/mpt: verify cfg page ioctl lengths 2022-04-03 20:45:41 -04:00
mps mpr/mps/mpt: verify cfg page ioctl lengths 2022-04-03 20:45:41 -04:00
mpt mpr/mps/mpt: verify cfg page ioctl lengths 2022-04-03 20:45:41 -04:00
mrsas
msk
mthca
mvs
mwl
mxge
my
nctgpio
neta neta: split fixed and in-band link status configuration 2022-03-30 00:24:56 +02:00
netfpga10g/nf10bmac
netmap netmap: add a tunable for the maximum number of VALE switches 2022-03-20 09:00:50 +00:00
nfe
nfsmb
nge
nmdm
ntb
null
nvd
nvdimm
nvme
nvram
nvram2env
oce
ocs_fc
ofw
otus
ow
pbio
pccard
pccbb
pcf
pci
pms
powermac_nvram
ppbus
ppc
proto
psci
pst
pty
puc
pwm
qat
qlnx qlnxe(4): Fix a typo in a source code comment 2022-04-02 15:31:16 +02:00
qlxgb
qlxgbe
qlxge
quicc
ral
random Add support for getting early entropy from UEFI 2022-03-10 18:11:41 -08:00
rccgpio
re
rl
rndtest
rt
rtsx rtsx: Remove update of softc during probe and some var rename. 2022-03-30 21:48:24 -04:00
rtwn
safe
safexcel
sbni
scc
sdhci Extend device_get_property API 2022-03-30 00:24:29 +02:00
sdio
sec
sfxge
sge
siis
sis
sk
smartpqi
smbios
smbus
smc
snp
sound sound: test PCM_REGISTERED before PCM_DETACHING 2022-03-30 16:43:57 -04:00
speaker
spibus
ste
stge
sume
superio
sym
syscons
tcp_log
tdfx
terasic
ti
tpm
tsec
twa
twe
tws
uart uart(4): Add a concept of "unique" serial devices 2022-04-04 12:11:41 -07:00
usb u3g: Add support Quectel EM12-G modem. 2022-03-28 08:54:30 +00:00
veriexec
vge
viapm
viawd
videomode
virtio virtio_random(8): MFC: avoid deadlock at shutdown time (regression fix) 2022-03-19 11:20:58 +07:00
vkbd
vmd
vmgenc
vmware
vnic
vr
vt vt/vga: ignore ACPI_FADT_NO_VGA unless running virtualized 2022-03-23 14:44:30 +01:00
vte
watchdog
wbwd
wpi
wtap
xdma
xen
xilinx
xl
xz
zlib