Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 15 Jul 2024 14:39:07 -0600
From:      Warner Losh <imp@bsdimp.com>
To:        John Baldwin <jhb@freebsd.org>
Cc:        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: 9cc06bf7aa28 - main - amd64 GENERIC: Switch uart hints from "isa" to "acpi"
Message-ID:  <CANCZdfpyf-Wsm2isdqdo8-UbP0b61uuA0yu3rV9m6i%2BfQB940Q@mail.gmail.com>
In-Reply-To: <e9abf7e6-08af-4806-8498-c82bbb24b561@FreeBSD.org>
References:  <202407151915.46FJFr7L039362@gitrepo.freebsd.org> <e9abf7e6-08af-4806-8498-c82bbb24b561@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
--0000000000003177a1061d4f39af
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Mon, Jul 15, 2024, 1:20=E2=80=AFPM John Baldwin <jhb@freebsd.org> wrote:

> On 7/15/24 15:15, John Baldwin wrote:
> > The branch main has been updated by jhb:
> >
> > URL:
> https://cgit.FreeBSD.org/src/commit/?id=3D9cc06bf7aa2846c35483de567779bb8=
afc289f53
> >
> > commit 9cc06bf7aa2846c35483de567779bb8afc289f53
> > Author:     John Baldwin <jhb@FreeBSD.org>
> > AuthorDate: 2024-07-15 19:14:01 +0000
> > Commit:     John Baldwin <jhb@FreeBSD.org>
> > CommitDate: 2024-07-15 19:15:29 +0000
> >
> >      amd64 GENERIC: Switch uart hints from "isa" to "acpi"
> >
> >      This causes these hints to be only used to wire device unit number=
s
> >      for serial ports enumerated by ACPI but will not create ISA device
> >      nodes if ACPI doesn't enumerate them.  Note that IRQ hints are not
> >      used for wiring so have been removed.
> >
> >      PR:             270707
> >      Reported by:    aixdroix_OSS@protonmail.com, Michael Dexter
> >      Reported by:    mfw_burn@pm.me, Hannes Hfauswedell <
> h2+fbsdports@fsfe.org>
> >      Reported by:    Matthias Lanter <freebsd@lanter-it.ch>
> >      Reported by:    William Bulley <web@umich.edu>
> >      Reviewed by:    imp
> >      MFC after:      1 week
> >      Differential Revision:  https://reviews.freebsd.org/D45945
> > ---
> >   sys/amd64/conf/GENERIC.hints | 6 ++----
> >   1 file changed, 2 insertions(+), 4 deletions(-)
> >
> > diff --git a/sys/amd64/conf/GENERIC.hints b/sys/amd64/conf/GENERIC.hint=
s
> > index 7c2a3f28b9ce..4f6121c7cf77 100644
> > --- a/sys/amd64/conf/GENERIC.hints
> > +++ b/sys/amd64/conf/GENERIC.hints
> > @@ -6,13 +6,11 @@ hint.psm.0.at=3D"atkbdc"
> >   hint.psm.0.irq=3D"12"
> >   hint.sc.0.at=3D"isa"
> >   hint.sc.0.flags=3D"0x100"
> > -hint.uart.0.at=3D"isa"
> > +hint.uart.0.at=3D"acpi"
> >   hint.uart.0.port=3D"0x3F8"
> >   hint.uart.0.flags=3D"0x10"
> > -hint.uart.0.irq=3D"4"
> > -hint.uart.1.at=3D"isa"
> > +hint.uart.1.at=3D"acpi"
> >   hint.uart.1.port=3D"0x2F8"
> > -hint.uart.1.irq=3D"3"
> >   hint.atrtc.0.at=3D"isa"
> >   hint.atrtc.0.port=3D"0x70"
> >   hint.atrtc.0.irq=3D"8"
>
> Warner would like to purge more of this file (almost all of it) which is
> probably correct.  Warner believes that the uart0 flags to set serial
> console aren't needed for loaders from FreeBSD 9+ due to the hw.uart.*
> tunables modern loaders set.  I'm less certain about hints for "fixed"
> devices such as attimer0, atrtc0, and atkbdc0.  I feel like some systems
> have failed to enumerate those in the past, though such systems may be
> i386-only.  The sc0 hints I think can go away once we fully deprecate
> sc(4) in favor of only vt(4).
>

atkbdc likely needs to go. Legacy free systems don't have it and I've
helped at least one person in the past whose system hung after accessing
ports 60 and 61.

attimer is unused on modern systems that have several other options. It
likely can go.

atrtc isn't needed for uefi, since efirt can get the time much faster. I
think it is in acpi but I'm not entirely sure.

Sc is unused by and large and is set for removal :)  people using it may
have to take extra actions...

I've chosen to leave i386 alone as there's still some ancient i386 cruft,
> but on amd64 we have a higher bar (e.g. ACPI is de facto required for
> amd64).  Also, i386 kernels have one foot in the grave already.
>
> This commit is also somewhat narrow in scope as I plan to merge it back
> to 13 and 14.
>

Sounds like a plan. We have time.

Warner

--=20
> John Baldwin
>
>

--0000000000003177a1061d4f39af
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 Mon, Jul 15, 2024, 1:20=E2=80=AFPM John Baldwin &lt=
;<a href=3D"mailto:jhb@freebsd.org">jhb@freebsd.org</a>&gt; wrote:<br></div=
><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1=
px #ccc solid;padding-left:1ex">On 7/15/24 15:15, John Baldwin wrote:<br>
&gt; The branch main has been updated by jhb:<br>
&gt; <br>
&gt; URL: <a href=3D"https://cgit.FreeBSD.org/src/commit/?id=3D9cc06bf7aa28=
46c35483de567779bb8afc289f53" rel=3D"noreferrer noreferrer" target=3D"_blan=
k">https://cgit.FreeBSD.org/src/commit/?id=3D9cc06bf7aa2846c35483de567779bb=
8afc289f53</a><br>
&gt; <br>
&gt; commit 9cc06bf7aa2846c35483de567779bb8afc289f53<br>
&gt; Author:=C2=A0 =C2=A0 =C2=A0John Baldwin &lt;jhb@FreeBSD.org&gt;<br>
&gt; AuthorDate: 2024-07-15 19:14:01 +0000<br>
&gt; Commit:=C2=A0 =C2=A0 =C2=A0John Baldwin &lt;jhb@FreeBSD.org&gt;<br>
&gt; CommitDate: 2024-07-15 19:15:29 +0000<br>
&gt; <br>
&gt;=C2=A0 =C2=A0 =C2=A0 amd64 GENERIC: Switch uart hints from &quot;isa&qu=
ot; to &quot;acpi&quot;<br>
&gt;=C2=A0 =C2=A0 =C2=A0 <br>
&gt;=C2=A0 =C2=A0 =C2=A0 This causes these hints to be only used to wire de=
vice unit numbers<br>
&gt;=C2=A0 =C2=A0 =C2=A0 for serial ports enumerated by ACPI but will not c=
reate ISA device<br>
&gt;=C2=A0 =C2=A0 =C2=A0 nodes if ACPI doesn&#39;t enumerate them.=C2=A0 No=
te that IRQ hints are not<br>
&gt;=C2=A0 =C2=A0 =C2=A0 used for wiring so have been removed.<br>
&gt;=C2=A0 =C2=A0 =C2=A0 <br>
&gt;=C2=A0 =C2=A0 =C2=A0 PR:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0270707<br>
&gt;=C2=A0 =C2=A0 =C2=A0 Reported by:=C2=A0 =C2=A0 <a href=3D"mailto:aixdro=
ix_OSS@protonmail.com" target=3D"_blank" rel=3D"noreferrer">aixdroix_OSS@pr=
otonmail.com</a>, Michael Dexter<br>
&gt;=C2=A0 =C2=A0 =C2=A0 Reported by:=C2=A0 =C2=A0 <a href=3D"mailto:mfw_bu=
rn@pm.me" target=3D"_blank" rel=3D"noreferrer">mfw_burn@pm.me</a>, Hannes H=
fauswedell &lt;<a href=3D"mailto:h2%2Bfbsdports@fsfe.org" target=3D"_blank"=
 rel=3D"noreferrer">h2+fbsdports@fsfe.org</a>&gt;<br>
&gt;=C2=A0 =C2=A0 =C2=A0 Reported by:=C2=A0 =C2=A0 Matthias Lanter &lt;<a h=
ref=3D"mailto:freebsd@lanter-it.ch" target=3D"_blank" rel=3D"noreferrer">fr=
eebsd@lanter-it.ch</a>&gt;<br>
&gt;=C2=A0 =C2=A0 =C2=A0 Reported by:=C2=A0 =C2=A0 William Bulley &lt;<a hr=
ef=3D"mailto:web@umich.edu" target=3D"_blank" rel=3D"noreferrer">web@umich.=
edu</a>&gt;<br>
&gt;=C2=A0 =C2=A0 =C2=A0 Reviewed by:=C2=A0 =C2=A0 imp<br>
&gt;=C2=A0 =C2=A0 =C2=A0 MFC after:=C2=A0 =C2=A0 =C2=A0 1 week<br>
&gt;=C2=A0 =C2=A0 =C2=A0 Differential Revision:=C2=A0 <a href=3D"https://re=
views.freebsd.org/D45945" rel=3D"noreferrer noreferrer" target=3D"_blank">h=
ttps://reviews.freebsd.org/D45945</a><br>
&gt; ---<br>
&gt;=C2=A0 =C2=A0sys/amd64/conf/GENERIC.hints | 6 ++----<br>
&gt;=C2=A0 =C2=A01 file changed, 2 insertions(+), 4 deletions(-)<br>
&gt; <br>
&gt; diff --git a/sys/amd64/conf/GENERIC.hints b/sys/amd64/conf/GENERIC.hin=
ts<br>
&gt; index 7c2a3f28b9ce..4f6121c7cf77 100644<br>
&gt; --- a/sys/amd64/conf/GENERIC.hints<br>
&gt; +++ b/sys/amd64/conf/GENERIC.hints<br>
&gt; @@ -6,13 +6,11 @@ <a href=3D"http://hint.psm.0.at" rel=3D"noreferrer n=
oreferrer" target=3D"_blank">hint.psm.0.at</a>=3D&quot;atkbdc&quot;<br>
&gt;=C2=A0 =C2=A0hint.psm.0.irq=3D&quot;12&quot;<br>
&gt;=C2=A0 =C2=A0<a href=3D"http://hint.sc.0.at" rel=3D"noreferrer noreferr=
er" target=3D"_blank">hint.sc.0.at</a>=3D&quot;isa&quot;<br>
&gt;=C2=A0 =C2=A0hint.sc.0.flags=3D&quot;0x100&quot;<br>
&gt; -<a href=3D"http://hint.uart.0.at" rel=3D"noreferrer noreferrer" targe=
t=3D"_blank">hint.uart.0.at</a>=3D&quot;isa&quot;<br>
&gt; +<a href=3D"http://hint.uart.0.at" rel=3D"noreferrer noreferrer" targe=
t=3D"_blank">hint.uart.0.at</a>=3D&quot;acpi&quot;<br>
&gt;=C2=A0 =C2=A0hint.uart.0.port=3D&quot;0x3F8&quot;<br>
&gt;=C2=A0 =C2=A0hint.uart.0.flags=3D&quot;0x10&quot;<br>
&gt; -hint.uart.0.irq=3D&quot;4&quot;<br>
&gt; -<a href=3D"http://hint.uart.1.at" rel=3D"noreferrer noreferrer" targe=
t=3D"_blank">hint.uart.1.at</a>=3D&quot;isa&quot;<br>
&gt; +<a href=3D"http://hint.uart.1.at" rel=3D"noreferrer noreferrer" targe=
t=3D"_blank">hint.uart.1.at</a>=3D&quot;acpi&quot;<br>
&gt;=C2=A0 =C2=A0hint.uart.1.port=3D&quot;0x2F8&quot;<br>
&gt; -hint.uart.1.irq=3D&quot;3&quot;<br>
&gt;=C2=A0 =C2=A0<a href=3D"http://hint.atrtc.0.at" rel=3D"noreferrer noref=
errer" target=3D"_blank">hint.atrtc.0.at</a>=3D&quot;isa&quot;<br>
&gt;=C2=A0 =C2=A0hint.atrtc.0.port=3D&quot;0x70&quot;<br>
&gt;=C2=A0 =C2=A0hint.atrtc.0.irq=3D&quot;8&quot;<br>
<br>
Warner would like to purge more of this file (almost all of it) which is<br=
>
probably correct.=C2=A0 Warner believes that the uart0 flags to set serial<=
br>
console aren&#39;t needed for loaders from FreeBSD 9+ due to the hw.uart.*<=
br>
tunables modern loaders set.=C2=A0 I&#39;m less certain about hints for &qu=
ot;fixed&quot;<br>
devices such as attimer0, atrtc0, and atkbdc0.=C2=A0 I feel like some syste=
ms<br>
have failed to enumerate those in the past, though such systems may be<br>
i386-only.=C2=A0 The sc0 hints I think can go away once we fully deprecate<=
br>
sc(4) in favor of only vt(4).<br></blockquote></div></div><div dir=3D"auto"=
><br></div><div dir=3D"auto">atkbdc likely needs to go. Legacy free systems=
 don&#39;t have it and I&#39;ve helped at least one person in the past whos=
e system hung after accessing ports 60 and 61.</div><div dir=3D"auto"><br><=
/div><div dir=3D"auto">attimer is unused on modern systems that have severa=
l other options. It likely can go.</div><div dir=3D"auto"><br></div><div di=
r=3D"auto">atrtc isn&#39;t needed for uefi, since efirt can get the time mu=
ch faster. I think it is in acpi but I&#39;m not entirely sure.</div><div d=
ir=3D"auto"><br></div><div dir=3D"auto">Sc is unused by and large and is se=
t for removal :)=C2=A0 people using it may have to take extra actions...</d=
iv><div dir=3D"auto"><br></div><div dir=3D"auto"><div class=3D"gmail_quote"=
><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1=
px #ccc solid;padding-left:1ex">
I&#39;ve chosen to leave i386 alone as there&#39;s still some ancient i386 =
cruft,<br>
but on amd64 we have a higher bar (e.g. ACPI is de facto required for<br>
amd64).=C2=A0 Also, i386 kernels have one foot in the grave already.<br>
<br>
This commit is also somewhat narrow in scope as I plan to merge it back<br>
to 13 and 14.<br></blockquote></div></div><div dir=3D"auto"><br></div><div =
dir=3D"auto">Sounds like a plan. We have time.</div><div dir=3D"auto"><br><=
/div><div dir=3D"auto">Warner</div><div dir=3D"auto"><br></div><div dir=3D"=
auto"><div class=3D"gmail_quote"><blockquote class=3D"gmail_quote" style=3D=
"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
-- <br>
John Baldwin<br>
<br>
</blockquote></div></div></div>

--0000000000003177a1061d4f39af--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfpyf-Wsm2isdqdo8-UbP0b61uuA0yu3rV9m6i%2BfQB940Q>