HomeFreeBSD

Add very preliminary support for CloudABI for ARMv6.

Description

Add very preliminary support for CloudABI for ARMv6.

In order to make CloudABI work on ARMv6, start off by copying over the
sysvec for ARM64 and adjust it to use 32-bit registers. Also add code
for fetching arguments from the stack if needed, as there are fewer
register than on ARM64.

Also import the vDSO that is needed to invoke system calls. This vDSO
uses the intra procedure call register (ip) to store the system call
number. This is a bit simpler than what native FreeBSD does, as FreeBSD
uses r7, while preserving the original r7 into ip.

This sysvec seems to be complete enough to start CloudABI processes.
These processes are capable of linking in the vDSO and are therefore
capable of executing (most?) system calls successfully. Unfortunately,
the biggest show stopper is still that TLS is completely broken:

  • The linker used by CloudABI, LLD, still has troubles with some of the relocations needed for TLS. See LLVM bug 30218 for more details.
  • Whereas FreeBSD uses the tpidruro register for TLS, for CloudABI I want to make use of tpidrurw, so that userspace can modify the base address directly. This is needed for efficient emulation. Unfortunately, this register doesn't seem to be preserved across context switches yet.

Obtained from: https://github.com/NuxiNL/cloudabi (the vDSO)

Details

Provenance
edAuthored on
Parents
rS305927: Remove reference of z(s)diff which was dropped before importing
Branches
Unknown
Tags
Unknown