From nobody Wed Feb 19 00:04:05 2025 X-Original-To: freebsd-current@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 4YyGpV6HL4z5pNLY for ; Wed, 19 Feb 2025 00:04:18 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-pj1-x102a.google.com (mail-pj1-x102a.google.com [IPv6:2607:f8b0:4864:20::102a]) (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 "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YyGpV2KqKz3ZVY for ; Wed, 19 Feb 2025 00:04:18 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-pj1-x102a.google.com with SMTP id 98e67ed59e1d1-2fbf77b2b64so11448404a91.2 for ; Tue, 18 Feb 2025 16:04:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1739923456; x=1740528256; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=/ZzceWk0iID3BCJAakMf3N4ITDWrClnL4y6Dzr0jrc8=; b=onkKdiUFq+h5SbhvhgX1mvIowi+zMmC9Xpl6ZRr4mu3fiLydfv/fnQEIwVNH3cYbet zjXy0VPlPQQ816180TCubf311sKkR3VE2YCxK7ykcSFIxmu60p4G3z5oxTNMNGvYJNNb +791HqotOvhW6+/eua3diaNHkaWimAOxRAb+LZA22uNiycDJdXCJAKjO3dr4/8ReLAG1 UIM4ynNuqW7UHOFlqebVItk84VxL/0+7uzBj9i9Ncca+C07cAnNuI9HWlBTPSUFlbdfk N5K6gkvGGefnWu0Lrsh7s1Bkv1B52ClJQfeLU8c74HF2C1umDGtB1WAqAnUbXyFhMpHw 9qww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739923456; x=1740528256; 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=/ZzceWk0iID3BCJAakMf3N4ITDWrClnL4y6Dzr0jrc8=; b=oSLmkQErrh910YSQc/bB00lj+EkJAEyCtBw6Vpvb4rFDJ/ea7IvuW15H6UAbfYNe+z YhE8Lzvi1/NbxUbxzXFUiHvZQRE6HeIcqOjN7lP9Z2H3PUB12Vuf2eSD0w06vlQvyyBT I/1w7vbiAIsbM0KGPtduqDbU6oN0zACIn/Qu1p2q0jljr8zcCNk5d7c+6Si0xIP3R6R6 trqHzcaOvA0WHjYnk2jc4Fovfdd0FEGTtINbooORjCdHF6JjzPp9tEPsSTZgB9HKHa1p IiI/MYbyxRBsPY29NcOTaa7B5ihYyabqWKRfpRc2VmiRfNVqdi2NCVDZwADoJQ9cLt88 KXdg== X-Forwarded-Encrypted: i=1; AJvYcCU8I1qG2iW2oC/PQ3ufA74zPvnoMXS8CqkT/OTmYhVlLsOURx8f2h3GgZB17p2nhrHgana+yiDRNwQGhC83MeM=@freebsd.org X-Gm-Message-State: AOJu0YyXl5B3fP+2vci4Oj+GsEoHUC6iRbGuOOMmeFU/bQN3ohqJwPk4 vSY++/6YD17vX8X2ACU3mD4wrgIxhc1pDfpSnPcN5HBlLM0Fa8Jrr4mcJ+4F1U7uBdpc+NvZLcO vUlOJtWFhdZ4Q9+/jv9jta9D2oFIkhWR0FLBfWQ== X-Gm-Gg: ASbGncuQnK+CSF/fEBl9T7ZW+GKZh6MEhxzDGXs3h4ReYTs+TUEbHGGgBR23t733wAf au1gZDsq7vCeUeaIQMH3Ee2vpy5+7GnG+LuDA8VhSi8eJxpq3yiTRQh971GReDRbGxX7zmX+p X-Google-Smtp-Source: AGHT+IGmOHtNhuzzepnoM3NVUtu057Vx6Ghslxkq0pMFSuqt+W6E2R8Jo5OP6ZtexaiPJwOtUolkVbdKpsjFvfZ3qPo= X-Received: by 2002:a17:90b:4e85:b0:2ee:c9b6:c267 with SMTP id 98e67ed59e1d1-2fcb5a14805mr2250009a91.9.1739923456189; Tue, 18 Feb 2025 16:04:16 -0800 (PST) List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@FreeBSD.org MIME-Version: 1.0 References: <82B278D1-6483-438A-AAA5-DFD809B2E736.ref@yahoo.com> <82B278D1-6483-438A-AAA5-DFD809B2E736@yahoo.com> In-Reply-To: From: Warner Losh Date: Tue, 18 Feb 2025 17:04:05 -0700 X-Gm-Features: AWEUYZlpDAmHUcpsgB-hX8UQOEvgMG4qT2s6O_2pZIj-zL-1JDnwboP-noSs3uU Message-ID: 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? To: Mark Millard Cc: freebsd-arm , FreeBSD Current Content-Type: multipart/alternative; boundary="0000000000008b02b5062e737fae" 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:2607:f8b0::/32, country:US] X-Rspamd-Queue-Id: 4YyGpV2KqKz3ZVY X-Spamd-Bar: ---- --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 wr= ote: > On Feb 18, 2025, at 14:01, Warner Losh wrote: > > > > On Tue, Feb 18, 2025 at 2:56=E2=80=AFPM Warner Losh wr= ote: > >> > >> On Sat, Feb 15, 2025 at 10:04=E2=80=AFAM Mark Millard > 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


On Tue, Feb 18,= 2025 at 4:57=E2=80=AFPM Mark Millard <marklmi@yahoo.com> wrote:
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> wrote:
>>
>> On Sat, Feb 15, 2025 at 10:04=E2=80=AFAM Mark Millard <marklmi@yahoo.com> w= rote:
>>> [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)=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)
>>>
>>> NAME
>>>=C2=A0 =C2=A0 =C2=A0 device.hints =E2=80=93 device resource hin= ts
>>>
>>> . . .
>>>
>>> FILES
>>>=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.
>>>=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
>>>=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.
>>>=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
>>>=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
>>>=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.
>>> . . .
>>>
>>>
>>>
>>> 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
>>>=C2=A0 =C2=A0such GENERIC.hints file. The same goes for riscv64=
>>>=C2=A0 =C2=A0(riscv?).
>>>
>>>=C2=A0 =C2=A0The intent for powerpc64 , powerpc64le , and power= pcspe
>>>=C2=A0 =C2=A0may have the same issue.
>>>
>>>
>>> ) At least for how the local systems were installed, there
>>>=C2=A0 =C2=A0is no such place predefined as /sys/ , not=C2=A0 = =C2=A0even as a
>>>=C2=A0 =C2=A0symbolic link. "man 7 hier" does not lis= t such.
>>>
>>>=C2=A0 =C2=A0So it seems /sys -> /usr/src/sys is intended. (= But
>>>=C2=A0 =C2=A0/usr/src/ need not have been populated, leaving a<= br> >>>=C2=A0 =C2=A0lack of any GENERIC.hints in such a case.)
>>>
>>>=C2=A0 =C2=A0Best to not to depend on /sys in the notation show= n?
>>>
>>>
>>> ) The /ARCH/ reference is unclear vs. MACHINE,
>>>=C2=A0 =C2=A0MACHINE_CPUARCH, and MACHINE_ARCH. The example pat= hs
>>>=C2=A0 =C2=A0existing for GENERIC.hints do not help because the= y
>>>=C2=A0 =C2=A0all allow MACHINE =3D=3D MACHINE_CPUARCH ,
>>>=C2=A0 =C2=A0MACHINE =3D=3D MACHINE_ARCH , and
>>>=C2=A0 =C2=A0MACHINE_CPUARCH =3D=3D MACHINE_ARCH. However, base= d on the
>>>=C2=A0 =C2=A0NOTE paths:
>>
>> Like all things kernel, it's MACHINE.
>>
>>>=C2=A0 =C2=A0# find -s /usr/src/ -name NOTES -print | grep /con= f/NOTES | more
>>>=C2=A0 =C2=A0/usr/src/sys/amd64/conf/NOTES
>>>=C2=A0 =C2=A0/usr/src/sys/arm/conf/NOTES
>>>=C2=A0 =C2=A0/usr/src/sys/arm64/conf/NOTES
>>>=C2=A0 =C2=A0/usr/src/sys/conf/NOTES
>>>=C2=A0 =C2=A0/usr/src/sys/i386/conf/NOTES
>>>=C2=A0 =C2=A0/usr/src/sys/powerpc/conf/NOTES
>>>=C2=A0 =C2=A0/usr/src/sys/riscv/conf/NOTES
>>>=C2=A0 =C2=A0/usr/src/sys/x86/conf/NOTES
>>>
>>>=C2=A0 =C2=A0None of of the MACHINE* are right: x86 is not one = of
>>>=C2=A0 =C2=A0any of the 3. Otherwise /arm64/conf/NOTES would su= ggest
>>>=C2=A0 =C2=A0MACHINE as the only possibility if /ARCH/ was unif= orm
>>>=C2=A0 =C2=A0for relative to the 3 MACHINE* possibilities. So?:=
>>>
>>>=C2=A0 =C2=A0/usr/src/sys/arm64/conf/GENERIC.hints
>>>=C2=A0 =C2=A0/usr/src/sys/arm/conf/GENERIC.hints
>>>=C2=A0 =C2=A0/usr/src/sys/riscv/conf/GENERIC.hints
>>>
>>>=C2=A0 =C2=A0with no aarch64 , armv7 , powerpc64* , powerpcspe = , or
>>>=C2=A0 =C2=A0riscv64 examples?
>>
>> We store these in /dev/null these days :).
>>
>> I'll create empty ones for this.
>
>=C2=A0 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 cre= ated
> 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=C2=A0
--0000000000008b02b5062e737fae--