Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 17 Aug 2023 11:19:18 -0700
From:      John Baldwin <jhb@FreeBSD.org>
To:        Ed Maste <emaste@FreeBSD.org>, src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   Re: git: 4722ceb7d53e - main - Use 115200 bps by default for serial communication
Message-ID:  <88a3318f-37bd-f60e-fe6a-5ee58584fcbf@FreeBSD.org>
In-Reply-To: <202308171735.37HHZdbH046154@gitrepo.freebsd.org>
References:  <202308171735.37HHZdbH046154@gitrepo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 8/17/23 10:35 AM, Ed Maste wrote:
> The branch main has been updated by emaste:
> 
> URL: https://cgit.FreeBSD.org/src/commit/?id=4722ceb7d53e76507c76e053caab6b6f7b24ecef
> 
> commit 4722ceb7d53e76507c76e053caab6b6f7b24ecef
> Author:     Ed Maste <emaste@FreeBSD.org>
> AuthorDate: 2023-08-17 17:14:52 +0000
> Commit:     Ed Maste <emaste@FreeBSD.org>
> CommitDate: 2023-08-17 17:31:38 +0000
> 
>      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
> ---
>   UPDATING                                  | 12 ++++++++++++
>   libexec/rc/rc.d/serial                    |  6 +++---
>   sbin/init/ttys                            |  4 ++--
>   sbin/reboot/boot_i386.8                   |  2 +-
>   share/examples/etc/make.conf              |  5 ++---
>   share/man/man4/dcons.4                    |  2 +-
>   share/man/man5/remote.5                   |  2 +-
>   stand/defaults/loader.conf                |  2 +-
>   stand/defaults/loader.conf.5              |  2 +-
>   stand/i386/boot2/Makefile                 |  2 +-
>   stand/i386/btx/btx/Makefile               |  2 +-
>   stand/i386/gptboot/Makefile               |  2 +-
>   stand/i386/gptzfsboot/Makefile            |  2 +-
>   stand/i386/isoboot/Makefile               |  2 +-
>   stand/i386/libi386/Makefile               |  2 +-
>   stand/i386/libi386/comconsole.c           |  2 +-
>   stand/i386/zfsboot/Makefile               |  2 +-
>   stand/man/loader_simp.8                   |  2 +-
>   sys/dev/usb/serial/usb_serial.c           |  2 +-
>   tools/tools/nanobsd/rescue/Files/etc/ttys |  8 ++++----
>   20 files changed, 38 insertions(+), 27 deletions(-)
> 
> diff --git a/UPDATING b/UPDATING
> index c05670e14f7c..705ca6431a32 100644
> --- a/UPDATING
> +++ b/UPDATING
> @@ -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

s/chagned/changed/

> +	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.

Actually, many of these tools permit leaving the speed unchanged to use any
settings set by the BIOS.  For example, there's a comment about this in
boot0's Makefile:

# Comm settings for boot0sio.
#
# boot0sio uses BIOS INT $0x14 for serial ports, we can only support these
# baudrates due to INT14's limited interface. In addition, if
# BOOT_BOOT0_COMCONSOLE_SPEED=0, then the baud rate and frame format will remain
# unchanged. Some BIOSes initialize the serial ports to 115200, and this may
# allow boot0sio access at that rate if so.

Arguably we should default to that as most people who are going to bother
using this are also setting up console redirection in their BIOS.  Granted,
all of this is for non-UEFI booting anyway so is a bit long in the tooth
regardless.  Do we bother setting the speed at all for UEFI or do we just
trust the firmware to do it I hope?

-- 
John Baldwin




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?88a3318f-37bd-f60e-fe6a-5ee58584fcbf>