Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 Feb 2025 17:04:05 -0700
From:      Warner Losh <imp@bsdimp.com>
To:        Mark Millard <marklmi@yahoo.com>
Cc:        freebsd-arm <freebsd-arm@freebsd.org>, FreeBSD Current <freebsd-current@freebsd.org>
Subject:   Re: No GENERIC.hints for aarch64 (arm64?), armv7, and more; also /sys/ based paths are referenced but seem to not be universally standard; also which ARCH standard in path?
Message-ID:  <CANCZdfrUxEiEtEZfO3G9L=aN44KYtCZ_-AQFLsz=vRJvQ%2BXORw@mail.gmail.com>
In-Reply-To: <FDE404AE-0E82-469F-BBC5-4B61FE77535B@yahoo.com>

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

On Tue, Feb 18, 2025 at 4:57=E2=80=AFPM Mark Millard <marklmi@yahoo.com> wr=
ote:

> On Feb 18, 2025, at 14:01, Warner Losh <imp@bsdimp.com> wrote:
> >
> > On Tue, Feb 18, 2025 at 2:56=E2=80=AFPM Warner Losh <imp@bsdimp.com> wr=
ote:
> >>
> >> On Sat, Feb 15, 2025 at 10:04=E2=80=AFAM Mark Millard <marklmi@yahoo.c=
om>
> wrote:
> >>> [This seems likely to not be limited to main [so: 15 as stands].
> >>> But I'm using main as the example for the issue.]
> >>>
> >>> In:
> >>>
> >>> # man 5 device.hints
> >>> DEVICE.HINTS(5)           FreeBSD File Formats Manual
> DEVICE.HINTS(5)
> >>>
> >>> NAME
> >>>      device.hints =E2=80=93 device resource hints
> >>>
> >>> . . .
> >>>
> >>> FILES
> >>>      /boot/device.hints                          Device resource hint=
s
> file.
> >>>      /sys/ARCH/conf/GENERIC.hints                Sample resource hint=
s
> for the
> >>>                                                  GENERIC kernel.
> >>>      /sys/ARCH/conf/NOTES                        Notes on the kernel
> >>>                                                  configuration file
> and device
> >>>                                                  resource hints.
> >>> . . .
> >>>
> >>>
> >>>
> >>> For reference:
> >>>
> >>> # find -s / -name GENERIC.hints -print
> >>> /usr/src/sys/amd64/conf/GENERIC.hints
> >>> /usr/src/sys/i386/conf/GENERIC.hints
> >>> /usr/src/sys/powerpc/conf/GENERIC.hints
> >>>
> >>>
> >>> Multiple points:
> >>>
> >>> ) It seems that aarch64 (arm64?) and armv7 (arm?) have no
> >>>   such GENERIC.hints file. The same goes for riscv64
> >>>   (riscv?).
> >>>
> >>>   The intent for powerpc64 , powerpc64le , and powerpcspe
> >>>   may have the same issue.
> >>>
> >>>
> >>> ) At least for how the local systems were installed, there
> >>>   is no such place predefined as /sys/ , not   even as a
> >>>   symbolic link. "man 7 hier" does not list such.
> >>>
> >>>   So it seems /sys -> /usr/src/sys is intended. (But
> >>>   /usr/src/ need not have been populated, leaving a
> >>>   lack of any GENERIC.hints in such a case.)
> >>>
> >>>   Best to not to depend on /sys in the notation shown?
> >>>
> >>>
> >>> ) The /ARCH/ reference is unclear vs. MACHINE,
> >>>   MACHINE_CPUARCH, and MACHINE_ARCH. The example paths
> >>>   existing for GENERIC.hints do not help because they
> >>>   all allow MACHINE =3D=3D MACHINE_CPUARCH ,
> >>>   MACHINE =3D=3D MACHINE_ARCH , and
> >>>   MACHINE_CPUARCH =3D=3D MACHINE_ARCH. However, based on the
> >>>   NOTE paths:
> >>
> >> Like all things kernel, it's MACHINE.
> >>
> >>>   # find -s /usr/src/ -name NOTES -print | grep /conf/NOTES | more
> >>>   /usr/src/sys/amd64/conf/NOTES
> >>>   /usr/src/sys/arm/conf/NOTES
> >>>   /usr/src/sys/arm64/conf/NOTES
> >>>   /usr/src/sys/conf/NOTES
> >>>   /usr/src/sys/i386/conf/NOTES
> >>>   /usr/src/sys/powerpc/conf/NOTES
> >>>   /usr/src/sys/riscv/conf/NOTES
> >>>   /usr/src/sys/x86/conf/NOTES
> >>>
> >>>   None of of the MACHINE* are right: x86 is not one of
> >>>   any of the 3. Otherwise /arm64/conf/NOTES would suggest
> >>>   MACHINE as the only possibility if /ARCH/ was uniform
> >>>   for relative to the 3 MACHINE* possibilities. So?:
> >>>
> >>>   /usr/src/sys/arm64/conf/GENERIC.hints
> >>>   /usr/src/sys/arm/conf/GENERIC.hints
> >>>   /usr/src/sys/riscv/conf/GENERIC.hints
> >>>
> >>>   with no aarch64 , armv7 , powerpc64* , powerpcspe , or
> >>>   riscv64 examples?
> >>
> >> We store these in /dev/null these days :).
> >>
> >> I'll create empty ones for this.
> >
> >  https://reviews.freebsd.org/D49052
>
> Thanks.
>
> > Just to expand a little: These platforms don't have legacy devices
> > they need to hard-wire in various ways, unlike the other platforms.
> > However, people use them to do device instance wiring, so I've created
> > the empty ones.
>
> An example can also be disabling something that needs to be avoided
> for some unusual reason, such as avoiding virtio_gpu under parallels
> on aarch64 macOS. (I've not tested doing that yet.)
>

I'm open to commenting out such things.

Warner

--0000000000008b02b5062e737fae
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div dir=3D"ltr"><br></div><br><div class=3D"gmail_quote g=
mail_quote_container"><div dir=3D"ltr" class=3D"gmail_attr">On Tue, Feb 18,=
 2025 at 4:57=E2=80=AFPM Mark Millard &lt;<a href=3D"mailto:marklmi@yahoo.c=
om">marklmi@yahoo.com</a>&gt; wrote:<br></div><blockquote class=3D"gmail_qu=
ote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,20=
4);padding-left:1ex">On Feb 18, 2025, at 14:01, Warner Losh &lt;<a href=3D"=
mailto:imp@bsdimp.com" target=3D"_blank">imp@bsdimp.com</a>&gt; wrote:<br>
&gt; <br>
&gt; On Tue, Feb 18, 2025 at 2:56=E2=80=AFPM Warner Losh &lt;<a href=3D"mai=
lto:imp@bsdimp.com" target=3D"_blank">imp@bsdimp.com</a>&gt; wrote:<br>
&gt;&gt; <br>
&gt;&gt; On Sat, Feb 15, 2025 at 10:04=E2=80=AFAM Mark Millard &lt;<a href=
=3D"mailto:marklmi@yahoo.com" target=3D"_blank">marklmi@yahoo.com</a>&gt; w=
rote:<br>
&gt;&gt;&gt; [This seems likely to not be limited to main [so: 15 as stands=
].<br>
&gt;&gt;&gt; But I&#39;m using main as the example for the issue.]<br>
&gt;&gt;&gt; <br>
&gt;&gt;&gt; In:<br>
&gt;&gt;&gt; <br>
&gt;&gt;&gt; # man 5 device.hints<br>
&gt;&gt;&gt; DEVICE.HINTS(5)=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0FreeBS=
D File Formats Manual=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 DEVICE.HINTS(5)<br>
&gt;&gt;&gt; <br>
&gt;&gt;&gt; NAME<br>
&gt;&gt;&gt;=C2=A0 =C2=A0 =C2=A0 device.hints =E2=80=93 device resource hin=
ts<br>
&gt;&gt;&gt; <br>
&gt;&gt;&gt; . . .<br>
&gt;&gt;&gt; <br>
&gt;&gt;&gt; FILES<br>
&gt;&gt;&gt;=C2=A0 =C2=A0 =C2=A0 /boot/device.hints=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 Device r=
esource hints file.<br>
&gt;&gt;&gt;=C2=A0 =C2=A0 =C2=A0 /sys/ARCH/conf/GENERIC.hints=C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Sample resource hints for the<br>
&gt;&gt;&gt;=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 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 GENERIC kernel.<br>
&gt;&gt;&gt;=C2=A0 =C2=A0 =C2=A0 /sys/ARCH/conf/NOTES=C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Notes on the=
 kernel<br>
&gt;&gt;&gt;=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 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 configuration file and device<br>
&gt;&gt;&gt;=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 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 resource hints.<br>
&gt;&gt;&gt; . . .<br>
&gt;&gt;&gt; <br>
&gt;&gt;&gt; <br>
&gt;&gt;&gt; <br>
&gt;&gt;&gt; For reference:<br>
&gt;&gt;&gt; <br>
&gt;&gt;&gt; # find -s / -name GENERIC.hints -print<br>
&gt;&gt;&gt; /usr/src/sys/amd64/conf/GENERIC.hints<br>
&gt;&gt;&gt; /usr/src/sys/i386/conf/GENERIC.hints<br>
&gt;&gt;&gt; /usr/src/sys/powerpc/conf/GENERIC.hints<br>
&gt;&gt;&gt; <br>
&gt;&gt;&gt; <br>
&gt;&gt;&gt; Multiple points:<br>
&gt;&gt;&gt; <br>
&gt;&gt;&gt; ) It seems that aarch64 (arm64?) and armv7 (arm?) have no<br>
&gt;&gt;&gt;=C2=A0 =C2=A0such GENERIC.hints file. The same goes for riscv64=
<br>
&gt;&gt;&gt;=C2=A0 =C2=A0(riscv?).<br>
&gt;&gt;&gt; <br>
&gt;&gt;&gt;=C2=A0 =C2=A0The intent for powerpc64 , powerpc64le , and power=
pcspe<br>
&gt;&gt;&gt;=C2=A0 =C2=A0may have the same issue.<br>
&gt;&gt;&gt; <br>
&gt;&gt;&gt; <br>
&gt;&gt;&gt; ) At least for how the local systems were installed, there<br>
&gt;&gt;&gt;=C2=A0 =C2=A0is no such place predefined as /sys/ , not=C2=A0 =
=C2=A0even as a<br>
&gt;&gt;&gt;=C2=A0 =C2=A0symbolic link. &quot;man 7 hier&quot; does not lis=
t such.<br>
&gt;&gt;&gt; <br>
&gt;&gt;&gt;=C2=A0 =C2=A0So it seems /sys -&gt; /usr/src/sys is intended. (=
But<br>
&gt;&gt;&gt;=C2=A0 =C2=A0/usr/src/ need not have been populated, leaving a<=
br>
&gt;&gt;&gt;=C2=A0 =C2=A0lack of any GENERIC.hints in such a case.)<br>
&gt;&gt;&gt; <br>
&gt;&gt;&gt;=C2=A0 =C2=A0Best to not to depend on /sys in the notation show=
n?<br>
&gt;&gt;&gt; <br>
&gt;&gt;&gt; <br>
&gt;&gt;&gt; ) The /ARCH/ reference is unclear vs. MACHINE,<br>
&gt;&gt;&gt;=C2=A0 =C2=A0MACHINE_CPUARCH, and MACHINE_ARCH. The example pat=
hs<br>
&gt;&gt;&gt;=C2=A0 =C2=A0existing for GENERIC.hints do not help because the=
y<br>
&gt;&gt;&gt;=C2=A0 =C2=A0all allow MACHINE =3D=3D MACHINE_CPUARCH ,<br>
&gt;&gt;&gt;=C2=A0 =C2=A0MACHINE =3D=3D MACHINE_ARCH , and<br>
&gt;&gt;&gt;=C2=A0 =C2=A0MACHINE_CPUARCH =3D=3D MACHINE_ARCH. However, base=
d on the<br>
&gt;&gt;&gt;=C2=A0 =C2=A0NOTE paths:<br>
&gt;&gt; <br>
&gt;&gt; Like all things kernel, it&#39;s MACHINE.<br>
&gt;&gt; <br>
&gt;&gt;&gt;=C2=A0 =C2=A0# find -s /usr/src/ -name NOTES -print | grep /con=
f/NOTES | more<br>
&gt;&gt;&gt;=C2=A0 =C2=A0/usr/src/sys/amd64/conf/NOTES<br>
&gt;&gt;&gt;=C2=A0 =C2=A0/usr/src/sys/arm/conf/NOTES<br>
&gt;&gt;&gt;=C2=A0 =C2=A0/usr/src/sys/arm64/conf/NOTES<br>
&gt;&gt;&gt;=C2=A0 =C2=A0/usr/src/sys/conf/NOTES<br>
&gt;&gt;&gt;=C2=A0 =C2=A0/usr/src/sys/i386/conf/NOTES<br>
&gt;&gt;&gt;=C2=A0 =C2=A0/usr/src/sys/powerpc/conf/NOTES<br>
&gt;&gt;&gt;=C2=A0 =C2=A0/usr/src/sys/riscv/conf/NOTES<br>
&gt;&gt;&gt;=C2=A0 =C2=A0/usr/src/sys/x86/conf/NOTES<br>
&gt;&gt;&gt; <br>
&gt;&gt;&gt;=C2=A0 =C2=A0None of of the MACHINE* are right: x86 is not one =
of<br>
&gt;&gt;&gt;=C2=A0 =C2=A0any of the 3. Otherwise /arm64/conf/NOTES would su=
ggest<br>
&gt;&gt;&gt;=C2=A0 =C2=A0MACHINE as the only possibility if /ARCH/ was unif=
orm<br>
&gt;&gt;&gt;=C2=A0 =C2=A0for relative to the 3 MACHINE* possibilities. So?:=
<br>
&gt;&gt;&gt; <br>
&gt;&gt;&gt;=C2=A0 =C2=A0/usr/src/sys/arm64/conf/GENERIC.hints<br>
&gt;&gt;&gt;=C2=A0 =C2=A0/usr/src/sys/arm/conf/GENERIC.hints<br>
&gt;&gt;&gt;=C2=A0 =C2=A0/usr/src/sys/riscv/conf/GENERIC.hints<br>
&gt;&gt;&gt; <br>
&gt;&gt;&gt;=C2=A0 =C2=A0with no aarch64 , armv7 , powerpc64* , powerpcspe =
, or<br>
&gt;&gt;&gt;=C2=A0 =C2=A0riscv64 examples?<br>
&gt;&gt; <br>
&gt;&gt; We store these in /dev/null these days :).<br>
&gt;&gt; <br>
&gt;&gt; I&#39;ll create empty ones for this.<br>
&gt; <br>
&gt;=C2=A0 <a href=3D"https://reviews.freebsd.org/D49052" rel=3D"noreferrer=
" target=3D"_blank">https://reviews.freebsd.org/D49052</a><br>;
<br>
Thanks.<br>
<br>
&gt; Just to expand a little: These platforms don&#39;t have legacy devices=
<br>
&gt; they need to hard-wire in various ways, unlike the other platforms.<br=
>
&gt; However, people use them to do device instance wiring, so I&#39;ve cre=
ated<br>
&gt; the empty ones.<br>
<br>
An example can also be disabling something that needs to be avoided<br>
for some unusual reason, such as avoiding virtio_gpu under parallels<br>
on aarch64 macOS. (I&#39;ve not tested doing that yet.)<br></blockquote><di=
v><br></div><div>I&#39;m open to commenting out such things.</div><div><br>=
</div><div>Warner=C2=A0</div></div></div>

--0000000000008b02b5062e737fae--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfrUxEiEtEZfO3G9L=aN44KYtCZ_-AQFLsz=vRJvQ%2BXORw>