aboutsummaryrefslogtreecommitdiff
path: root/sys/compat/cloudabi64
Commit message (Collapse)AuthorAgeFilesLines
...
* Sync in latest upstream system call definitions.Ed Schouten2015-07-271-3/+3
| | | | | | | | | Futex object scopes have been renamed from using their own constants to simply reusing the existing CLOUDABI_MAP_{PRIVATE,SHARED} flags, as they are more accurate in this context. Notes: svn path=/head/; revision=285906
* Regenerate system call table.Ed Schouten2015-07-225-8/+23
| | | | Notes: svn path=/head/; revision=285791
* Import upstream changes to the system call definitions.Ed Schouten2015-07-221-2/+5
| | | | | | | | Support has been added for providing the scope of a futex operation, whether the futex is local to the process or shared between processes. Notes: svn path=/head/; revision=285790
* Make thread creation work for CloudABI processes.Ed Schouten2015-07-212-2/+71
| | | | | | | | | | | | | | | | | | | | | | | | Summary: Remove the stub system call that was put in place during the system call import and replace it by a target-dependent version stored in sys/amd64. Initialize the thread in a way similar to cpu_set_upcall_kse(). We provide the entry point with two arguments: the thread ID and the argument pointer. Test Plan: Thread creation still seems to work, both for FreeBSD and CloudABI binaries. Reviewers: dchagin, mjg, kib Reviewed By: kib Subscribers: imp Differential Revision: https://reviews.freebsd.org/D3110 Notes: svn path=/head/; revision=285744
* Regenerate system call table for r285540.Ed Schouten2015-07-145-14/+14
| | | | Notes: svn path=/head/; revision=285541
* Implement thread_tcb_set() and thread_yield().Ed Schouten2015-07-142-11/+1
| | | | | | | | | | | | | | | | | The first system call is used to set the user TLS address. Right now this system call is invoked by the C library for both the initial thread and additional threads unconditionally, but in the future we'll only call this if the architecture does not support this. On recent x86-64 CPUs we could use the WRFSBASE instruction. This system call was erroneously placed in sys/compat/cloudabi64, even though it does not depend on any pointer size dependent datastructure. Move it to the right place. Obtained from: https://github.com/NuxiNL/freebsd Notes: svn path=/head/; revision=285540
* Implement {,p}{read,write}{,v}().Ed Schouten2015-07-141-8/+87
| | | | | | | | | | | | Add a routine similar to copyinuio() and freebsd32_copyinuio() that copies in CloudABI's struct iovecs. These are then translated into FreeBSD format and placed in a 'struct uio', so we can call into the kern_*() functions. Obtained from: https://github.com/NuxiNL/freebsd Notes: svn path=/head/; revision=285539
* Generate CloudABI system call table with proper $FreeBSD$ tags.Ed Schouten2015-07-095-0/+2339
| | | | Notes: svn path=/head/; revision=285308
* Import the CloudABI datatypes and create a system call table.Ed Schouten2015-07-098-0/+484
CloudABI is a pure capability-based runtime environment for UNIX. It works similar to Capsicum, except that processes already run in capabilities mode on startup. All functionality that conflicts with this model has been omitted, making it a compact binary interface that can be supported by other operating systems without too much effort. CloudABI is 'secure by default'; the idea is that it should be safe to run arbitrary third-party binaries without requiring any explicit hardware virtualization (Bhyve) or namespace virtualization (Jails). The rights of an application are purely determined by the set of file descriptors that you grant it on startup. The datatypes and constants used by CloudABI's C library (cloudlibc) are defined in separate files called syscalldefs_mi.h (pointer size independent) and syscalldefs_md.h (pointer size dependent). We import these files in sys/contrib/cloudabi and wrap around them in cloudabi*_syscalldefs.h. We then add stubs for all of the system calls in sys/compat/cloudabi or sys/compat/cloudabi64, depending on whether the system call depends on the pointer size. We only have nine system calls that depend on the pointer size. If we ever want to support 32-bit binaries, we can simply add sys/compat/cloudabi32 and implement these nine system calls again. The next step is to send in code reviews for the individual system call implementations, but also add a sysentvec, to allow CloudABI executabled to be started through execve(). More information about CloudABI: - GitHub: https://github.com/NuxiNL/cloudlibc - Talk at BSDCan: https://www.youtube.com/watch?v=SVdF84x1EdA Differential Revision: https://reviews.freebsd.org/D2848 Reviewed by: emaste, brooks Obtained from: https://github.com/NuxiNL/freebsd Notes: svn path=/head/; revision=285307