Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 2 Aug 2023 12:56:42 -0700
From:      Mark Millard <marklmi@yahoo.com>
To:        Warner Losh <imp@bsdimp.com>
Cc:        Current FreeBSD <freebsd-current@freebsd.org>, FreeBSD ARM List <freebsd-arm@freebsd.org>
Subject:   Re: sys/modules/Makefile and MACHINE_ARCH vs arm64 (in use) vs aarch64 (not in use) VS. man arch; also COMPAT_FREEBSD32_ENABLED use
Message-ID:  <2B0FE8B1-5E53-4E70-9792-15A8E423CA33@yahoo.com>
In-Reply-To: <CANCZdfoRGUANSqWhhC=OOpEPc8zO3YkChKeqJS_NX6Cqn3_AjA@mail.gmail.com>
References:  <B8EB365B-414B-4932-A6F0-7A52733607C5.ref@yahoo.com> <B8EB365B-414B-4932-A6F0-7A52733607C5@yahoo.com> <CANCZdfoRGUANSqWhhC=OOpEPc8zO3YkChKeqJS_NX6Cqn3_AjA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Aug 2, 2023, at 11:16, Warner Losh <imp@bsdimp.com> wrote:

> Those all look wrong to me.
>=20
> Warner=20
>=20
> On Wed, Aug 2, 2023, 11:27 AM Mark Millard <marklmi@yahoo.com> wrote:
> man arch reports:
>=20
>            MACHINE       MACHINE_CPUARCH       MACHINE_ARCH
>            arm64         aarch64               aarch64
> . . .
>            arm           arm                   armv6, armv7
>=20
> So I'd not expect arm64 in MACHINE_ARCH . But
> sys/modules/Makefile has (from a grep for MACHINE_ARCH):
>=20
> .if ${MACHINE_ARCH} =3D=3D "amd64" || ${MACHINE_ARCH} =3D=3D "arm64"
> .if ${MACHINE_ARCH} =3D=3D "amd64" || ${MACHINE_ARCH} =3D=3D "arm64" =
|| ${MACHINE_ARCH:Mpowerpc64*}
>=20
>=20
> Another issue may be that COMPAT_FREEBSD32_ENABLED is only
> put to use in the Makefile for MACHINE_CPUARCH being i386
> or amd64 :
>=20
> .if ${MACHINE_CPUARCH} =3D=3D "i386" || ${MACHINE_CPUARCH} =3D=3D =
"amd64"
> _agp=3D           agp
> .if ${MACHINE_CPUARCH} =3D=3D "i386" || =
!empty(COMPAT_FREEBSD32_ENABLED)
> . . .


I'll note that, for example, i386 vs. armv7 do not match
for some struct md_ioctl field offsets and the overall
size. Mike Karels is looking at getting struct md_ioctl32
correctly matching each of of the contexts: i386, (32-bit)
powerpc, and armv7.

I do not know if there are other COMPAT_FREEBSD32 adjustments
needed for differences in memory layout across the 3 (i386,
powerpc, armv7). md_ioctl I learned about via kyua test runs
and looking at the background for some things it reported for
armv7.

I've not found a clear indication of what is expected to work
for chroot/lib32 vs. what is not expected to work. It seems
one must look in the code and see if one finds conditional
material based, in part, on COMPAT_FREEBSD32. It might also
be that COMPAT_FREEBSD32 for i386 vs. armv7 vs. powerpc
might not be intending identical coverage for all I know.
So seeing COMPAT_FREEBSD32 might not be enough to know the
intent.


=3D=3D=3D
Mark Millard
marklmi at yahoo.com




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2B0FE8B1-5E53-4E70-9792-15A8E423CA33>