Page MenuHomeFreeBSD

Make COMPAT_FREEBSD32 part of GENERIC on arm64.
ClosedPublic

Authored by ed on Nov 30 2017, 6:18 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Oct 3, 11:20 PM
Unknown Object (File)
Tue, Oct 1, 12:42 PM
Unknown Object (File)
Tue, Sep 24, 2:34 PM
Unknown Object (File)
Mon, Sep 23, 9:46 PM
Unknown Object (File)
Wed, Sep 18, 9:29 PM
Unknown Object (File)
Mon, Sep 16, 1:26 PM
Unknown Object (File)
Mon, Sep 16, 1:26 PM
Unknown Object (File)
Mon, Sep 16, 1:25 PM
Subscribers

Details

Summary

The cloudabi32.ko kernel modules can only be loaded on AMD64 and ARM64
by kernels built with COMPAT_FREEBSD32. Even though COMPAT_FREEBSD32
does not support the execution of native FreeBSD executables, do add it
to GENERIC, to make cloudabi32.ko usable.

According to size(1), this makes the kernel image approximately 0.7%
larger.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 13219
Build 13458: arc lint + arc unit

Event Timeline

Well, if it was 0.8% larger, I'd have my pitch-pots and feather bags lined up, but for only 0.7%, I'm good.

This revision is now accepted and ready to land.Nov 30 2017, 6:40 PM
sys/arm64/conf/GENERIC
55

Should there be a comment that this only works with CloudABI?

Use a different description that fits within 80 columns.

This revision now requires review to proceed.Dec 1 2017, 5:55 AM
sys/arm64/conf/GENERIC
55

Sure. What do you think about this description?

Description looks good.

Question, what happens on hardware w/o AArch32?

Description looks good.

Question, what happens on hardware w/o AArch32?

You'll probably get an exception on the first instruction.

A simple way would be to set a flag in identcpu.c under the ID_AA64PFR0_EL0 case to signal no 32-bit support if any CPUs lack it. This could then be queried in the exec path & complain to the user if it's unable to be run. We can test on ThunderX as it only supports AArch64.

This revision was automatically updated to reflect the committed changes.

Hi Andrew,

Question, what happens on hardware w/o AArch32?

You'll probably get an exception on the first instruction.

A simple way would be to set a flag in identcpu.c under the ID_AA64PFR0_EL0 case to signal no 32-bit support if any CPUs lack it. This could then be queried in the exec path & complain to the user if it's unable to be run. We can test on ThunderX as it only supports AArch64.

Good point. The existing cloudabi32.ko doesn't do anything with that at all. Would it make sense to let the modload fail in case the CPU doesn't support it?