Page MenuHomeFreeBSD

Add rudimentary support for building FreeBSD/arm64 with COMPAT_FREEBSD32.
ClosedPublic

Authored by ed on Nov 18 2017, 1:03 PM.
Referenced Files
Unknown Object (File)
Nov 23 2024, 4:23 AM
Unknown Object (File)
Sep 29 2024, 4:26 PM
Unknown Object (File)
Sep 29 2024, 4:26 PM
Unknown Object (File)
Sep 21 2024, 6:43 AM
Unknown Object (File)
Sep 20 2024, 4:44 AM
Unknown Object (File)
Sep 18 2024, 11:34 PM
Unknown Object (File)
Sep 16 2024, 8:41 PM
Unknown Object (File)
Sep 16 2024, 8:41 PM
Subscribers

Details

Summary

Right now I'm using two Raspberry Pi's (2 and 3) to test CloudABI
support for armv6, armv7 and aarch64. It would be nice if I could
restrict this to just a single instance when testing smaller changes.
This is why I'd like to get COMPAT_CLOUDABI32 to work on arm64.

As COMPAT_CLOUDABI32 depends on COMPAT_FREEBSD32, at least for the ELF
loading, this change adds all of the bits necessary to at least build a
kernel with COMPAT_FREEBSD32. All of the machine dependent system calls
are still stubbed out, for the reason that implementations for these are
only useful if actual support for running FreeBSD binaries is added.
This is outside the scope of this work.

Test Plan

With this change and others, I am able to run CloudABI armv6/armv7
binaries on FreeBSD/arm64.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

sys/arm64/include/param.h
54 ↗(On Diff #35407)

I wonder if this should be aarch32 and that somewhere else we have a compat that say that aarch32 == armv7

sys/arm64/include/param.h
54 ↗(On Diff #35407)

This is only used by sysctl hw.machine when accessed by 32-bit processes. I suspect it would make sense to pick armv6 (or armv7) here to remain compatible with actual 32-bit systems.

sys/arm64/include/param.h
54 ↗(On Diff #35407)

... and kern.supported_archs as well, it seems.

sys/arm64/include/param.h
54 ↗(On Diff #35407)

We should claim to be armv7

Announce armv7 instead of armv6.

ed added inline comments.
sys/arm64/include/param.h
54 ↗(On Diff #35407)

Done!

This revision is now accepted and ready to land.Nov 24 2017, 1:45 PM
This revision was automatically updated to reflect the committed changes.