Date: Thu, 17 Aug 2023 12:21:39 -0600 From: Warner Losh <imp@bsdimp.com> To: John Baldwin <jhb@freebsd.org> Cc: Ed Maste <emaste@freebsd.org>, src-committers <src-committers@freebsd.org>, "<dev-commits-src-all@freebsd.org>" <dev-commits-src-all@freebsd.org>, "<dev-commits-src-main@freebsd.org>" <dev-commits-src-main@freebsd.org> Subject: Re: git: 4722ceb7d53e - main - Use 115200 bps by default for serial communication Message-ID: <CANCZdfp1b8hHJf2NyTsDkKPrpDPyRMYcWfxAB=mcuj5mK2QZOA@mail.gmail.com> In-Reply-To: <88a3318f-37bd-f60e-fe6a-5ee58584fcbf@FreeBSD.org> References: <202308171735.37HHZdbH046154@gitrepo.freebsd.org> <88a3318f-37bd-f60e-fe6a-5ee58584fcbf@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --] On Thu, Aug 17, 2023, 12:19 PM John Baldwin <jhb@freebsd.org> wrote: > 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? > Trust the firmware to tell us what the speed is, but we do have some super hacky overrides. Warner -- > John Baldwin > > [-- Attachment #2 --] <div dir="auto"><div><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Aug 17, 2023, 12:19 PM John Baldwin <<a href="mailto:jhb@freebsd.org">jhb@freebsd.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 8/17/23 10:35 AM, Ed Maste wrote:<br> > The branch main has been updated by emaste:<br> > <br> > URL: <a href="https://cgit.FreeBSD.org/src/commit/?id=4722ceb7d53e76507c76e053caab6b6f7b24ecef" rel="noreferrer noreferrer" target="_blank">https://cgit.FreeBSD.org/src/commit/?id=4722ceb7d53e76507c76e053caab6b6f7b24ecef</a><br> > <br> > commit 4722ceb7d53e76507c76e053caab6b6f7b24ecef<br> > Author: Ed Maste <emaste@FreeBSD.org><br> > AuthorDate: 2023-08-17 17:14:52 +0000<br> > Commit: Ed Maste <emaste@FreeBSD.org><br> > CommitDate: 2023-08-17 17:31:38 +0000<br> > <br> > Use 115200 bps by default for serial communication<br> > <br> > 9600 was a standard baud rate decades ago, but 115200 is now more common<br> > so choose defaults that are useful to the largest number of users.<br> > <br> > Note that boot0sio does not support rates above 9600 so it remains<br> > unchanged.<br> > <br> > Reviewed by: bz, imp, manu<br> > Relnotes: Yes<br> > Sponsored by: The FreeBSD Foundation<br> > Differential Revision: <a href="https://reviews.freebsd.org/D36295" rel="noreferrer noreferrer" target="_blank">https://reviews.freebsd.org/D36295</a><br> > ---<br> > UPDATING | 12 ++++++++++++<br> > libexec/rc/rc.d/serial | 6 +++---<br> > sbin/init/ttys | 4 ++--<br> > sbin/reboot/boot_i386.8 | 2 +-<br> > share/examples/etc/make.conf | 5 ++---<br> > share/man/man4/dcons.4 | 2 +-<br> > share/man/man5/remote.5 | 2 +-<br> > stand/defaults/loader.conf | 2 +-<br> > stand/defaults/loader.conf.5 | 2 +-<br> > stand/i386/boot2/Makefile | 2 +-<br> > stand/i386/btx/btx/Makefile | 2 +-<br> > stand/i386/gptboot/Makefile | 2 +-<br> > stand/i386/gptzfsboot/Makefile | 2 +-<br> > stand/i386/isoboot/Makefile | 2 +-<br> > stand/i386/libi386/Makefile | 2 +-<br> > stand/i386/libi386/comconsole.c | 2 +-<br> > stand/i386/zfsboot/Makefile | 2 +-<br> > stand/man/loader_simp.8 | 2 +-<br> > sys/dev/usb/serial/usb_serial.c | 2 +-<br> > tools/tools/nanobsd/rescue/Files/etc/ttys | 8 ++++----<br> > 20 files changed, 38 insertions(+), 27 deletions(-)<br> > <br> > diff --git a/UPDATING b/UPDATING<br> > index c05670e14f7c..705ca6431a32 100644<br> > --- a/UPDATING<br> > +++ b/UPDATING<br> > @@ -27,6 +27,18 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 14.x IS SLOW:<br> > world, or to merely disable the most expensive debugging functionality<br> > at runtime, run "ln -s 'abort:false,junk:false' /etc/malloc.conf".)<br> > <br> > +20230817:<br> > + Serial communication (in boot loaders, kernel, and userland) has<br> > + been changed to default to 115200 bps, in line with common industry<br> > + practice and typcial firmware serial console redirection<br> > + configuration.<br> > +<br> > + Note that the early x86 BIOS bootloader (i.e., boot0sio) does not<br> > + support rates above 9600 bps and is not chagned. boot0sio users may<br> <br> s/chagned/changed/<br> <br> > + set BOOT_COMCONSOLE_SPEED=9600 to use 9600 for all of the boot<br> > + components, or use the standard boot0 and have the boot2 stage start<br> > + with the serial port at 115200.<br> <br> Actually, many of these tools permit leaving the speed unchanged to use any<br> settings set by the BIOS. For example, there's a comment about this in<br> boot0's Makefile:<br> <br> # Comm settings for boot0sio.<br> #<br> # boot0sio uses BIOS INT $0x14 for serial ports, we can only support these<br> # baudrates due to INT14's limited interface. In addition, if<br> # BOOT_BOOT0_COMCONSOLE_SPEED=0, then the baud rate and frame format will remain<br> # unchanged. Some BIOSes initialize the serial ports to 115200, and this may<br> # allow boot0sio access at that rate if so.<br> <br> Arguably we should default to that as most people who are going to bother<br> using this are also setting up console redirection in their BIOS. Granted,<br> all of this is for non-UEFI booting anyway so is a bit long in the tooth<br> regardless. Do we bother setting the speed at all for UEFI or do we just<br> trust the firmware to do it I hope?<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">Trust the firmware to tell us what the speed is, but we do have some super hacky overrides.</div><div dir="auto"><br></div><div dir="auto">Warner</div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> -- <br> John Baldwin<br> <br> </blockquote></div></div></div>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfp1b8hHJf2NyTsDkKPrpDPyRMYcWfxAB=mcuj5mK2QZOA>
