Use 115200 bps by default for serial communication

9600 was a standard baud rate decades ago, but 115200 is now more common
so choose defaults that are useful to the largest number of users.

Note that boot0sio does not support rates above 9600 so it remains
unchanged.

Reviewed by:	bz, imp, manu
Relnotes:	Yes
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D36295
This commit is contained in:
Ed Maste 2023-08-17 13:14:52 -04:00
parent 5f72ceb2c5
commit 4722ceb7d5
20 changed files with 38 additions and 27 deletions

View File

@ -27,6 +27,18 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 14.x IS SLOW:
world, or to merely disable the most expensive debugging functionality
at runtime, run "ln -s 'abort:false,junk:false' /etc/malloc.conf".)
20230817:
Serial communication (in boot loaders, kernel, and userland) has
been changed to default to 115200 bps, in line with common industry
practice and typcial firmware serial console redirection
configuration.
Note that the early x86 BIOS bootloader (i.e., boot0sio) does not
support rates above 9600 bps and is not chagned. boot0sio users may
set BOOT_COMCONSOLE_SPEED=9600 to use 9600 for all of the boot
components, or use the standard boot0 and have the boot2 stage start
with the serial port at 115200.
20230807:
Following the general removal of MIPS support, the ath(4) AHB bus-
frontend has been removed, too, and building of the PCI support is

View File

@ -35,7 +35,7 @@
# dtrwait 300 drainwait `sysctl -n kern.drainwait`
# initial cflag from <sys/ttydefaults.h> = cread cs8 hupcl
# initial iflag, lflag and oflag all 0
# speed 9600
# speed 115200
# special chars from <sys/ttydefaults.h>
# nothing locked
# except for serial consoles the initial iflag, lflag and oflag are from
@ -50,9 +50,9 @@ default() {
for i in $*
do
comcontrol /dev/tty${dc}${i} dtrwait 300 drainwait $drainwait
stty < /dev/tty${dc}${i}.init -clocal crtscts hupcl 9600 reprint ^R
stty < /dev/tty${dc}${i}.init -clocal crtscts hupcl 115200 reprint ^R
stty < /dev/tty${dc}${i}.lock -clocal -crtscts -hupcl 0
stty < /dev/cua${dc}${i}.init -clocal crtscts hupcl 9600 reprint ^R
stty < /dev/cua${dc}${i}.init -clocal crtscts hupcl 115200 reprint ^R
stty < /dev/cua${dc}${i}.lock -clocal -crtscts -hupcl 0
done
}

View File

@ -45,8 +45,8 @@ ttyu1 "/usr/libexec/getty 3wire" vt100 onifconsole secure
ttyu2 "/usr/libexec/getty 3wire" vt100 onifconsole secure
ttyu3 "/usr/libexec/getty 3wire" vt100 onifconsole secure
# Dumb console
dcons "/usr/libexec/getty std.9600" vt100 off secure
dcons "/usr/libexec/getty std.115200" vt100 off secure
# Xen Virtual console
xc0 "/usr/libexec/getty Pc" xterm onifconsole secure
# RISC-V HTIF console
rcons "/usr/libexec/getty std.9600" vt100 onifconsole secure
rcons "/usr/libexec/getty std.115200" vt100 onifconsole secure

View File

@ -244,7 +244,7 @@ the root password must be entered.
.It Fl S Ns Ar speed
set the speed of the serial console to
.Ar speed .
The default is 9600 unless it has been overridden by setting
The default is 115200 unless it has been overridden by setting
.Va BOOT_COMCONSOLE_SPEED
in
.Xr make.conf 5

View File

@ -167,10 +167,9 @@
#
#BOOT_COMCONSOLE_PORT= 0x3F8
#
# The default serial console speed is 9600. Set the speed to a larger value
# for better interactive response.
# The default serial console speed is 115200.
#
#BOOT_COMCONSOLE_SPEED= 115200
#BOOT_COMCONSOLE_SPEED= 9600
#
# By default the 'pxeboot' loader retrieves the kernel via NFS. Defining
# this and recompiling /usr/src/stand will cause it to retrieve the kernel

View File

@ -82,7 +82,7 @@ signal to
using
.Xr kill 1 .
.Bd -literal -offset indent
dcons "/usr/libexec/getty std.9600" vt100 on secure
dcons "/usr/libexec/getty std.115200" vt100 on secure
.Ed
.Pp
Once the

View File

@ -91,7 +91,7 @@ serial port.
When a modem is used, the data rate used to communicate
with the remote modem may be different than this rate.
This is a decimal number.
The default rate is 9600 bits per second.
The default rate is 115200 bits per second.
.It Cm \&cm
(str)
An initial connection message to be sent to the remote host.

View File

@ -100,7 +100,7 @@ efi_max_resolution="1x1" # Set the max resolution for EFI loader to use:
#kernels="kernel kernel.old" # Kernels to display in the boot menu
kernels_autodetect="YES" # Auto-detect kernel directories in /boot
#loader_logo="orbbw" # Desired logo: orbbw, orb, fbsdbw, beastiebw, beastie, none
#comconsole_speed="9600" # Set the current serial console speed
#comconsole_speed="115200" # Set the current serial console speed
#console="vidconsole" # A comma separated list of console(s)
#currdev="disk1s1a" # Set the current device
module_path="/boot/modules;/boot/dtb;/boot/dtb/overlays" # Set the module search path

View File

@ -252,7 +252,7 @@ a bitmap will be loaded to be displayed on screen while booting.
Name of the bitmap to be loaded.
Any other name can be used.
.It Va comconsole_speed
.Dq ( 9600
.Dq ( 115200
or the value of the
.Va BOOT_COMCONSOLE_SPEED
variable when

View File

@ -7,7 +7,7 @@ FILES= boot boot1 boot2
BOOT_BOOT1_FLAGS?= 0x80
BOOT_COMCONSOLE_PORT?= 0x3f8
BOOT_COMCONSOLE_SPEED?= 9600
BOOT_COMCONSOLE_SPEED?= 115200
B2SIOFMT?= 0x3
REL1= 0x700

View File

@ -16,7 +16,7 @@ CFLAGS+=-I${BOOTSRC}/i386/common
.if defined(BTX_SERIAL)
BOOT_COMCONSOLE_PORT?= 0x3f8
BOOT_COMCONSOLE_SPEED?= 9600
BOOT_COMCONSOLE_SPEED?= 115200
B2SIOFMT?= 0x3
CFLAGS+=-DBTX_SERIAL -DSIOPRT=${BOOT_COMCONSOLE_PORT} \

View File

@ -7,7 +7,7 @@ FILES= gptboot
MAN= gptboot.8
BOOT_COMCONSOLE_PORT?= 0x3f8
BOOT_COMCONSOLE_SPEED?= 9600
BOOT_COMCONSOLE_SPEED?= 115200
B2SIOFMT?= 0x3
REL1= 0x700

View File

@ -9,7 +9,7 @@ FILES= gptzfsboot
MAN= gptzfsboot.8
BOOT_COMCONSOLE_PORT?= 0x3f8
BOOT_COMCONSOLE_SPEED?= 9600
BOOT_COMCONSOLE_SPEED?= 115200
B2SIOFMT?= 0x3
REL1= 0x700

View File

@ -8,7 +8,7 @@ FILES= isoboot
MAN= isoboot.8
BOOT_COMCONSOLE_PORT?= 0x3f8
BOOT_COMCONSOLE_SPEED?= 9600
BOOT_COMCONSOLE_SPEED?= 115200
B2SIOFMT?= 0x3
REL1= 0x700

View File

@ -18,7 +18,7 @@ SRCS+= teken.c
BOOT_COMCONSOLE_PORT?= 0x3f8
CFLAGS+= -DCOMPORT=${BOOT_COMCONSOLE_PORT}
BOOT_COMCONSOLE_SPEED?= 9600
BOOT_COMCONSOLE_SPEED?= 115200
CFLAGS+= -DCOMSPEED=${BOOT_COMCONSOLE_SPEED}
.ifdef(BOOT_BIOSDISK_DEBUG)

View File

@ -40,7 +40,7 @@
#define COMPORT 0x3f8
#endif
#ifndef COMSPEED
#define COMSPEED 9600
#define COMSPEED 115200
#endif
static void comc_probe(struct console *cp);

View File

@ -7,7 +7,7 @@ FILES= zfsboot
MAN= zfsboot.8
BOOT_COMCONSOLE_PORT?= 0x3f8
BOOT_COMCONSOLE_SPEED?= 9600
BOOT_COMCONSOLE_SPEED?= 115200
B2SIOFMT?= 0x3
REL1= 0x700

View File

@ -358,7 +358,7 @@ Defines the speed of the serial console (i386 and amd64 only).
If the previous boot stage indicated that a serial console is in use
then this variable is initialized to the current speed of the console
serial port.
Otherwise it is set to 9600 unless this was overridden using the
Otherwise it is set to 115200 unless this was overridden using the
.Va BOOT_COMCONSOLE_SPEED
variable when
.Nm

View File

@ -130,7 +130,7 @@ static unsigned ucom_cons_tx_high = 0;
static int ucom_cons_unit = -1;
static int ucom_cons_subunit = 0;
static int ucom_cons_baud = 9600;
static int ucom_cons_baud = 115200;
static struct ucom_softc *ucom_cons_softc = NULL;
SYSCTL_INT(_hw_usb_ucom, OID_AUTO, cons_unit, CTLFLAG_RWTUN,

View File

@ -44,8 +44,8 @@ ttyv8 "/usr/local/bin/xdm -nodaemon" xterm off secure
# Serial terminals
# The 'dialup' keyword identifies dialin lines to login, fingerd etc.
ttyu0 "/usr/libexec/getty std.115200" xterm-color on secure
ttyu1 "/usr/libexec/getty std.9600" dialup off secure
ttyu2 "/usr/libexec/getty std.9600" dialup off secure
ttyu3 "/usr/libexec/getty std.9600" dialup off secure
ttyu1 "/usr/libexec/getty std.115200" dialup off secure
ttyu2 "/usr/libexec/getty std.115200" dialup off secure
ttyu3 "/usr/libexec/getty std.115200" dialup off secure
# Dumb console
dcons "/usr/libexec/getty std.9600" vt100 off secure
dcons "/usr/libexec/getty std.115200" vt100 off secure