freebsd-dev/sys
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
..
amd64 linux(4): Add compat.linux32.emulate_i386 knob. 2022-03-31 21:01:09 +03:00
arm syscallarg_t: Add a type for system call arguments 2022-03-28 19:43:03 +01:00
arm64 sysent: regen for syscallarg_t 2022-03-28 19:43:03 +01:00
bsm
cam vfs: NDFREE(&nd, NDF_ONLY_PNBUF) -> NDFREE_PNBUF(&nd) 2022-03-24 10:20:51 +00:00
cddl zfs: merge openzfs/zfs@a86e08941 (master) into main 2022-03-08 18:53:02 +01:00
compat linsysfs: plug set-but-not-used vars. 2022-03-31 23:49:26 +03:00
conf zfs: merge openzfs/zfs@bc3f12bfa (master) into main 2022-03-29 12:07:34 +02:00
contrib MFV 7b495a2a7a (zlib): Correct incorrect inputs provided to the CRC 2022-03-31 15:35:58 -07:00
crypto armv8crypto: Remove leftover debug printfs 2022-02-17 14:25:45 -05:00
ddb ddb: Remove SOFTWARE_SSTEP support 2022-01-07 09:25:33 -07:00
dev uart(4): Add a concept of "unique" serial devices 2022-03-31 16:02:24 -07:00
dts dts: add IPQ4018/IPQ4019 ethernet MAC and ethernet switch definitions 2022-02-03 21:26:45 -08:00
fs nfscl: Fix IO_APPEND writes from kernel space 2022-03-28 15:11:52 -07:00
gdb gdb(4): Do not use run length encoding for 3-symbol repetitions 2022-01-22 14:46:06 -05:00
geom gpart(8): Fix two typos in source code comments 2022-03-28 19:36:48 +02:00
gnu
i386 sysent: regen for syscallarg_t 2022-03-28 19:43:03 +01:00
isa sys/isa: Use C99 fixed-width integer types. 2021-12-28 09:41:57 -08:00
kern syscalls.master: remove obsolete comment about compatibility tables 2022-03-30 11:07:00 -04:00
kgssapi
libkern sys/libkern: Use C99 fixed-width integer types. 2021-12-28 09:42:11 -08:00
modules zfs: update zfs_config.h and zfs_gitrev.h 2022-03-29 12:40:41 +02:00
net pf: support listing ethernet anchors 2022-03-30 10:28:19 +02:00
net80211 net80211: introduce (*iv_update_bss)() 2022-03-22 18:51:43 +00:00
netgraph netgraph(3): Fix a typo in a source code comment 2022-03-28 19:31:50 +02:00
netinet Address issue pointed out in CVE-2020-25705 2022-03-31 16:45:50 +02:00
netinet6 netinet6: Fix a typo in a source code comment 2022-03-28 19:32:10 +02:00
netipsec ipsec: sprinkle CURVNET_ASSERT_SET 2022-02-19 13:10:41 +00:00
netpfil pf: Initialize the table entry zone limit at initialization time 2022-03-30 15:41:44 -04:00
netsmb
nfs nfs: don't truncate directory cookies to 32-bits in the NFS server 2021-12-15 20:54:57 -07:00
nfsclient
nfsserver
nlm sys/nlm: Use C99 fixed-width integer types. 2021-12-28 09:42:42 -08:00
ofed ibcore: Fix multiple includes of same header file. 2022-03-03 12:51:20 +01:00
opencrypto crypto: hide crypto_destroyreq behind a tunable 2022-02-16 07:45:12 +00:00
powerpc powerpcspe: fix PCI enumeration on ppce500 2022-03-21 16:11:33 -03:00
riscv syscallarg_t: Add a type for system call arguments 2022-03-28 19:43:03 +01:00
rpc sys/rpc: Use C99 fixed-width integer types. 2021-12-28 09:43:15 -08:00
security audit: Initialize vattr fields before calling VOP_GETATTR 2022-03-28 11:23:45 -04:00
sys Bump __FreeBSD_version for zlib upgrade. 2022-03-31 07:30:42 -07:00
teken teken: color #3 is yellow not brown - use TC_YELLOW as the name 2022-03-12 09:17:29 -05:00
tests
tools syscallarg_t: Add a type for system call arguments 2022-03-28 19:43:03 +01:00
ufs ffs(3): Fix a common typo in source code comments 2022-03-28 19:37:03 +02:00
vm vm_phys: check small blocks to finish allocation 2022-03-31 16:19:55 -05:00
x86 xen(4): Fix a few typos in source code comments 2022-03-28 19:37:20 +02:00
xdr sys/xdr: Use C99 fixed-width integer types. 2021-12-28 09:43:26 -08:00
xen xen(3): Fix a typo in a source code comment 2022-03-28 19:32:53 +02:00
Makefile Fix 'make cscope' with ALL_ARCH defined 2022-01-07 11:53:52 -04:00