OPNsense - FreeBSD source
Find a file
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
.cirrus-ci Cirrus-CI: add some timing info on pkg install failure 2022-02-09 12:39:50 -05:00
.github/workflows .github: Attempt to un-break Clang 9 action 2021-05-29 04:38:07 +01:00
bin ls(1): Allow LSCOLORS to specify an underline 2022-03-26 14:18:19 +01:00
cddl dtrace tests: Fix expected outout for tst.system.d 2022-03-09 11:42:23 +08:00
contrib MFC cc68614, ac69e5d, 7ed8e14: Update contrib/expat to 2.4.7. 2022-03-31 21:38:29 -07:00
crypto OpenSSL: Merge OpenSSL 1.1.1n 2022-03-15 19:48:04 -04:00
etc Add support for jail.conf.d 2022-03-09 15:21:49 -06:00
gnu Bump shared library versions after ncurses bump in 13. 2021-02-04 17:51:45 -08:00
include Install unwind.h into /usr/include 2022-02-20 13:29:44 +01:00
kerberos5 pkgbase: Create a FreeBSD-kerberos package 2022-01-05 18:23:50 +01:00
lib MFV c144cc5479: zlib 1.2.12. 2022-04-04 11:31:13 -04:00
libexec rc.d: Chmod +x all the scripts for consistency 2022-03-31 09:36:35 +02:00
release Remove "/dev/" from geom name in gpart add command. 2022-03-22 21:28:52 -04:00
rescue Fix building rescue/rescue when sanitizers are enabled 2021-08-05 09:59:51 +01:00
sbin sysctl(8): Mention CTLFLAG_SKIP 2022-04-04 12:11:36 -07:00
secure OpenSSL: Merge OpenSSL 1.1.1n 2022-03-15 19:48:04 -04:00
share locking.9: Reference lockstat(1) from this manual page 2022-04-04 19:49:55 +02:00
stand loader.efi: Improve the manual page 2022-04-04 19:49:55 +02:00
sys uart(4): Add a concept of "unique" serial devices 2022-04-04 12:11:41 -07:00
targets Fix bootstrapping to actually build lldb-tblgen for later use 2021-09-07 13:08:18 +01:00
tests netinet tests: only log critical errors from scapy 2022-03-24 10:45:00 +01:00
tools pkgbase: Fix a typo in a source code comment 2022-04-02 15:32:27 +02:00
usr.bin netstat: fix nhop prepend printing. 2022-03-28 08:47:23 +00:00
usr.sbin fstyp(8): Fix a few typos in source code comments 2022-04-02 15:32:53 +02:00
.arcconfig arcconfig: add callsign again 2020-11-23 04:39:29 +00:00
.arclint arc lint: ignore /tests/ in chmod 2017-12-19 03:38:06 +00:00
.cirrus.yml Cirrus-CI: add a manual amd64-gcc9 build and smoketest job 2022-02-22 14:53:02 -05:00
.clang-format clang-format: Add bitset loop macros 2021-11-01 09:20:11 -04:00
.gitattributes Add a basic clang-format configuration file 2019-06-07 15:23:52 +00:00
.gitignore add exuberant ctags tags file to gitignore 2022-01-11 15:25:37 +02:00
COPYRIGHT copyrights: Happy New Year 2021 2020-12-31 10:29:44 -05:00
LOCKS LOCKS: update current locks 2018-06-09 03:08:04 +00:00
MAINTAINERS Add a pointer to csprng@ for the CSPRNG driver. This is enforced anyway by 2020-09-01 08:02:12 +00:00
Makefile Fix 'make bmake' top-level bootstrapping. 2021-12-21 14:44:51 +01:00
Makefile.inc1 installworld: handle ldd including preloaded objects 2022-04-03 20:40:31 -04:00
Makefile.libcompat Prefer MK_SSP=no to SSP_CFLAGS= 2021-08-11 13:56:28 -03:00
Makefile.sys.inc AUTO_OBJ: For all top-level targets enforce using an OBJDIR. 2017-12-05 21:29:47 +00:00
ObsoleteFiles.inc Install unwind.h into /usr/include 2022-02-20 13:29:44 +01:00
README README.md: update gnu directory description 2021-12-19 21:01:53 -05:00
README.md README.md: update gnu directory description 2021-12-19 21:01:53 -05:00
RELNOTES RELNOTES: Note addition of zfskeys 2022-03-06 21:28:29 +01:00
UPDATING Bump __FreeBSD_version to 1301501 after LinuxKPI and net80211 2022-03-27 20:12:03 +00:00

FreeBSD Source:

This is the top level of the FreeBSD source directory. This file was last revised on: FreeBSD

FreeBSD is an operating system used to power modern servers, desktops, and embedded platforms. A large community has continually developed it for more than thirty years. Its advanced networking, security, and storage features have made FreeBSD the platform of choice for many of the busiest web sites and most pervasive embedded networking and storage devices.

For copyright information, please see the file COPYRIGHT in this directory. Additional copyright information also exists for some sources in this tree - please see the specific source directories for more information.

The Makefile in this directory supports a number of targets for building components (or all) of the FreeBSD source tree. See build(7), config(8), https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html, and https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig.html for more information, including setting make(1) variables.

Source Roadmap:

bin		System/user commands.

cddl		Various commands and libraries under the Common Development
		and Distribution License.

contrib		Packages contributed by 3rd parties.

crypto		Cryptography stuff (see crypto/README).

etc		Template files for /etc.

gnu		Commands and libraries under the GNU General Public License
		(GPL) or Lesser General Public License (LGPL).  Please see
		gnu/COPYING* for more information.

include		System include files.

kerberos5	Kerberos5 (Heimdal) package.

lib		System libraries.

libexec		System daemons.

release		Release building Makefile & associated tools.

rescue		Build system for statically linked /rescue utilities.

sbin		System commands.

secure		Cryptographic libraries and commands.

share		Shared resources.

stand		Boot loader sources.

sys		Kernel sources.

sys/<arch>/conf Kernel configuration files. GENERIC is the configuration
		used in release builds. NOTES contains documentation of
		all possible entries.

tests		Regression tests which can be run by Kyua.  See tests/README
		for additional information.

tools		Utilities for regression testing and miscellaneous tasks.

usr.bin		User commands.

usr.sbin	System administration commands.

For information on synchronizing your source tree with one or more of the FreeBSD Project's development branches, please see:

https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/current-stable.html