summaryrefslogtreecommitdiffstats
path: root/sys/amd64/cloudabi64
Commit message (Collapse)AuthorAgeFilesLines
* Refactoring: move out generic bits from cloudabi64_sysvec.c.ed2015-10-221-117/+2
| | | | | | | | | | In order to make it easier to support CloudABI on ARM64, move out all of the bits from the AMD64 cloudabi_sysvec.c into a new file cloudabi_module.c that would otherwise remain identical. This reduces the AMD64 specific code to just ~160 lines. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D3974
* Add a kern.features.cloudabi64 entry when the module is loaded to helps thebapt2015-08-191-0/+2
| | | | | | | userland to be able to test is cloudabi64 is supported or not Reviewed by: ed Differential Revision: https://reviews.freebsd.org/D3430
* Let CloudABI use the SV_CAPSICUM flag.ed2015-08-031-1/+1
| | | | | | CloudABI processes will now start up in capabilities mode. Reviewed by: kib
* Set p_osrel to __FreeBSD_version on process startup.ed2015-08-031-1/+11
| | | | | | | | | | Certain system calls have quirks applied to make them work as if called on an older version of FreeBSD. As CloudABI executables don't have the FreeBSD OS release number in the ELF header, this value is set to zero, making the system calls fall back to typically historic, non-standard behaviour. Reviewed by: kib
* Make thread creation work for CloudABI processes.ed2015-07-211-0/+23
| | | | | | | | | | | | | | | | | | | | | 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
* Make forking of CloudABI processes work.ed2015-07-201-0/+11
| | | | | | | | | | | | Just like FreeBSD+Capsicum, CloudABI uses process descriptors. Return the file descriptor number to the parent process. To the child process we both return a special value for the file descriptor number (CLOUDABI_PROCESS_CHILD). We also return the thread ID of the new thread in the copied process, so the threading library can reinitialize itself. Obtained from: https://github.com/NuxiNL/freebsd
* Add a sysentvec for CloudABI on x86-64.ed2015-07-161-0/+230
Summary: For CloudABI we need to put two things on the stack of new processes: the argument data (a binary blob; not strings) and a startup data structure. The startup data structure contains interesting things such as a pointer to the ELF program header, the thread ID of the initial thread, a stack smashing protection canary, and a pointer to the argument data. Fetching system call arguments and setting the return value is similar to FreeBSD. The only differences are that system call 0 does not exist and that we call into cloudabi_convert_errno() to convert the error code. We also need this function in a couple of other places, so we'd better reuse it here. Reviewers: dchagin, kib Reviewed By: kib Subscribers: imp Differential Revision: https://reviews.freebsd.org/D3098
OpenPOWER on IntegriCloud