Page MenuHomeFreeBSD

D47071.id144675.diff
No OneTemporary

D47071.id144675.diff

diff --git a/share/man/man4/uart.4 b/share/man/man4/uart.4
--- a/share/man/man4/uart.4
+++ b/share/man/man4/uart.4
@@ -14,7 +14,7 @@
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+n.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
@@ -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 @@
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 SYSCTL VARIABLES
+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 @@
.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 ,

File Metadata

Mime Type
text/plain
Expires
Fri, Nov 8, 3:27 AM (16 h, 47 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
13961021
Default Alt Text
D47071.id144675.diff (4 KB)

Event Timeline