Date: Wed, 2 Aug 2023 17:25:29 -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: <D1A6668B-4E6A-44E0-9A2A-69495BD91C41@yahoo.com> In-Reply-To: <2B0FE8B1-5E53-4E70-9792-15A8E423CA33@yahoo.com> References: <B8EB365B-414B-4932-A6F0-7A52733607C5@yahoo.com> <CANCZdfoRGUANSqWhhC=OOpEPc8zO3YkChKeqJS_NX6Cqn3_AjA@mail.gmail.com> <2B0FE8B1-5E53-4E70-9792-15A8E423CA33@yahoo.com>
index | next in thread | previous in thread | raw e-mail
On Aug 2, 2023, at 12:56, Mark Millard <marklmi@yahoo.com> wrote:
> On Aug 2, 2023, at 11:16, Warner Losh <imp@bsdimp.com> wrote:
>
>> Those all look wrong to me.
>>
>> Warner
>>
>> On Wed, Aug 2, 2023, 11:27 AM Mark Millard <marklmi@yahoo.com> wrote:
>> man arch reports:
>>
>> MACHINE MACHINE_CPUARCH MACHINE_ARCH
>> arm64 aarch64 aarch64
>> . . .
>> arm arm armv6, armv7
>>
>> So I'd not expect arm64 in MACHINE_ARCH . But
>> sys/modules/Makefile has (from a grep for MACHINE_ARCH):
>>
>> .if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "arm64"
>> .if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "arm64" || ${MACHINE_ARCH:Mpowerpc64*}
>>
>>
>> Another issue may be that COMPAT_FREEBSD32_ENABLED is only
>> put to use in the Makefile for MACHINE_CPUARCH being i386
>> or amd64 :
>>
>> .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
>> _agp= agp
>> .if ${MACHINE_CPUARCH} == "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.
Turns out no member offsets were different but the size
was: just differing tail padding in the structure. Still
it means some conditional differences across i386 and
armv7. (I've no clue if the 32-bit powerpc lib32/chroot
handling is working on powerpc64 vs. not. So I make no
claims relative to such.)
> 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.
===
Mark Millard
marklmi at yahoo.com
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?D1A6668B-4E6A-44E0-9A2A-69495BD91C41>
