git: 2be228603754 - main - uart: Document the hw.uart.console string format.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 14 Oct 2024 22:17:33 UTC
The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=2be22860375440641f6e57b03724fe38b87b0dd1 commit 2be22860375440641f6e57b03724fe38b87b0dd1 Author: Warner Losh <imp@FreeBSD.org> AuthorDate: 2024-10-14 21:57:20 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2024-10-14 22:03:58 +0000 uart: Document the hw.uart.console string format. Sponsored by: Netflix Reviewed by: adrian, andrew Differential Revision: https://reviews.freebsd.org/D47071 --- share/man/man4/uart.4 | 90 ++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 89 insertions(+), 1 deletion(-) diff --git a/share/man/man4/uart.4 b/share/man/man4/uart.4 index 90ab2fd4cb57..c7950e86ddc9 100644 --- a/share/man/man4/uart.4 +++ b/share/man/man4/uart.4 @@ -23,7 +23,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd July 11, 2020 +.Dd October 11, 2024 .Dt UART 4 .Os .Sh NAME @@ -269,6 +269,89 @@ be locked for devices that support more than one setting. The CLOCAL flag on callin ports should be locked off for logins to avoid certain security holes, but this needs to be done by getty if the callin port is used for anything else. +.Sh Console Tuneable +The +.Nm +driver can be designated as a system console. +.Bl -tag -width indent +.It Va hw.uart.console +Contains a number of +.Pa /etc/remote +like tag:value pairs, separated by commas. +.Bl -tag -width indent +.It Cm \&bd +Busy Detect. +Enable the so-called +.Dq Busy Detect +quirk for the device. +For NS 16550-compatible devices, this will use heuristics to ensure that the +UART is no longer busy before manipulating line control. +DesignWare-based UARTs need this due to a design flaw in the UART. +.It Cm \&br +Baudrate. +The data rate (bits per second) used for communications on the serial port. +When the device clock rate (see below) is set to 0, then the baud rate will be +used with the divisor to compute the device clock rate the first time the device +is initialized. +Only the traditional baud rates are allowed. +Rates larger than 19200 must be a multiple of 19200. +Baud rates between 1200 and 19200 must be a multiple of 1200. +Otherwise the baud rate must be a multiple of 75. +A value of '0' instructs the +.Nm +driver to not program the baud rate divisor and use the hardware as-is. +.It Cm \&ch +Channel. +Defaults to 0. +Has no effect on UARTs with only one channel. +.It Cm \&db +Data bits. +Defaults to 8. +.It Cm \&dt +Device type. +Specify the uart class to use for this device. +.Bl -tag -width indent +.It ns8250 +Traditional PC UART National Semiconductor 16550 and compatible devices. +.It pl011 +Common ARM UART, based on ARM Limited designs. +.El +.It Cm \&io +I/O port address. +Specifies the address of a UART in an Intel processor's I/O space. +Mutually exclusive with +.Sq mm . +.It Cm \&mm +Memory mapped I/O address. +Specifies the physical address of a memory-mapped UART. +Mutually exclusive with +.Sq io . +.It Cm \&pa +Parity. +The type of parity to use when sending data +to the host. +This may be one of ``even'', +``odd'', ``none'', ``zero'' (always set bit 8 to zero), +``one'' (always set bit 8 to 1). +The default is even parity. +.It Cm \&rs +Register shift. +Number of bits to shift left the base register offset. +.It Cm \&rw +Register width. +Size of operations to read and write the registers of the device. +.It Cm \&sb +Stopbits. +Defaults to 1. +.It Cm \&xo +Device clock (xtal oscillator). +Base frequency of the oscillator to use for the device. +When set to 0, and the baud rate is also set, the UART's initialization +code will compute this the first time and use that after. +Automatically computed values can be as large as 5% when the base +frequency is a poor match to the traditional baud rates. +.El +.El .Sh FILES .Bl -tag -width "/dev/ttyu?.init" -compact .It Pa /dev/ttyu? @@ -283,6 +366,11 @@ for callout ports .It Pa /dev/cuau?.lock corresponding callout initial-state and lock-state devices .El +.Sh EXAMPLES +.Dl hw.uart.console="io:0x2f8,br=115200" +.Pp +When the kernel is using a serial console port, it should use +COM2 instead of COM1 and set the baud rate to 115200. .Sh SEE ALSO .Xr cu 1 , .Xr puc 4 ,