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
--00000000000062814e0603227c29 Content-Type: text/plain; charset="UTF-8" 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 > > --00000000000062814e0603227c29 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"auto"><div><br><br><div class=3D"gmail_quote"><div dir=3D"ltr" = class=3D"gmail_attr">On Thu, Aug 17, 2023, 12:19 PM John Baldwin <<a hre= f=3D"mailto:jhb@freebsd.org">jhb@freebsd.org</a>> wrote:<br></div><block= quote class=3D"gmail_quote" style=3D"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=3D"https://cgit.FreeBSD.org/src/commit/?id=3D4722ceb7d53e= 76507c76e053caab6b6f7b24ecef" rel=3D"noreferrer noreferrer" target=3D"_blan= k">https://cgit.FreeBSD.org/src/commit/?id=3D4722ceb7d53e76507c76e053caab6b= 6f7b24ecef</a><br> > <br> > commit 4722ceb7d53e76507c76e053caab6b6f7b24ecef<br> > Author:=C2=A0 =C2=A0 =C2=A0Ed Maste <emaste@FreeBSD.org><br> > AuthorDate: 2023-08-17 17:14:52 +0000<br> > Commit:=C2=A0 =C2=A0 =C2=A0Ed Maste <emaste@FreeBSD.org><br> > CommitDate: 2023-08-17 17:31:38 +0000<br> > <br> >=C2=A0 =C2=A0 =C2=A0 Use 115200 bps by default for serial communication= <br> >=C2=A0 =C2=A0 =C2=A0 <br> >=C2=A0 =C2=A0 =C2=A0 9600 was a standard baud rate decades ago, but 115= 200 is now more common<br> >=C2=A0 =C2=A0 =C2=A0 so choose defaults that are useful to the largest = number of users.<br> >=C2=A0 =C2=A0 =C2=A0 <br> >=C2=A0 =C2=A0 =C2=A0 Note that boot0sio does not support rates above 96= 00 so it remains<br> >=C2=A0 =C2=A0 =C2=A0 unchanged.<br> >=C2=A0 =C2=A0 =C2=A0 <br> >=C2=A0 =C2=A0 =C2=A0 Reviewed by:=C2=A0 =C2=A0 bz, imp, manu<br> >=C2=A0 =C2=A0 =C2=A0 Relnotes:=C2=A0 =C2=A0 =C2=A0 =C2=A0Yes<br> >=C2=A0 =C2=A0 =C2=A0 Sponsored by:=C2=A0 =C2=A0The FreeBSD Foundation<b= r> >=C2=A0 =C2=A0 =C2=A0 Differential Revision: <a href=3D"https://reviews.= freebsd.org/D36295" rel=3D"noreferrer noreferrer" target=3D"_blank">https:/= /reviews.freebsd.org/D36295</a><br> > ---<br> >=C2=A0 =C2=A0UPDATING=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 | 12 = ++++++++++++<br> >=C2=A0 =C2=A0libexec/rc/rc.d/serial=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 |=C2=A0 6 +++---<br> >=C2=A0 =C2=A0sbin/init/ttys=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 |=C2=A0 4 ++--<br> >=C2=A0 =C2=A0sbin/reboot/boot_i386.8=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0|=C2=A0 2 +-<br> >=C2=A0 =C2=A0share/examples/etc/make.conf=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 |=C2=A0 5 ++---<br> >=C2=A0 =C2=A0share/man/man4/dcons.4=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 |=C2=A0 2 +-<br> >=C2=A0 =C2=A0share/man/man5/remote.5=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0|=C2=A0 2 +-<br> >=C2=A0 =C2=A0stand/defaults/loader.conf=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 |=C2=A0 2 +-<br> >=C2=A0 =C2=A0stand/defaults/loader.conf.5=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 |=C2=A0 2 +-<br> >=C2=A0 =C2=A0stand/i386/boot2/Makefile=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0|=C2=A0 2 +-<br> >=C2=A0 =C2=A0stand/i386/btx/btx/Makefile=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0|=C2=A0 2 +-<br> >=C2=A0 =C2=A0stand/i386/gptboot/Makefile=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0|=C2=A0 2 +-<br> >=C2=A0 =C2=A0stand/i386/gptzfsboot/Makefile=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 |=C2=A0 2 +-<br> >=C2=A0 =C2=A0stand/i386/isoboot/Makefile=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0|=C2=A0 2 +-<br> >=C2=A0 =C2=A0stand/i386/libi386/Makefile=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0|=C2=A0 2 +-<br> >=C2=A0 =C2=A0stand/i386/libi386/comconsole.c=C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0|=C2=A0 2 +-<br> >=C2=A0 =C2=A0stand/i386/zfsboot/Makefile=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0|=C2=A0 2 +-<br> >=C2=A0 =C2=A0stand/man/loader_simp.8=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0|=C2=A0 2 +-<br> >=C2=A0 =C2=A0sys/dev/usb/serial/usb_serial.c=C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0|=C2=A0 2 +-<br> >=C2=A0 =C2=A0tools/tools/nanobsd/rescue/Files/etc/ttys |=C2=A0 8 ++++--= --<br> >=C2=A0 =C2=A020 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> >=C2=A0 =C2=A0 =C2=A0 =C2=A0world, or to merely disable the most expensi= ve debugging functionality<br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0at runtime, run "ln -s 'abort:false= ,junk:false' /etc/malloc.conf".)<br> >=C2=A0 =C2=A0<br> > +20230817:<br> > +=C2=A0 =C2=A0 =C2=A0Serial communication (in boot loaders, kernel, an= d userland) has<br> > +=C2=A0 =C2=A0 =C2=A0been changed to default to 115200 bps, in line wi= th common industry<br> > +=C2=A0 =C2=A0 =C2=A0practice and typcial firmware serial console redi= rection<br> > +=C2=A0 =C2=A0 =C2=A0configuration.<br> > +<br> > +=C2=A0 =C2=A0 =C2=A0Note that the early x86 BIOS bootloader (i.e., bo= ot0sio) does not<br> > +=C2=A0 =C2=A0 =C2=A0support rates above 9600 bps and is not chagned.= =C2=A0 boot0sio users may<br> <br> s/chagned/changed/<br> <br> > +=C2=A0 =C2=A0 =C2=A0set BOOT_COMCONSOLE_SPEED=3D9600 to use 9600 for = all of the boot<br> > +=C2=A0 =C2=A0 =C2=A0components, or use the standard boot0 and have th= e boot2 stage start<br> > +=C2=A0 =C2=A0 =C2=A0with 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.=C2=A0 For example, there's a comment about th= is 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=3D0, then the baud rate and frame format will= remain<br> # unchanged. Some BIOSes initialize the serial ports to 115200, and this ma= y<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<b= r> using this are also setting up console redirection in their BIOS.=C2=A0 Gra= nted,<br> all of this is for non-UEFI booting anyway so is a bit long in the tooth<br= > regardless.=C2=A0 Do we bother setting the speed at all for UEFI or do we j= ust<br> trust the firmware to do it I hope?<br></blockquote></div></div><div dir=3D= "auto"><br></div><div dir=3D"auto">Trust the firmware to tell us what the s= peed is, but we do have some super hacky overrides.</div><div dir=3D"auto">= <br></div><div dir=3D"auto">Warner</div><div dir=3D"auto"><br></div><div di= r=3D"auto"><br></div><div dir=3D"auto"><div class=3D"gmail_quote"><blockquo= te class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc so= lid;padding-left:1ex"> -- <br> John Baldwin<br> <br> </blockquote></div></div></div> --00000000000062814e0603227c29--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfp1b8hHJf2NyTsDkKPrpDPyRMYcWfxAB=mcuj5mK2QZOA>