From nobody Thu Aug 17 18:21:39 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RRYHj1zTNz4mVXr for ; Thu, 17 Aug 2023 18:21:53 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ej1-x629.google.com (mail-ej1-x629.google.com [IPv6:2a00:1450:4864:20::629]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RRYHj081Wz3QLr for ; Thu, 17 Aug 2023 18:21:53 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ej1-x629.google.com with SMTP id a640c23a62f3a-99c93638322so22987266b.1 for ; Thu, 17 Aug 2023 11:21:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20221208.gappssmtp.com; s=20221208; t=1692296511; x=1692901311; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=j+j5FBaU6P5CkkXQNo+wZ1sDVrYMqPbLI+N1+k8yBS4=; b=NEmLFD4EyUoECFqjfidAi4zFip9CRK4A/XfiDxXoqSPNS/ChW+jCc8QKInNBvFbcHo ZHTIkPh2fChRpnc9ZAazzANxXwQ+Vv6jDRKYiCtBHFk1hee+kw61Zn4WUDrCZNoaggdI xrwjeV+wQZLbVgTiJg0E14CAFfpyuV9WvyRfLrAGwayzKVtCVmaSALs0vSKqyWjg3mlv JQaCbmY/1/oYA+Ez2aaVddS1U+PfVw26mSzLA2pxGWdslkCnS3iP6XPkd5KJf5MtHgZP VJysAOZNn00N/KNX8cwcckddR78hOmnl91qkLMCe11EBXyWurXQ1CbOYvUM/9WNFv/jo V7Zg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692296511; x=1692901311; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=j+j5FBaU6P5CkkXQNo+wZ1sDVrYMqPbLI+N1+k8yBS4=; b=Exi2/LzAp4pvMiwMdLyNJEhbs99DnP3wxRBmviwLU2RJeFCEL6vyskzd91AqfowfGX 9qjpiM5Qgun2TjQFiyNvRaWPiGa//OCTlm6kYfuMhQzbj36LvvZOSNZoK0MukAfLA+Tb FAo71lnAnlGp3e/j0e+KngajWIuS0/AlpU52EjK9zb6s2Vx8QocksyBIExCOk8izcIxy RY+MayvDfMWPpfgvzzZVRAdfXEeCXhPTdoQZUep2OW0Tvt95rpv8Vj32Y+TnliHQnsh+ xGzUqyHTCov8WBayLAI9iAaOoX6BplXrLX6CJwN8OWEurpHLo5D+OOfRpuF+103hUXbC zemQ== X-Gm-Message-State: AOJu0YyZ/QI/MYnlbHJ8UzeZnmXc51RqrL8E5eRplB5jZRJUQ1JPExCt fPjFQHCV6LTOxTvOxNWBZsISMt/j/tyXxdY1L/FEJPnZu3sjLbVO X-Google-Smtp-Source: AGHT+IF7dfmePFm6U+1nHVRSUsw4qyaxB55t7CWjzI+18eOBLVEhmjCvSGThTegdmMxOjx/bFV0BN+jz5N9Ks5jrW34= X-Received: by 2002:a17:907:7b88:b0:98e:3dac:6260 with SMTP id ne8-20020a1709077b8800b0098e3dac6260mr4727753ejc.13.1692296510860; Thu, 17 Aug 2023 11:21:50 -0700 (PDT) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 References: <202308171735.37HHZdbH046154@gitrepo.freebsd.org> <88a3318f-37bd-f60e-fe6a-5ee58584fcbf@FreeBSD.org> In-Reply-To: <88a3318f-37bd-f60e-fe6a-5ee58584fcbf@FreeBSD.org> From: Warner Losh Date: Thu, 17 Aug 2023 12:21:39 -0600 Message-ID: Subject: Re: git: 4722ceb7d53e - main - Use 115200 bps by default for serial communication To: John Baldwin Cc: Ed Maste , src-committers , "" , "" Content-Type: multipart/alternative; boundary="00000000000062814e0603227c29" X-Rspamd-Queue-Id: 4RRYHj081Wz3QLr X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] --00000000000062814e0603227c29 Content-Type: text/plain; charset="UTF-8" On Thu, Aug 17, 2023, 12:19 PM John Baldwin 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 > > AuthorDate: 2023-08-17 17:14:52 +0000 > > Commit: Ed Maste > > 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


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=3D4722ceb7d53e76507c76e053caab6b= 6f7b24ecef
>
> commit 4722ceb7d53e76507c76e053caab6b6f7b24ecef
> Author:=C2=A0 =C2=A0 =C2=A0Ed Maste <emaste@FreeBSD.org>
> AuthorDate: 2023-08-17 17:14:52 +0000
> Commit:=C2=A0 =C2=A0 =C2=A0Ed Maste <emaste@FreeBSD.org>
> CommitDate: 2023-08-17 17:31:38 +0000
>
>=C2=A0 =C2=A0 =C2=A0 Use 115200 bps by default for serial communication=
>=C2=A0 =C2=A0 =C2=A0
>=C2=A0 =C2=A0 =C2=A0 9600 was a standard baud rate decades ago, but 115= 200 is now more common
>=C2=A0 =C2=A0 =C2=A0 so choose defaults that are useful to the largest = number of users.
>=C2=A0 =C2=A0 =C2=A0
>=C2=A0 =C2=A0 =C2=A0 Note that boot0sio does not support rates above 96= 00 so it remains
>=C2=A0 =C2=A0 =C2=A0 unchanged.
>=C2=A0 =C2=A0 =C2=A0
>=C2=A0 =C2=A0 =C2=A0 Reviewed by:=C2=A0 =C2=A0 bz, imp, manu
>=C2=A0 =C2=A0 =C2=A0 Relnotes:=C2=A0 =C2=A0 =C2=A0 =C2=A0Yes
>=C2=A0 =C2=A0 =C2=A0 Sponsored by:=C2=A0 =C2=A0The FreeBSD Foundation >=C2=A0 =C2=A0 =C2=A0 Differential Revision: https:/= /reviews.freebsd.org/D36295
> ---
>=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 = ++++++++++++
>=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 +++---
>=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 ++--
>=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 +-
>=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 ++---
>=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 +-
>=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 +-
>=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 +-
>=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 +-
>=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 +-
>=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 +-
>=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 +-
>=C2=A0 =C2=A0stand/i386/gptzfsboot/Makefile=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 |=C2=A0 2 +-
>=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 +-
>=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 +-
>=C2=A0 =C2=A0stand/i386/libi386/comconsole.c=C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0|=C2=A0 2 +-
>=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 +-
>=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 +-
>=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 +-
>=C2=A0 =C2=A0tools/tools/nanobsd/rescue/Files/etc/ttys |=C2=A0 8 ++++--= --
>=C2=A0 =C2=A020 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:=
>=C2=A0 =C2=A0 =C2=A0 =C2=A0world, or to merely disable the most expensi= ve debugging functionality
>=C2=A0 =C2=A0 =C2=A0 =C2=A0at runtime, run "ln -s 'abort:false= ,junk:false' /etc/malloc.conf".)
>=C2=A0 =C2=A0
> +20230817:
> +=C2=A0 =C2=A0 =C2=A0Serial communication (in boot loaders, kernel, an= d userland) has
> +=C2=A0 =C2=A0 =C2=A0been changed to default to 115200 bps, in line wi= th common industry
> +=C2=A0 =C2=A0 =C2=A0practice and typcial firmware serial console redi= rection
> +=C2=A0 =C2=A0 =C2=A0configuration.
> +
> +=C2=A0 =C2=A0 =C2=A0Note that the early x86 BIOS bootloader (i.e., bo= ot0sio) does not
> +=C2=A0 =C2=A0 =C2=A0support rates above 9600 bps and is not chagned.= =C2=A0 boot0sio users may

s/chagned/changed/

> +=C2=A0 =C2=A0 =C2=A0set BOOT_COMCONSOLE_SPEED=3D9600 to use 9600 for = all of the boot
> +=C2=A0 =C2=A0 =C2=A0components, or use the standard boot0 and have th= e boot2 stage start
> +=C2=A0 =C2=A0 =C2=A0with the serial port at 115200.

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

# Comm settings for boot0sio.
#
# boot0sio uses BIOS INT $0x14 for serial ports, we can only support these<= br> # baudrates due to INT14's limited interface. In addition, if
# BOOT_BOOT0_COMCONSOLE_SPEED=3D0, then the baud rate and frame format will= remain
# unchanged. Some BIOSes initialize the serial ports to 115200, and this ma= y
# 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.=C2=A0 Gra= nted,
all of this is for non-UEFI booting anyway so is a bit long in the tooth regardless.=C2=A0 Do we bother setting the speed at all for UEFI or do we j= ust
trust the firmware to do it I hope?

Trust the firmware to tell us what the s= peed is, but we do have some super hacky overrides.
=
Warner


--
John Baldwin

--00000000000062814e0603227c29--