Index: head/sys/arm/cloudabi32/cloudabi32_sysvec.c =================================================================== --- head/sys/arm/cloudabi32/cloudabi32_sysvec.c (nonexistent) +++ head/sys/arm/cloudabi32/cloudabi32_sysvec.c (revision 305928) @@ -0,0 +1,193 @@ +/*- + * Copyright (c) 2015-2016 Nuxi, https://nuxi.nl/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +#include + +#include + +#include +#include + +extern const char *cloudabi32_syscallnames[]; +extern struct sysent cloudabi32_sysent[]; + +static void +cloudabi32_proc_setregs(struct thread *td, struct image_params *imgp, + unsigned long stack) +{ + struct trapframe *regs; + + exec_setregs(td, imgp, stack); + + /* + * The stack now contains a pointer to the TCB and the auxiliary + * vector. Let r0 point to the auxiliary vector, and set + * tpidrurw to the TCB. + */ + regs = td->td_frame; + regs->tf_r0 = td->td_retval[0] = + stack + roundup(sizeof(cloudabi32_tcb_t), sizeof(register_t)); + (void)cpu_set_user_tls(td, (void *)stack); +} + +static int +cloudabi32_fetch_syscall_args(struct thread *td, struct syscall_args *sa) +{ + struct trapframe *frame = td->td_frame; + int error; + + /* Obtain system call number. */ + sa->code = frame->tf_r12; + if (sa->code >= CLOUDABI32_SYS_MAXSYSCALL) + return (ENOSYS); + sa->callp = &cloudabi32_sysent[sa->code]; + sa->narg = sa->callp->sy_narg; + + /* Fetch system call arguments from registers and the stack. */ + sa->args[0] = frame->tf_r0; + sa->args[1] = frame->tf_r1; + sa->args[2] = frame->tf_r2; + sa->args[3] = frame->tf_r3; + if (sa->narg > 4) { + error = copyin((void *)td->td_frame->tf_usr_sp, &sa->args[4], + (sa->narg - 4) * sizeof(register_t)); + if (error != 0) + return (error); + } + + /* Default system call return values. */ + td->td_retval[0] = 0; + td->td_retval[1] = frame->tf_r1; + return (0); +} + +static void +cloudabi32_set_syscall_retval(struct thread *td, int error) +{ + struct trapframe *frame = td->td_frame; + + switch (error) { + case 0: + /* System call succeeded. */ + frame->tf_r0 = td->td_retval[0]; + frame->tf_r1 = td->td_retval[1]; + frame->tf_spsr &= ~PSR_C; + break; + case ERESTART: + /* Restart system call. */ + frame->tf_pc -= 4; + break; + case EJUSTRETURN: + break; + default: + /* System call returned an error. */ + frame->tf_r0 = cloudabi_convert_errno(error); + frame->tf_spsr |= PSR_C; + break; + } +} + +static void +cloudabi32_schedtail(struct thread *td) +{ + struct trapframe *frame = td->td_frame; + + /* + * Initial register values for processes returning from fork. + * Make sure that we only set these values when forking, not + * when creating a new thread. + */ + if ((td->td_pflags & TDP_FORKING) != 0) { + frame->tf_r0 = CLOUDABI_PROCESS_CHILD; + frame->tf_r1 = td->td_tid; + } +} + +int +cloudabi32_thread_setregs(struct thread *td, + const cloudabi32_threadattr_t *attr, uint32_t tcb) +{ + struct trapframe *frame; + stack_t stack; + + /* Perform standard register initialization. */ + stack.ss_sp = TO_PTR(attr->stack); + stack.ss_size = attr->stack_size; + cpu_set_upcall(td, TO_PTR(attr->entry_point), NULL, &stack); + + /* + * Pass in the thread ID of the new thread and the argument + * pointer provided by the parent thread in as arguments to the + * entry point. + */ + frame = td->td_frame; + frame->tf_r0 = td->td_tid; + frame->tf_r1 = attr->argument; + + /* Set up TLS. */ + return (cpu_set_user_tls(td, (void *)tcb)); +} + +static struct sysentvec cloudabi32_elf_sysvec = { + .sv_size = CLOUDABI32_SYS_MAXSYSCALL, + .sv_table = cloudabi32_sysent, + .sv_fixup = cloudabi32_fixup, + .sv_name = "CloudABI ELF32", + .sv_coredump = elf32_coredump, + .sv_pagesize = PAGE_SIZE, + .sv_minuser = VM_MIN_ADDRESS, + .sv_maxuser = VM_MAXUSER_ADDRESS, + .sv_stackprot = VM_PROT_READ | VM_PROT_WRITE, + .sv_copyout_strings = cloudabi32_copyout_strings, + .sv_setregs = cloudabi32_proc_setregs, + .sv_flags = SV_ABI_CLOUDABI | SV_CAPSICUM | SV_ILP32, + .sv_set_syscall_retval = cloudabi32_set_syscall_retval, + .sv_fetch_syscall_args = cloudabi32_fetch_syscall_args, + .sv_syscallnames = cloudabi32_syscallnames, + .sv_schedtail = cloudabi32_schedtail, +}; + +INIT_SYSENTVEC(elf_sysvec, &cloudabi32_elf_sysvec); + +Elf32_Brandinfo cloudabi32_brand = { + .brand = ELFOSABI_CLOUDABI, + .machine = EM_ARM, + .sysvec = &cloudabi32_elf_sysvec, + .compat_3_brand = "CloudABI", +}; Property changes on: head/sys/arm/cloudabi32/cloudabi32_sysvec.c ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/sys/conf/files.arm =================================================================== --- head/sys/conf/files.arm (revision 305927) +++ head/sys/conf/files.arm (revision 305928) @@ -1,148 +1,161 @@ # $FreeBSD$ +cloudabi32_vdso.o optional compat_cloudabi32 \ + dependency "$S/contrib/cloudabi/cloudabi_vdso_armv6.S" \ + compile-with "${CC} -x assembler-with-cpp -shared -nostdinc -nostdlib -Wl,-T$S/compat/cloudabi/cloudabi_vdso.lds $S/contrib/cloudabi/cloudabi_vdso_armv6.S -o ${.TARGET}" \ + no-obj no-implicit-rule \ + clean "cloudabi32_vdso.o" +# +cloudabi32_vdso_blob.o optional compat_cloudabi32 \ + dependency "cloudabi32_vdso.o" \ + compile-with "${OBJCOPY} --input-target binary --output-target elf32-littlearm --binary-architecture arm cloudabi32_vdso.o ${.TARGET}" \ + no-implicit-rule \ + clean "cloudabi32_vdso_blob.o" +# arm/annapurna/alpine/alpine_ccu.c optional al_ccu fdt arm/annapurna/alpine/alpine_nb_service.c optional al_nb_service fdt arm/arm/autoconf.c standard arm/arm/bcopy_page.S standard arm/arm/bcopyinout.S standard arm/arm/blockio.S standard arm/arm/bus_space_asm_generic.S standard arm/arm/bus_space_base.c optional fdt arm/arm/bus_space_generic.c standard arm/arm/busdma_machdep-v4.c optional !armv6 arm/arm/busdma_machdep-v6.c optional armv6 arm/arm/copystr.S standard arm/arm/cpufunc.c standard arm/arm/cpufunc_asm.S standard arm/arm/cpufunc_asm_arm9.S optional cpu_arm9 | cpu_arm9e arm/arm/cpufunc_asm_arm11.S optional cpu_arm1176 arm/arm/cpufunc_asm_arm11x6.S optional cpu_arm1176 arm/arm/cpufunc_asm_armv4.S optional cpu_arm9 | cpu_arm9e | cpu_fa526 | cpu_xscale_pxa2x0 | cpu_xscale_ixp425 | cpu_xscale_81342 arm/arm/cpufunc_asm_armv5_ec.S optional cpu_arm9e arm/arm/cpufunc_asm_armv6.S optional cpu_arm1176 arm/arm/cpufunc_asm_armv7.S optional cpu_cortexa | cpu_krait | cpu_mv_pj4b arm/arm/cpufunc_asm_fa526.S optional cpu_fa526 arm/arm/cpufunc_asm_pj4b.S optional cpu_mv_pj4b arm/arm/cpufunc_asm_sheeva.S optional cpu_arm9e arm/arm/cpufunc_asm_xscale.S optional cpu_xscale_pxa2x0 | cpu_xscale_ixp425 | cpu_xscale_81342 arm/arm/cpufunc_asm_xscale_c3.S optional cpu_xscale_81342 arm/arm/cpuinfo.c standard arm/arm/cpu_asm-v6.S optional armv6 arm/arm/db_disasm.c optional ddb arm/arm/db_interface.c optional ddb arm/arm/db_trace.c optional ddb arm/arm/debug_monitor.c optional ddb armv6 arm/arm/disassem.c optional ddb arm/arm/dump_machdep.c standard arm/arm/elf_machdep.c standard arm/arm/elf_note.S standard arm/arm/exception.S standard arm/arm/fiq.c standard arm/arm/fiq_subr.S standard arm/arm/fusu.S standard arm/arm/gdb_machdep.c optional gdb arm/arm/generic_timer.c optional generic_timer arm/arm/gic.c optional gic arm/arm/gic_fdt.c optional gic fdt arm/arm/hdmi_if.m optional hdmi arm/arm/identcpu.c standard arm/arm/in_cksum.c optional inet | inet6 arm/arm/in_cksum_arm.S optional inet | inet6 arm/arm/intr.c optional !intrng kern/subr_intr.c optional intrng arm/arm/locore.S standard no-obj arm/arm/machdep.c standard arm/arm/machdep_intr.c standard arm/arm/mem.c optional mem arm/arm/minidump_machdep.c optional mem arm/arm/mp_machdep.c optional smp arm/arm/mpcore_timer.c optional mpcore_timer arm/arm/nexus.c standard arm/arm/ofw_machdep.c optional fdt arm/arm/physmem.c standard arm/arm/pl190.c optional pl190 arm/arm/pl310.c optional pl310 arm/arm/platform.c optional platform arm/arm/platform_if.m optional platform arm/arm/pmap-v4.c optional !armv6 arm/arm/pmap-v6.c optional armv6 arm/arm/pmu.c optional pmu | fdt hwpmc arm/arm/sc_machdep.c optional sc arm/arm/setcpsr.S standard arm/arm/setstack.s standard arm/arm/stack_machdep.c optional ddb | stack arm/arm/stdatomic.c standard \ compile-with "${NORMAL_C:N-Wmissing-prototypes}" arm/arm/support.S standard arm/arm/swtch.S standard arm/arm/swtch-v4.S optional !armv6 arm/arm/swtch-v6.S optional armv6 arm/arm/sys_machdep.c standard arm/arm/syscall.c standard arm/arm/trap-v4.c optional !armv6 arm/arm/trap-v6.c optional armv6 arm/arm/uio_machdep.c standard arm/arm/undefined.c standard arm/arm/unwind.c optional ddb | kdtrace_hooks arm/arm/vm_machdep.c standard arm/arm/vfp.c standard +arm/cloudabi32/cloudabi32_sysvec.c optional compat_cloudabi32 board_id.h standard \ dependency "$S/arm/conf/genboardid.awk $S/arm/conf/mach-types" \ compile-with "${AWK} -f $S/arm/conf/genboardid.awk $S/arm/conf/mach-types > board_id.h" \ no-obj no-implicit-rule before-depend \ clean "board_id.h" cddl/compat/opensolaris/kern/opensolaris_atomic.c optional zfs | dtrace compile-with "${CDDL_C}" cddl/dev/dtrace/arm/dtrace_asm.S optional dtrace compile-with "${DTRACE_S}" cddl/dev/dtrace/arm/dtrace_subr.c optional dtrace compile-with "${DTRACE_C}" cddl/dev/fbt/arm/fbt_isa.c optional dtrace_fbt | dtraceall compile-with "${FBT_C}" crypto/blowfish/bf_enc.c optional crypto | ipsec crypto/des/des_enc.c optional crypto | ipsec | netsmb dev/cpufreq/cpufreq_dt.c optional cpufreq fdt dev/dwc/if_dwc.c optional dwc dev/dwc/if_dwc_if.m optional dwc dev/fb/fb.c optional sc dev/fdt/fdt_arm_platform.c optional platform fdt dev/hwpmc/hwpmc_arm.c optional hwpmc dev/hwpmc/hwpmc_armv7.c optional hwpmc armv6 dev/iicbus/twsi/twsi.c optional twsi dev/ofw/ofw_cpu.c optional fdt dev/ofw/ofwpci.c optional fdt pci dev/pci/pci_host_generic.c optional pci_host_generic pci fdt dev/psci/psci.c optional psci dev/psci/psci_arm.S optional psci dev/syscons/scgfbrndr.c optional sc dev/syscons/scterm-teken.c optional sc dev/syscons/scvtb.c optional sc dev/uart/uart_cpu_fdt.c optional uart fdt font.h optional sc \ compile-with "uudecode < /usr/share/syscons/fonts/${SC_DFLT_FONT}-8x16.fnt && file2c 'u_char dflt_font_16[16*256] = {' '};' < ${SC_DFLT_FONT}-8x16 > font.h && uudecode < /usr/share/syscons/fonts/${SC_DFLT_FONT}-8x14.fnt && file2c 'u_char dflt_font_14[14*256] = {' '};' < ${SC_DFLT_FONT}-8x14 >> font.h && uudecode < /usr/share/syscons/fonts/${SC_DFLT_FONT}-8x8.fnt && file2c 'u_char dflt_font_8[8*256] = {' '};' < ${SC_DFLT_FONT}-8x8 >> font.h" \ no-obj no-implicit-rule before-depend \ clean "font.h ${SC_DFLT_FONT}-8x14 ${SC_DFLT_FONT}-8x16 ${SC_DFLT_FONT}-8x8" kern/msi_if.m optional intrng kern/pic_if.m optional intrng kern/subr_busdma_bufalloc.c standard kern/subr_devmap.c standard kern/subr_sfbuf.c standard libkern/arm/aeabi_unwind.c standard libkern/arm/divsi3.S standard libkern/arm/ffs.S standard libkern/arm/ldivmod.S standard libkern/arm/ldivmod_helper.c standard libkern/arm/memclr.S standard libkern/arm/memcpy.S standard libkern/arm/memset.S standard libkern/arm/muldi3.c standard libkern/ashldi3.c standard libkern/ashrdi3.c standard libkern/divdi3.c standard libkern/ffsl.c standard libkern/ffsll.c standard libkern/fls.c standard libkern/flsl.c standard libkern/flsll.c standard libkern/lshrdi3.c standard libkern/moddi3.c standard libkern/qdivrem.c standard libkern/ucmpdi2.c standard libkern/udivdi3.c standard libkern/umoddi3.c standard Index: head/sys/contrib/cloudabi/cloudabi_vdso_armv6.S =================================================================== --- head/sys/contrib/cloudabi/cloudabi_vdso_armv6.S (nonexistent) +++ head/sys/contrib/cloudabi/cloudabi_vdso_armv6.S (revision 305928) @@ -0,0 +1,490 @@ +// Copyright (c) 2016 Nuxi (https://nuxi.nl/) and contributors. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// This file is automatically generated. Do not edit. +// +// Source: https://github.com/NuxiNL/cloudabi + +#define ENTRY(name) \ + .text; \ + .p2align 2; \ + .global name; \ + .type name, %function; \ +name: + +#define END(name) .size name, . - name + +ENTRY(cloudabi_sys_clock_res_get) + str r1, [sp, #-4] + mov ip, #0 + swi 0 + ldr r2, [sp, #-4] + bcs 1f + str r0, [r2, 0] + str r1, [r2, 4] + mov r0, $0 +1: + bx lr +END(cloudabi_sys_clock_res_get) + +ENTRY(cloudabi_sys_clock_time_get) + str r3, [sp, #-4] + mov ip, #1 + swi 0 + ldr r2, [sp, #-4] + bcs 1f + str r0, [r2, 0] + str r1, [r2, 4] + mov r0, $0 +1: + bx lr +END(cloudabi_sys_clock_time_get) + +ENTRY(cloudabi_sys_condvar_signal) + mov ip, #2 + swi 0 + bx lr +END(cloudabi_sys_condvar_signal) + +ENTRY(cloudabi_sys_fd_close) + mov ip, #3 + swi 0 + bx lr +END(cloudabi_sys_fd_close) + +ENTRY(cloudabi_sys_fd_create1) + str r1, [sp, #-4] + mov ip, #4 + swi 0 + ldr r2, [sp, #-4] + bcs 1f + str r0, [r2] + mov r0, $0 +1: + bx lr +END(cloudabi_sys_fd_create1) + +ENTRY(cloudabi_sys_fd_create2) + str r1, [sp, #-4] + str r2, [sp, #-8] + mov ip, #5 + swi 0 + ldr r2, [sp, #-4] + ldr r3, [sp, #-8] + bcs 1f + str r0, [r2] + str r1, [r3] + mov r0, $0 +1: + bx lr +END(cloudabi_sys_fd_create2) + +ENTRY(cloudabi_sys_fd_datasync) + mov ip, #6 + swi 0 + bx lr +END(cloudabi_sys_fd_datasync) + +ENTRY(cloudabi_sys_fd_dup) + str r1, [sp, #-4] + mov ip, #7 + swi 0 + ldr r2, [sp, #-4] + bcs 1f + str r0, [r2] + mov r0, $0 +1: + bx lr +END(cloudabi_sys_fd_dup) + +ENTRY(cloudabi_sys_fd_pread) + mov ip, #8 + swi 0 + bcs 1f + ldr r2, [sp, #8] + str r0, [r2] + mov r0, $0 +1: + bx lr +END(cloudabi_sys_fd_pread) + +ENTRY(cloudabi_sys_fd_pwrite) + mov ip, #9 + swi 0 + bcs 1f + ldr r2, [sp, #8] + str r0, [r2] + mov r0, $0 +1: + bx lr +END(cloudabi_sys_fd_pwrite) + +ENTRY(cloudabi_sys_fd_read) + str r3, [sp, #-4] + mov ip, #10 + swi 0 + ldr r2, [sp, #-4] + bcs 1f + str r0, [r2] + mov r0, $0 +1: + bx lr +END(cloudabi_sys_fd_read) + +ENTRY(cloudabi_sys_fd_replace) + mov ip, #11 + swi 0 + bx lr +END(cloudabi_sys_fd_replace) + +ENTRY(cloudabi_sys_fd_seek) + mov ip, #12 + swi 0 + bcs 1f + ldr r2, [sp, #4] + str r0, [r2, 0] + str r1, [r2, 4] + mov r0, $0 +1: + bx lr +END(cloudabi_sys_fd_seek) + +ENTRY(cloudabi_sys_fd_stat_get) + mov ip, #13 + swi 0 + bx lr +END(cloudabi_sys_fd_stat_get) + +ENTRY(cloudabi_sys_fd_stat_put) + mov ip, #14 + swi 0 + bx lr +END(cloudabi_sys_fd_stat_put) + +ENTRY(cloudabi_sys_fd_sync) + mov ip, #15 + swi 0 + bx lr +END(cloudabi_sys_fd_sync) + +ENTRY(cloudabi_sys_fd_write) + str r3, [sp, #-4] + mov ip, #16 + swi 0 + ldr r2, [sp, #-4] + bcs 1f + str r0, [r2] + mov r0, $0 +1: + bx lr +END(cloudabi_sys_fd_write) + +ENTRY(cloudabi_sys_file_advise) + mov ip, #17 + swi 0 + bx lr +END(cloudabi_sys_file_advise) + +ENTRY(cloudabi_sys_file_allocate) + mov ip, #18 + swi 0 + bx lr +END(cloudabi_sys_file_allocate) + +ENTRY(cloudabi_sys_file_create) + mov ip, #19 + swi 0 + bx lr +END(cloudabi_sys_file_create) + +ENTRY(cloudabi_sys_file_link) + mov ip, #20 + swi 0 + bx lr +END(cloudabi_sys_file_link) + +ENTRY(cloudabi_sys_file_open) + mov ip, #21 + swi 0 + bcs 1f + ldr r2, [sp, #12] + str r0, [r2] + mov r0, $0 +1: + bx lr +END(cloudabi_sys_file_open) + +ENTRY(cloudabi_sys_file_readdir) + mov ip, #22 + swi 0 + bcs 1f + ldr r2, [sp, #8] + str r0, [r2] + mov r0, $0 +1: + bx lr +END(cloudabi_sys_file_readdir) + +ENTRY(cloudabi_sys_file_readlink) + mov ip, #23 + swi 0 + bcs 1f + ldr r2, [sp, #8] + str r0, [r2] + mov r0, $0 +1: + bx lr +END(cloudabi_sys_file_readlink) + +ENTRY(cloudabi_sys_file_rename) + mov ip, #24 + swi 0 + bx lr +END(cloudabi_sys_file_rename) + +ENTRY(cloudabi_sys_file_stat_fget) + mov ip, #25 + swi 0 + bx lr +END(cloudabi_sys_file_stat_fget) + +ENTRY(cloudabi_sys_file_stat_fput) + mov ip, #26 + swi 0 + bx lr +END(cloudabi_sys_file_stat_fput) + +ENTRY(cloudabi_sys_file_stat_get) + mov ip, #27 + swi 0 + bx lr +END(cloudabi_sys_file_stat_get) + +ENTRY(cloudabi_sys_file_stat_put) + mov ip, #28 + swi 0 + bx lr +END(cloudabi_sys_file_stat_put) + +ENTRY(cloudabi_sys_file_symlink) + mov ip, #29 + swi 0 + bx lr +END(cloudabi_sys_file_symlink) + +ENTRY(cloudabi_sys_file_unlink) + mov ip, #30 + swi 0 + bx lr +END(cloudabi_sys_file_unlink) + +ENTRY(cloudabi_sys_lock_unlock) + mov ip, #31 + swi 0 + bx lr +END(cloudabi_sys_lock_unlock) + +ENTRY(cloudabi_sys_mem_advise) + mov ip, #32 + swi 0 + bx lr +END(cloudabi_sys_mem_advise) + +ENTRY(cloudabi_sys_mem_lock) + mov ip, #33 + swi 0 + bx lr +END(cloudabi_sys_mem_lock) + +ENTRY(cloudabi_sys_mem_map) + mov ip, #34 + swi 0 + bcs 1f + ldr r2, [sp, #16] + str r0, [r2] + mov r0, $0 +1: + bx lr +END(cloudabi_sys_mem_map) + +ENTRY(cloudabi_sys_mem_protect) + mov ip, #35 + swi 0 + bx lr +END(cloudabi_sys_mem_protect) + +ENTRY(cloudabi_sys_mem_sync) + mov ip, #36 + swi 0 + bx lr +END(cloudabi_sys_mem_sync) + +ENTRY(cloudabi_sys_mem_unlock) + mov ip, #37 + swi 0 + bx lr +END(cloudabi_sys_mem_unlock) + +ENTRY(cloudabi_sys_mem_unmap) + mov ip, #38 + swi 0 + bx lr +END(cloudabi_sys_mem_unmap) + +ENTRY(cloudabi_sys_poll) + str r3, [sp, #-4] + mov ip, #39 + swi 0 + ldr r2, [sp, #-4] + bcs 1f + str r0, [r2] + mov r0, $0 +1: + bx lr +END(cloudabi_sys_poll) + +ENTRY(cloudabi_sys_poll_fd) + mov ip, #40 + swi 0 + bcs 1f + ldr r2, [sp, #12] + str r0, [r2] + mov r0, $0 +1: + bx lr +END(cloudabi_sys_poll_fd) + +ENTRY(cloudabi_sys_proc_exec) + mov ip, #41 + swi 0 + bx lr +END(cloudabi_sys_proc_exec) + +ENTRY(cloudabi_sys_proc_exit) + mov ip, #42 + swi 0 +END(cloudabi_sys_proc_exit) + +ENTRY(cloudabi_sys_proc_fork) + str r0, [sp, #-4] + str r1, [sp, #-8] + mov ip, #43 + swi 0 + ldr r2, [sp, #-4] + ldr r3, [sp, #-8] + bcs 1f + str r0, [r2] + str r1, [r3] + mov r0, $0 +1: + bx lr +END(cloudabi_sys_proc_fork) + +ENTRY(cloudabi_sys_proc_raise) + mov ip, #44 + swi 0 + bx lr +END(cloudabi_sys_proc_raise) + +ENTRY(cloudabi_sys_random_get) + mov ip, #45 + swi 0 + bx lr +END(cloudabi_sys_random_get) + +ENTRY(cloudabi_sys_sock_accept) + str r2, [sp, #-4] + mov ip, #46 + swi 0 + ldr r2, [sp, #-4] + bcs 1f + str r0, [r2] + mov r0, $0 +1: + bx lr +END(cloudabi_sys_sock_accept) + +ENTRY(cloudabi_sys_sock_bind) + mov ip, #47 + swi 0 + bx lr +END(cloudabi_sys_sock_bind) + +ENTRY(cloudabi_sys_sock_connect) + mov ip, #48 + swi 0 + bx lr +END(cloudabi_sys_sock_connect) + +ENTRY(cloudabi_sys_sock_listen) + mov ip, #49 + swi 0 + bx lr +END(cloudabi_sys_sock_listen) + +ENTRY(cloudabi_sys_sock_recv) + mov ip, #50 + swi 0 + bx lr +END(cloudabi_sys_sock_recv) + +ENTRY(cloudabi_sys_sock_send) + mov ip, #51 + swi 0 + bx lr +END(cloudabi_sys_sock_send) + +ENTRY(cloudabi_sys_sock_shutdown) + mov ip, #52 + swi 0 + bx lr +END(cloudabi_sys_sock_shutdown) + +ENTRY(cloudabi_sys_sock_stat_get) + mov ip, #53 + swi 0 + bx lr +END(cloudabi_sys_sock_stat_get) + +ENTRY(cloudabi_sys_thread_create) + str r1, [sp, #-4] + mov ip, #54 + swi 0 + ldr r2, [sp, #-4] + bcs 1f + str r0, [r2] + mov r0, $0 +1: + bx lr +END(cloudabi_sys_thread_create) + +ENTRY(cloudabi_sys_thread_exit) + mov ip, #55 + swi 0 +END(cloudabi_sys_thread_exit) + +ENTRY(cloudabi_sys_thread_yield) + mov ip, #56 + swi 0 + bx lr +END(cloudabi_sys_thread_yield) Property changes on: head/sys/contrib/cloudabi/cloudabi_vdso_armv6.S ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property