diff options
author | Ed Maste <emaste@FreeBSD.org> | 2023-08-17 17:14:52 +0000 |
---|---|---|
committer | Ed Maste <emaste@FreeBSD.org> | 2023-08-17 17:31:38 +0000 |
commit | 4722ceb7d53e76507c76e053caab6b6f7b24ecef (patch) | |
tree | 714f8326fde0e680b603fa8f079a005e2f9da258 | |
parent | 5f72ceb2c50d4fa316d26c51849baa200a38c1d8 (diff) | |
download | src-4722ceb7d53e.tar.gz src-4722ceb7d53e.zip |
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
-rw-r--r-- | UPDATING | 12 | ||||
-rwxr-xr-x | libexec/rc/rc.d/serial | 6 | ||||
-rw-r--r-- | sbin/init/ttys | 4 | ||||
-rw-r--r-- | sbin/reboot/boot_i386.8 | 2 | ||||
-rw-r--r-- | share/examples/etc/make.conf | 5 | ||||
-rw-r--r-- | share/man/man4/dcons.4 | 2 | ||||
-rw-r--r-- | share/man/man5/remote.5 | 2 | ||||
-rw-r--r-- | stand/defaults/loader.conf | 2 | ||||
-rw-r--r-- | stand/defaults/loader.conf.5 | 2 | ||||
-rw-r--r-- | stand/i386/boot2/Makefile | 2 | ||||
-rw-r--r-- | stand/i386/btx/btx/Makefile | 2 | ||||
-rw-r--r-- | stand/i386/gptboot/Makefile | 2 | ||||
-rw-r--r-- | stand/i386/gptzfsboot/Makefile | 2 | ||||
-rw-r--r-- | stand/i386/isoboot/Makefile | 2 | ||||
-rw-r--r-- | stand/i386/libi386/Makefile | 2 | ||||
-rw-r--r-- | stand/i386/libi386/comconsole.c | 2 | ||||
-rw-r--r-- | stand/i386/zfsboot/Makefile | 2 | ||||
-rw-r--r-- | stand/man/loader_simp.8 | 2 | ||||
-rw-r--r-- | sys/dev/usb/serial/usb_serial.c | 2 | ||||
-rw-r--r-- | tools/tools/nanobsd/rescue/Files/etc/ttys | 8 |
20 files changed, 38 insertions, 27 deletions
@@ -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 diff --git a/libexec/rc/rc.d/serial b/libexec/rc/rc.d/serial index 43162452b4e1..ea60c8aa77da 100755 --- a/libexec/rc/rc.d/serial +++ b/libexec/rc/rc.d/serial @@ -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 } diff --git a/sbin/init/ttys b/sbin/init/ttys index 508b584abb87..f5cfe4118da6 100644 --- a/sbin/init/ttys +++ b/sbin/init/ttys @@ -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 diff --git a/sbin/reboot/boot_i386.8 b/sbin/reboot/boot_i386.8 index 67f76a4ec4e3..da8fc2e430ac 100644 --- a/sbin/reboot/boot_i386.8 +++ b/sbin/reboot/boot_i386.8 @@ -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 diff --git a/share/examples/etc/make.conf b/share/examples/etc/make.conf index e3b4845aa2ad..56332932e359 100644 --- a/share/examples/etc/make.conf +++ b/share/examples/etc/make.conf @@ -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 diff --git a/share/man/man4/dcons.4 b/share/man/man4/dcons.4 index b9b78d8f70ac..6ef58ea00757 100644 --- a/share/man/man4/dcons.4 +++ b/share/man/man4/dcons.4 @@ -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 diff --git a/share/man/man5/remote.5 b/share/man/man5/remote.5 index 43cbd463e9c3..677c413eec26 100644 --- a/share/man/man5/remote.5 +++ b/share/man/man5/remote.5 @@ -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. diff --git a/stand/defaults/loader.conf b/stand/defaults/loader.conf index 3c7dab540c9c..08406aa43bc8 100644 --- a/stand/defaults/loader.conf +++ b/stand/defaults/loader.conf @@ -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 diff --git a/stand/defaults/loader.conf.5 b/stand/defaults/loader.conf.5 index 8aaaee948b35..195b34e75fdd 100644 --- a/stand/defaults/loader.conf.5 +++ b/stand/defaults/loader.conf.5 @@ -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 diff --git a/stand/i386/boot2/Makefile b/stand/i386/boot2/Makefile index 34d7c6e05627..6d6a05cf228f 100644 --- a/stand/i386/boot2/Makefile +++ b/stand/i386/boot2/Makefile @@ -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 diff --git a/stand/i386/btx/btx/Makefile b/stand/i386/btx/btx/Makefile index 29161f466c77..bfb9edcd1d31 100644 --- a/stand/i386/btx/btx/Makefile +++ b/stand/i386/btx/btx/Makefile @@ -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} \ diff --git a/stand/i386/gptboot/Makefile b/stand/i386/gptboot/Makefile index f657f69625fb..cce5e2e88d5d 100644 --- a/stand/i386/gptboot/Makefile +++ b/stand/i386/gptboot/Makefile @@ -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 diff --git a/stand/i386/gptzfsboot/Makefile b/stand/i386/gptzfsboot/Makefile index 619a0a6e0cb4..03f891912886 100644 --- a/stand/i386/gptzfsboot/Makefile +++ b/stand/i386/gptzfsboot/Makefile @@ -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 diff --git a/stand/i386/isoboot/Makefile b/stand/i386/isoboot/Makefile index 7a909808e168..12be31b52bc4 100644 --- a/stand/i386/isoboot/Makefile +++ b/stand/i386/isoboot/Makefile @@ -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 diff --git a/stand/i386/libi386/Makefile b/stand/i386/libi386/Makefile index 24e30b2e944f..0bc0efd35f22 100644 --- a/stand/i386/libi386/Makefile +++ b/stand/i386/libi386/Makefile @@ -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) diff --git a/stand/i386/libi386/comconsole.c b/stand/i386/libi386/comconsole.c index 8a8373cf144b..6fff811bd34c 100644 --- a/stand/i386/libi386/comconsole.c +++ b/stand/i386/libi386/comconsole.c @@ -40,7 +40,7 @@ #define COMPORT 0x3f8 #endif #ifndef COMSPEED -#define COMSPEED 9600 +#define COMSPEED 115200 #endif static void comc_probe(struct console *cp); diff --git a/stand/i386/zfsboot/Makefile b/stand/i386/zfsboot/Makefile index 0e4e8ee4dc16..dcfac140231a 100644 --- a/stand/i386/zfsboot/Makefile +++ b/stand/i386/zfsboot/Makefile @@ -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 diff --git a/stand/man/loader_simp.8 b/stand/man/loader_simp.8 index c43729f43aca..6eac6bf6a102 100644 --- a/stand/man/loader_simp.8 +++ b/stand/man/loader_simp.8 @@ -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 diff --git a/sys/dev/usb/serial/usb_serial.c b/sys/dev/usb/serial/usb_serial.c index 3a9b198b9ed8..300438010c05 100644 --- a/sys/dev/usb/serial/usb_serial.c +++ b/sys/dev/usb/serial/usb_serial.c @@ -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, diff --git a/tools/tools/nanobsd/rescue/Files/etc/ttys b/tools/tools/nanobsd/rescue/Files/etc/ttys index bdf7db4f0809..151ea5446d76 100644 --- a/tools/tools/nanobsd/rescue/Files/etc/ttys +++ b/tools/tools/nanobsd/rescue/Files/etc/ttys @@ -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 |