The first step to add support for CloudABI executables to the FreeBSD kernel is to import the CloudABI system call definitions into our source tree. These header files contain definitions for all types, structures and constants that are shared between kernelspace and userspace.
The syscalldefs_mi.h header file contains all of the data that does not depend on the target platform, in particularly the pointer size. These are placed in syscalldefs_md.h. The advantage of splitting these up is that it makes it easier to add support for both 32-bit and 64-bit binaries. It allows us to easily determine which system calls need to be implemented separately to support both flavors.
This change imports copies of upstream CloudABI syscalldefs_m*.h into the contributed code directory. It then adds wrappers around them stored in sys/compat/cloudabi and sys/compat/cloudabi64 to make them work in kernel space. These two directories will be used to store all of the emulator code.
In addition to importing the system call definitions, this change adds the CloudABI system call table, including stubs for every system call. After this change has been imported, we can make CloudABI support more complete by implementing all of the individual system calls.