Re: git: 9cc06bf7aa28 - main - amd64 GENERIC: Switch uart hints from "isa" to "acpi"

From: Warner Losh <imp_at_bsdimp.com>
Date: Mon, 15 Jul 2024 20:39:07 UTC
On Mon, Jul 15, 2024, 1:20 PM 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=9cc06bf7aa2846c35483de567779bb8afc289f53
> >
> > 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 numbers
> >      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.hints
> > index 7c2a3f28b9ce..4f6121c7cf77 100644
> > --- a/sys/amd64/conf/GENERIC.hints
> > +++ b/sys/amd64/conf/GENERIC.hints
> > @@ -6,13 +6,11 @@ hint.psm.0.at="atkbdc"
> >   hint.psm.0.irq="12"
> >   hint.sc.0.at="isa"
> >   hint.sc.0.flags="0x100"
> > -hint.uart.0.at="isa"
> > +hint.uart.0.at="acpi"
> >   hint.uart.0.port="0x3F8"
> >   hint.uart.0.flags="0x10"
> > -hint.uart.0.irq="4"
> > -hint.uart.1.at="isa"
> > +hint.uart.1.at="acpi"
> >   hint.uart.1.port="0x2F8"
> > -hint.uart.1.irq="3"
> >   hint.atrtc.0.at="isa"
> >   hint.atrtc.0.port="0x70"
> >   hint.atrtc.0.irq="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

-- 
> John Baldwin
>
>