HEADS UP: Changing the arm64 userland entry ABI

Andrew Turner andrew at fubar.geek.nz
Mon Jun 22 23:44:11 UTC 2015


If you don't use FreeBSD/arm64 you can stop reading now.

I'm changing the ABI for how the kernel provides the stack and the
pointer to the arguments. Currently both are provided through the stack
pointer, however this means the stack may be misaligned.

I'm changing this to have the stack pointer be correctly aligned, and
have a register (x0) point to the arguments. This will mean a new
kernel with old userland, or vice versa will fail.

To allow for there to be a transition, I've updated the userland side to
handle either the current or new ABI, and expect to update the kernel
in a week or two. When the kernel is updated only a userland built from
r284707 [1] or later will work.

There will also need to be similar changes made to qemu usermode to
support this.

The good news from this is this fixes the crash seen with clang, and I
have managed to get buildkernel to complete.

Andrew

[1] https://svnweb.freebsd.org/changeset/base/284707


More information about the freebsd-arm mailing list