Assimilate ia64 back into the fold with the common freebsd32/ia32 code.

The split-up code is derived from the ia64 code originally.

Note that I have only compile-tested this, not actually run-tested it.
The ia64 side of the force is missing some significant chunks of signal
delivery code.
This commit is contained in:
Peter Wemm 2003-12-11 01:05:09 +00:00
parent 7f3a56a41a
commit 64d85faa1c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=123423
15 changed files with 98 additions and 3765 deletions

View File

@ -68,9 +68,15 @@ __FBSDID("$FreeBSD$");
#include <compat/freebsd32/freebsd32_proto.h>
#include <compat/freebsd32/freebsd32_syscall.h>
#include <compat/ia32/ia32_signal.h>
#ifdef __amd64__
#include <machine/psl.h>
#include <machine/segments.h>
#include <machine/specialreg.h>
#else
#include <i386/include/psl.h>
#include <i386/include/segments.h>
#include <i386/include/specialreg.h>
#endif
#include <machine/frame.h>
#include <machine/md_var.h>
#include <machine/pcb.h>
@ -111,7 +117,7 @@ struct sysentvec ia32_freebsd_sysvec = {
elf32_coredump,
NULL,
MINSIGSTKSZ,
PAGE_SIZE,
IA32_PAGE_SIZE,
0,
FREEBSD32_USRSTACK,
FREEBSD32_USRSTACK,

View File

@ -37,8 +37,13 @@
#include <sys/sysent.h>
#include <sys/cdefs.h>
#define FREEBSD32_USRSTACK ((1ul << 32) - PAGE_SIZE)
#ifdef __ia64__
#define FREEBSD32_USRSTACK ((1ul << 32) - IA32_PAGE_SIZE * 2)
#else
#define FREEBSD32_USRSTACK ((1ul << 32) - IA32_PAGE_SIZE)
#endif
#define IA32_PAGE_SIZE 4096
#define IA32_MAXDSIZ (512*1024*1024) /* 512MB */
#define IA32_MAXSSIZ (64*1024*1024) /* 64MB */
#define IA32_MAXVMEM 0 /* Unlimited */

View File

@ -28,6 +28,10 @@ ukbdmap.h optional ukbd_dflt_keymap \
no-obj no-implicit-rule before-depend \
clean "ukbdmap.h"
#
compat/freebsd32/freebsd32_misc.c optional ia32
compat/freebsd32/freebsd32_syscalls.c optional ia32
compat/freebsd32/freebsd32_sysent.c optional ia32
compat/ia32/ia32_sysvec.c optional ia32
contrib/ia64/libuwx/src/uwx_bstream.c standard
contrib/ia64/libuwx/src/uwx_context.c standard
contrib/ia64/libuwx/src/uwx_env.c standard
@ -83,9 +87,8 @@ ia64/acpica/madt.c optional acpi
ia64/disasm/disasm_decode.c standard
ia64/disasm/disasm_extract.c standard
ia64/disasm/disasm_format.c standard
ia64/ia32/ia32_misc.c optional ia32
ia64/ia32/ia32_sysent.c optional ia32
ia64/ia32/ia32_sysvec.c optional ia32
ia64/ia32/ia32_signal.c optional ia32
ia64/ia32/ia32_sigtramp.c optional ia32
ia64/ia64/autoconf.c standard
ia64/ia64/busdma_machdep.c standard
ia64/ia64/clock.c standard

View File

@ -1,15 +0,0 @@
# Makefile for syscall tables
#
# $FreeBSD$
all:
@echo "make sysent only"
sysent: ia32_sysent.c ia32_syscall.h ia32_proto.h
ia32_sysent.c ia32_syscall.h ia32_proto.h: ../../kern/makesyscalls.sh \
syscalls.master syscalls.conf
-mv -f ia32_sysent.c ia32_sysent.c.bak
-mv -f ia32_syscall.h ia32_syscall.h.bak
-mv -f ia32_proto.h ia32_proto.h.bak
sh ../../kern/makesyscalls.sh syscalls.master syscalls.conf

View File

@ -1,103 +0,0 @@
/*-
* Copyright (c) 2001 Doug Rabson
* All rights reserved.
*
* 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.
*
* $FreeBSD$
*/
#ifndef _IA64_IA32_IA32_H_
#define _IA64_IA32_IA32_H_
#define PTRIN(v) (void *)(uintptr_t) (v)
#define PTROUT(v) (u_int32_t)(uintptr_t) (v)
#define CP(src,dst,fld) do { (dst).fld = (src).fld; } while (0)
#define PTRIN_CP(src,dst,fld) \
do { (dst).fld = PTRIN((src).fld); } while (0)
#define PTROUT_CP(src,dst,fld) \
do { (dst).fld = PTROUT((src).fld); } while (0)
struct timeval32 {
int32_t tv_sec;
int32_t tv_usec;
};
#define TV_CP(src,dst,fld) do { \
CP((src).fld,(dst).fld,tv_sec); \
CP((src).fld,(dst).fld,tv_usec); \
} while (0);
struct timespec32 {
u_int32_t tv_sec;
u_int32_t tv_nsec;
};
#define TS_CP(src,dst,fld) do { \
CP((src).fld,(dst).fld,tv_sec); \
CP((src).fld,(dst).fld,tv_nsec); \
} while (0);
struct rusage32 {
struct timeval32 ru_utime;
struct timeval32 ru_stime;
int32_t ru_maxrss;
int32_t ru_ixrss;
int32_t ru_idrss;
int32_t ru_isrss;
int32_t ru_minflt;
int32_t ru_majflt;
int32_t ru_nswap;
int32_t ru_inblock;
int32_t ru_oublock;
int32_t ru_msgsnd;
int32_t ru_msgrcv;
int32_t ru_nsignals;
int32_t ru_nvcsw;
int32_t ru_nivcsw;
};
struct statfs32 {
int32_t f_spare2;
int32_t f_bsize;
int32_t f_iosize;
int32_t f_blocks;
int32_t f_bfree;
int32_t f_bavail;
int32_t f_files;
int32_t f_ffree;
fsid_t f_fsid;
uid_t f_owner;
int32_t f_type;
int32_t f_flags;
int32_t f_syncwrites;
int32_t f_asyncwrites;
char f_fstypename[MFSNAMELEN];
char f_mntonname[MNAMELEN];
int32_t f_syncreads;
int32_t f_asyncreads;
int16_t f_spares1;
char f_mntfromname[MNAMELEN];
int16_t f_spares2;
int32_t f_spare[2];
};
#endif /* !_IA64_IA32_IA32_H_ */

File diff suppressed because it is too large Load Diff

View File

@ -1,279 +0,0 @@
/*
* System call prototypes.
*
* DO NOT EDIT-- this file is automatically generated.
* $FreeBSD$
* created from FreeBSD: src/sys/ia64/ia32/syscalls.master,v 1.23 2003/11/07 20:27:16 jhb Exp
*/
#ifndef _IA32_SYSPROTO_H_
#define _IA32_SYSPROTO_H_
#include <sys/signal.h>
#include <sys/acl.h>
#include <sys/thr.h>
#include <sys/umtx.h>
#include <posix4/_semaphore.h>
#include <sys/ucontext.h>
struct proc;
struct thread;
#define PAD_(t) (sizeof(register_t) <= sizeof(t) ? \
0 : sizeof(register_t) - sizeof(t))
#if BYTE_ORDER == LITTLE_ENDIAN
#define PADL_(t) 0
#define PADR_(t) PAD_(t)
#else
#define PADL_(t) PAD_(t)
#define PADR_(t) 0
#endif
struct ia32_open_args {
char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)];
char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)];
char mode_l_[PADL_(int)]; int mode; char mode_r_[PADR_(int)];
};
struct ia32_wait4_args {
char pid_l_[PADL_(int)]; int pid; char pid_r_[PADR_(int)];
char status_l_[PADL_(int *)]; int * status; char status_r_[PADR_(int *)];
char options_l_[PADL_(int)]; int options; char options_r_[PADR_(int)];
char rusage_l_[PADL_(struct rusage32 *)]; struct rusage32 * rusage; char rusage_r_[PADR_(struct rusage32 *)];
};
struct ia32_getfsstat_args {
char buf_l_[PADL_(struct statfs32 *)]; struct statfs32 * buf; char buf_r_[PADR_(struct statfs32 *)];
char bufsize_l_[PADL_(long)]; long bufsize; char bufsize_r_[PADR_(long)];
char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)];
};
struct ia32_access_args {
char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)];
char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)];
};
struct ia32_chflags_args {
char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)];
char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)];
};
struct ia32_sigaltstack_args {
char ss_l_[PADL_(struct sigaltstack32 *)]; struct sigaltstack32 * ss; char ss_r_[PADR_(struct sigaltstack32 *)];
char oss_l_[PADL_(struct sigaltstack32 *)]; struct sigaltstack32 * oss; char oss_r_[PADR_(struct sigaltstack32 *)];
};
struct ia32_execve_args {
char fname_l_[PADL_(char *)]; char * fname; char fname_r_[PADR_(char *)];
char argv_l_[PADL_(u_int32_t *)]; u_int32_t * argv; char argv_r_[PADR_(u_int32_t *)];
char envv_l_[PADL_(u_int32_t *)]; u_int32_t * envv; char envv_r_[PADR_(u_int32_t *)];
};
struct ia32_setitimer_args {
char which_l_[PADL_(u_int)]; u_int which; char which_r_[PADR_(u_int)];
char itv_l_[PADL_(struct itimerval32 *)]; struct itimerval32 * itv; char itv_r_[PADR_(struct itimerval32 *)];
char oitv_l_[PADL_(struct itimerval32 *)]; struct itimerval32 * oitv; char oitv_r_[PADR_(struct itimerval32 *)];
};
struct ia32_select_args {
char nd_l_[PADL_(int)]; int nd; char nd_r_[PADR_(int)];
char in_l_[PADL_(fd_set *)]; fd_set * in; char in_r_[PADR_(fd_set *)];
char ou_l_[PADL_(fd_set *)]; fd_set * ou; char ou_r_[PADR_(fd_set *)];
char ex_l_[PADL_(fd_set *)]; fd_set * ex; char ex_r_[PADR_(fd_set *)];
char tv_l_[PADL_(struct timeval32 *)]; struct timeval32 * tv; char tv_r_[PADR_(struct timeval32 *)];
};
struct ia32_gettimeofday_args {
char tp_l_[PADL_(struct timeval32 *)]; struct timeval32 * tp; char tp_r_[PADR_(struct timeval32 *)];
char tzp_l_[PADL_(struct timezone *)]; struct timezone * tzp; char tzp_r_[PADR_(struct timezone *)];
};
struct ia32_getrusage_args {
char who_l_[PADL_(int)]; int who; char who_r_[PADR_(int)];
char rusage_l_[PADL_(struct rusage32 *)]; struct rusage32 * rusage; char rusage_r_[PADR_(struct rusage32 *)];
};
struct ia32_readv_args {
char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
char iovp_l_[PADL_(struct iovec32 *)]; struct iovec32 * iovp; char iovp_r_[PADR_(struct iovec32 *)];
char iovcnt_l_[PADL_(u_int)]; u_int iovcnt; char iovcnt_r_[PADR_(u_int)];
};
struct ia32_writev_args {
char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
char iovp_l_[PADL_(struct iovec32 *)]; struct iovec32 * iovp; char iovp_r_[PADR_(struct iovec32 *)];
char iovcnt_l_[PADL_(u_int)]; u_int iovcnt; char iovcnt_r_[PADR_(u_int)];
};
struct ia32_settimeofday_args {
char tv_l_[PADL_(struct timeval32 *)]; struct timeval32 * tv; char tv_r_[PADR_(struct timeval32 *)];
char tzp_l_[PADL_(struct timezone *)]; struct timezone * tzp; char tzp_r_[PADR_(struct timezone *)];
};
struct ia32_utimes_args {
char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)];
char tptr_l_[PADL_(struct timeval32 *)]; struct timeval32 * tptr; char tptr_r_[PADR_(struct timeval32 *)];
};
struct ia32_adjtime_args {
char delta_l_[PADL_(struct timeval32 *)]; struct timeval32 * delta; char delta_r_[PADR_(struct timeval32 *)];
char olddelta_l_[PADL_(struct timeval32 *)]; struct timeval32 * olddelta; char olddelta_r_[PADR_(struct timeval32 *)];
};
struct ia32_statfs_args {
char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)];
char buf_l_[PADL_(struct statfs32 *)]; struct statfs32 * buf; char buf_r_[PADR_(struct statfs32 *)];
};
struct ia32_fstatfs_args {
char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
char buf_l_[PADL_(struct statfs32 *)]; struct statfs32 * buf; char buf_r_[PADR_(struct statfs32 *)];
};
struct ia32_semsys_args {
char which_l_[PADL_(int)]; int which; char which_r_[PADR_(int)];
char a2_l_[PADL_(int)]; int a2; char a2_r_[PADR_(int)];
char a3_l_[PADL_(int)]; int a3; char a3_r_[PADR_(int)];
char a4_l_[PADL_(int)]; int a4; char a4_r_[PADR_(int)];
char a5_l_[PADL_(int)]; int a5; char a5_r_[PADR_(int)];
};
struct ia32_msgsys_args {
char which_l_[PADL_(int)]; int which; char which_r_[PADR_(int)];
char a2_l_[PADL_(int)]; int a2; char a2_r_[PADR_(int)];
char a3_l_[PADL_(int)]; int a3; char a3_r_[PADR_(int)];
char a4_l_[PADL_(int)]; int a4; char a4_r_[PADR_(int)];
char a5_l_[PADL_(int)]; int a5; char a5_r_[PADR_(int)];
char a6_l_[PADL_(int)]; int a6; char a6_r_[PADR_(int)];
};
struct ia32_shmsys_args {
char which_l_[PADL_(int)]; int which; char which_r_[PADR_(int)];
char a2_l_[PADL_(int)]; int a2; char a2_r_[PADR_(int)];
char a3_l_[PADL_(int)]; int a3; char a3_r_[PADR_(int)];
char a4_l_[PADL_(int)]; int a4; char a4_r_[PADR_(int)];
};
struct ia32_pread_args {
char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
char buf_l_[PADL_(void *)]; void * buf; char buf_r_[PADR_(void *)];
char nbyte_l_[PADL_(size_t)]; size_t nbyte; char nbyte_r_[PADR_(size_t)];
char pad_l_[PADL_(int)]; int pad; char pad_r_[PADR_(int)];
char offsetlo_l_[PADL_(u_int32_t)]; u_int32_t offsetlo; char offsetlo_r_[PADR_(u_int32_t)];
char offsethi_l_[PADL_(u_int32_t)]; u_int32_t offsethi; char offsethi_r_[PADR_(u_int32_t)];
};
struct ia32_pwrite_args {
char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
char buf_l_[PADL_(const void *)]; const void * buf; char buf_r_[PADR_(const void *)];
char nbyte_l_[PADL_(size_t)]; size_t nbyte; char nbyte_r_[PADR_(size_t)];
char pad_l_[PADL_(int)]; int pad; char pad_r_[PADR_(int)];
char offsetlo_l_[PADL_(u_int32_t)]; u_int32_t offsetlo; char offsetlo_r_[PADR_(u_int32_t)];
char offsethi_l_[PADL_(u_int32_t)]; u_int32_t offsethi; char offsethi_r_[PADR_(u_int32_t)];
};
struct ia32_stat_args {
char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)];
char ub_l_[PADL_(struct stat32 *)]; struct stat32 * ub; char ub_r_[PADR_(struct stat32 *)];
};
struct ia32_fstat_args {
char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
char ub_l_[PADL_(struct stat32 *)]; struct stat32 * ub; char ub_r_[PADR_(struct stat32 *)];
};
struct ia32_lstat_args {
char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)];
char ub_l_[PADL_(struct stat32 *)]; struct stat32 * ub; char ub_r_[PADR_(struct stat32 *)];
};
struct ia32_mmap_args {
char addr_l_[PADL_(caddr_t)]; caddr_t addr; char addr_r_[PADR_(caddr_t)];
char len_l_[PADL_(size_t)]; size_t len; char len_r_[PADR_(size_t)];
char prot_l_[PADL_(int)]; int prot; char prot_r_[PADR_(int)];
char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)];
char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
char pad_l_[PADL_(int)]; int pad; char pad_r_[PADR_(int)];
char poslo_l_[PADL_(u_int32_t)]; u_int32_t poslo; char poslo_r_[PADR_(u_int32_t)];
char poshi_l_[PADL_(u_int32_t)]; u_int32_t poshi; char poshi_r_[PADR_(u_int32_t)];
};
struct ia32_lseek_args {
char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
char pad_l_[PADL_(int)]; int pad; char pad_r_[PADR_(int)];
char offsetlo_l_[PADL_(u_int32_t)]; u_int32_t offsetlo; char offsetlo_r_[PADR_(u_int32_t)];
char offsethi_l_[PADL_(u_int32_t)]; u_int32_t offsethi; char offsethi_r_[PADR_(u_int32_t)];
char whence_l_[PADL_(int)]; int whence; char whence_r_[PADR_(int)];
};
struct ia32_truncate_args {
char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)];
char pad_l_[PADL_(int)]; int pad; char pad_r_[PADR_(int)];
char lengthlo_l_[PADL_(u_int32_t)]; u_int32_t lengthlo; char lengthlo_r_[PADR_(u_int32_t)];
char lengthhi_l_[PADL_(u_int32_t)]; u_int32_t lengthhi; char lengthhi_r_[PADR_(u_int32_t)];
};
struct ia32_ftruncate_args {
char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
char pad_l_[PADL_(int)]; int pad; char pad_r_[PADR_(int)];
char lengthlo_l_[PADL_(u_int32_t)]; u_int32_t lengthlo; char lengthlo_r_[PADR_(u_int32_t)];
char lengthhi_l_[PADL_(u_int32_t)]; u_int32_t lengthhi; char lengthhi_r_[PADR_(u_int32_t)];
};
struct ia32_sysctl_args {
char name_l_[PADL_(int *)]; int * name; char name_r_[PADR_(int *)];
char namelen_l_[PADL_(u_int)]; u_int namelen; char namelen_r_[PADR_(u_int)];
char old_l_[PADL_(void *)]; void * old; char old_r_[PADR_(void *)];
char oldlenp_l_[PADL_(u_int32_t *)]; u_int32_t * oldlenp; char oldlenp_r_[PADR_(u_int32_t *)];
char new_l_[PADL_(void *)]; void * new; char new_r_[PADR_(void *)];
char newlen_l_[PADL_(u_int32_t)]; u_int32_t newlen; char newlen_r_[PADR_(u_int32_t)];
};
struct ia32_sigaction_args {
char sig_l_[PADL_(int)]; int sig; char sig_r_[PADR_(int)];
char act_l_[PADL_(struct sigaction32 *)]; struct sigaction32 * act; char act_r_[PADR_(struct sigaction32 *)];
char oact_l_[PADL_(struct sigaction32 *)]; struct sigaction32 * oact; char oact_r_[PADR_(struct sigaction32 *)];
};
struct ia32_sendfile_args {
char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
char s_l_[PADL_(int)]; int s; char s_r_[PADR_(int)];
char offsetlo_l_[PADL_(u_int32_t)]; u_int32_t offsetlo; char offsetlo_r_[PADR_(u_int32_t)];
char offsethi_l_[PADL_(u_int32_t)]; u_int32_t offsethi; char offsethi_r_[PADR_(u_int32_t)];
char nbytes_l_[PADL_(size_t)]; size_t nbytes; char nbytes_r_[PADR_(size_t)];
char hdtr_l_[PADL_(struct sf_hdtr *)]; struct sf_hdtr * hdtr; char hdtr_r_[PADR_(struct sf_hdtr *)];
char sbytes_l_[PADL_(off_t *)]; off_t * sbytes; char sbytes_r_[PADR_(off_t *)];
char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)];
};
int ia32_open(struct thread *, struct ia32_open_args *);
int ia32_wait4(struct thread *, struct ia32_wait4_args *);
int ia32_getfsstat(struct thread *, struct ia32_getfsstat_args *);
int ia32_access(struct thread *, struct ia32_access_args *);
int ia32_chflags(struct thread *, struct ia32_chflags_args *);
int ia32_sigaltstack(struct thread *, struct ia32_sigaltstack_args *);
int ia32_execve(struct thread *, struct ia32_execve_args *);
int ia32_setitimer(struct thread *, struct ia32_setitimer_args *);
int ia32_select(struct thread *, struct ia32_select_args *);
int ia32_gettimeofday(struct thread *, struct ia32_gettimeofday_args *);
int ia32_getrusage(struct thread *, struct ia32_getrusage_args *);
int ia32_readv(struct thread *, struct ia32_readv_args *);
int ia32_writev(struct thread *, struct ia32_writev_args *);
int ia32_settimeofday(struct thread *, struct ia32_settimeofday_args *);
int ia32_utimes(struct thread *, struct ia32_utimes_args *);
int ia32_adjtime(struct thread *, struct ia32_adjtime_args *);
int ia32_statfs(struct thread *, struct ia32_statfs_args *);
int ia32_fstatfs(struct thread *, struct ia32_fstatfs_args *);
int ia32_semsys(struct thread *, struct ia32_semsys_args *);
int ia32_msgsys(struct thread *, struct ia32_msgsys_args *);
int ia32_shmsys(struct thread *, struct ia32_shmsys_args *);
int ia32_pread(struct thread *, struct ia32_pread_args *);
int ia32_pwrite(struct thread *, struct ia32_pwrite_args *);
int ia32_stat(struct thread *, struct ia32_stat_args *);
int ia32_fstat(struct thread *, struct ia32_fstat_args *);
int ia32_lstat(struct thread *, struct ia32_lstat_args *);
int ia32_mmap(struct thread *, struct ia32_mmap_args *);
int ia32_lseek(struct thread *, struct ia32_lseek_args *);
int ia32_truncate(struct thread *, struct ia32_truncate_args *);
int ia32_ftruncate(struct thread *, struct ia32_ftruncate_args *);
int ia32_sysctl(struct thread *, struct ia32_sysctl_args *);
int ia32_sigaction(struct thread *, struct ia32_sigaction_args *);
int ia32_sendfile(struct thread *, struct ia32_sendfile_args *);
#ifdef COMPAT_43
#endif /* COMPAT_43 */
#ifdef COMPAT_FREEBSD4
struct freebsd4_ia32_sendfile_args {
char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
char s_l_[PADL_(int)]; int s; char s_r_[PADR_(int)];
char offsetlo_l_[PADL_(u_int32_t)]; u_int32_t offsetlo; char offsetlo_r_[PADR_(u_int32_t)];
char offsethi_l_[PADL_(u_int32_t)]; u_int32_t offsethi; char offsethi_r_[PADR_(u_int32_t)];
char nbytes_l_[PADL_(size_t)]; size_t nbytes; char nbytes_r_[PADR_(size_t)];
char hdtr_l_[PADL_(struct sf_hdtr *)]; struct sf_hdtr * hdtr; char hdtr_r_[PADR_(struct sf_hdtr *)];
char sbytes_l_[PADL_(off_t *)]; off_t * sbytes; char sbytes_r_[PADR_(off_t *)];
char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)];
};
int freebsd4_ia32_sendfile(struct thread *, struct freebsd4_ia32_sendfile_args *);
#endif /* COMPAT_FREEBSD4 */
#undef PAD_
#undef PADL_
#undef PADR_
#endif /* !_IA32_SYSPROTO_H_ */

View File

@ -51,6 +51,7 @@
#include <sys/sysent.h>
#include <sys/vnode.h>
#include <sys/imgact_elf.h>
#include <sys/sysproto.h>
#include <machine/frame.h>
#include <machine/md_var.h>
@ -64,181 +65,41 @@
#include <vm/vm_object.h>
#include <vm/vm_extern.h>
#include <ia64/ia32/ia32_util.h>
#include <compat/freebsd32/freebsd32_util.h>
#include <compat/freebsd32/freebsd32_proto.h>
#include <compat/ia32/ia32_signal.h>
#include <i386/include/psl.h>
#include <i386/include/segments.h>
#include <i386/include/specialreg.h>
static register_t *ia32_copyout_strings(struct image_params *imgp);
static void ia32_setregs(struct thread *td, u_long entry, u_long stack,
u_long ps_strings);
extern struct sysent ia32_sysent[];
static char ia32_sigcode[] = {
0xff, 0x54, 0x24, 0x10, /* call *SIGF_HANDLER(%esp) */
0x8d, 0x44, 0x24, 0x14, /* lea SIGF_UC(%esp),%eax */
0x50, /* pushl %eax */
0xf7, 0x40, 0x54, 0x00, 0x00, 0x02, 0x02, /* testl $PSL_VM,UC_EFLAGS(%eax) */
0x75, 0x03, /* jne 9f */
0x8e, 0x68, 0x14, /* movl UC_GS(%eax),%gs */
0xb8, 0x57, 0x01, 0x00, 0x00, /* 9: movl $SYS_sigreturn,%eax */
0x50, /* pushl %eax */
0xcd, 0x80, /* int $0x80 */
0xeb, 0xfe, /* 0: jmp 0b */
0
};
static int ia32_szsigcode = sizeof(ia32_sigcode);
struct sysentvec ia32_freebsd_sysvec = {
SYS_MAXSYSCALL,
ia32_sysent,
0,
0,
NULL,
0,
NULL,
NULL,
elf32_freebsd_fixup,
sendsig,
ia32_sigcode,
&ia32_szsigcode,
NULL,
"FreeBSD ELF",
elf32_coredump,
NULL,
IA32_MINSIGSTKSZ,
IA32_PAGE_SIZE,
0,
IA32_USRSTACK,
IA32_USRSTACK,
IA32_PS_STRINGS,
VM_PROT_ALL,
ia32_copyout_strings,
ia32_setregs,
NULL
};
static Elf32_Brandinfo ia32_brand_info = {
ELFOSABI_FREEBSD,
EM_386,
"FreeBSD",
"/compat/ia32",
"/lib/ld-elf.so.1",
&ia32_freebsd_sysvec
};
SYSINIT(ia32, SI_SUB_EXEC, SI_ORDER_ANY,
(sysinit_cfunc_t) elf32_insert_brand_entry,
&ia32_brand_info);
static register_t *
ia32_copyout_strings(struct image_params *imgp)
/*
* Signal sending has not been implemented on ia64. This causes
* the sigtramp code to not understand the arguments and the application
* will generally crash if it tries to handle a signal. Calling
* sendsig() means that at least untrapped signals will work.
*/
void
ia32_sendsig(sig_t catcher, int sig, sigset_t *mask, u_long code)
{
int argc, envc;
u_int32_t *vectp;
char *stringp, *destp;
u_int32_t *stack_base;
struct ia32_ps_strings *arginfo;
int szsigcode;
/*
* Calculate string base and vector table pointers.
* Also deal with signal trampoline code for this exec type.
*/
arginfo = (struct ia32_ps_strings *)IA32_PS_STRINGS;
szsigcode = *(imgp->proc->p_sysent->sv_szsigcode);
destp = (caddr_t)arginfo - szsigcode - IA32_USRSPACE -
roundup((ARG_MAX - imgp->stringspace), sizeof(char *));
/*
* install sigcode
*/
if (szsigcode)
copyout(imgp->proc->p_sysent->sv_sigcode,
((caddr_t)arginfo - szsigcode), szsigcode);
/*
* If we have a valid auxargs ptr, prepare some room
* on the stack.
*/
if (imgp->auxargs) {
/*
* 'AT_COUNT*2' is size for the ELF Auxargs data. This is for
* lower compatibility.
*/
imgp->auxarg_size = (imgp->auxarg_size) ? imgp->auxarg_size
: (AT_COUNT * 2);
/*
* The '+ 2' is for the null pointers at the end of each of
* the arg and env vector sets,and imgp->auxarg_size is room
* for argument of Runtime loader.
*/
vectp = (u_int32_t *) (destp - (imgp->argc + imgp->envc + 2 +
imgp->auxarg_size) * sizeof(u_int32_t));
} else
/*
* The '+ 2' is for the null pointers at the end of each of
* the arg and env vector sets
*/
vectp = (u_int32_t *)
(destp - (imgp->argc + imgp->envc + 2) * sizeof(u_int32_t));
/*
* vectp also becomes our initial stack base
*/
vectp = (void*)((uintptr_t)vectp & ~15);
stack_base = vectp;
stringp = imgp->stringbase;
argc = imgp->argc;
envc = imgp->envc;
/*
* Copy out strings - arguments and environment.
*/
copyout(stringp, destp, ARG_MAX - imgp->stringspace);
/*
* Fill in "ps_strings" struct for ps, w, etc.
*/
suword32(&arginfo->ps_argvstr, (u_int32_t)(intptr_t)vectp);
suword32(&arginfo->ps_nargvstr, argc);
/*
* Fill in argument portion of vector table.
*/
for (; argc > 0; --argc) {
suword32(vectp++, (u_int32_t)(intptr_t)destp);
while (*stringp++ != 0)
destp++;
destp++;
}
/* a null vector table pointer separates the argp's from the envp's */
suword32(vectp++, 0);
suword32(&arginfo->ps_envstr, (u_int32_t)(intptr_t)vectp);
suword32(&arginfo->ps_nenvstr, envc);
/*
* Fill in environment portion of vector table.
*/
for (; envc > 0; --envc) {
suword32(vectp++, (u_int32_t)(intptr_t)destp);
while (*stringp++ != 0)
destp++;
destp++;
}
/* end of vector table is a null pointer */
suword32(vectp, 0);
return ((register_t *)stack_base);
sendsig(catcher, sig, mask, code);
}
static void
#ifdef COMPAT_FREEBSD4
int
freebsd4_freebsd32_sigreturn(struct thread *td, struct freebsd4_freebsd32_sigreturn_args *uap)
{
return (sigreturn(td, (struct sigreturn_args *)uap));
}
#endif
int
freebsd32_sigreturn(struct thread *td, struct freebsd32_sigreturn_args *uap)
{
return (sigreturn(td, (struct sigreturn_args *)uap));
}
void
ia32_setregs(struct thread *td, u_long entry, u_long stack, u_long ps_strings)
{
struct trapframe *tf = td->td_frame;
@ -261,8 +122,8 @@ ia32_setregs(struct thread *td, u_long entry, u_long stack, u_long ps_strings)
tf->tf_special.sp = stack;
/* Point the RSE backstore to something harmless. */
tf->tf_special.bspstore = (IA32_PS_STRINGS - ia32_szsigcode -
IA32_USRSPACE + 15) & ~15;
tf->tf_special.bspstore = (FREEBSD32_PS_STRINGS - sz_ia32_sigcode -
SPARE_USRSPACE + 15) & ~15;
codesel = LSEL(LUCODE_SEL, SEL_UPL);
datasel = LSEL(LUDATA_SEL, SEL_UPL);
@ -276,7 +137,7 @@ ia32_setregs(struct thread *td, u_long entry, u_long stack, u_long ps_strings)
/*
* Build the GDT and LDT.
*/
gdt = IA32_USRSTACK;
gdt = FREEBSD32_USRSTACK;
vm_map_find(&vmspace->vm_map, 0, 0, &gdt, IA32_PAGE_SIZE << 1, 0,
VM_PROT_ALL, VM_PROT_ALL, 0);
ldt = gdt + IA32_PAGE_SIZE;
@ -292,12 +153,12 @@ ia32_setregs(struct thread *td, u_long entry, u_long stack, u_long ps_strings)
desc.sd_hibase = ldt >> 24;
copyout(&desc, (caddr_t) gdt + 8*GLDT_SEL, sizeof(desc));
desc.sd_lolimit = ((IA32_USRSTACK >> 12) - 1) & 0xffff;
desc.sd_lolimit = ((FREEBSD32_USRSTACK >> 12) - 1) & 0xffff;
desc.sd_lobase = 0;
desc.sd_type = SDT_MEMERA;
desc.sd_dpl = SEL_UPL;
desc.sd_p = 1;
desc.sd_hilimit = ((IA32_USRSTACK >> 12) - 1) >> 16;
desc.sd_hilimit = ((FREEBSD32_USRSTACK >> 12) - 1) >> 16;
desc.sd_def32 = 1;
desc.sd_gran = 1;
desc.sd_hibase = 0;
@ -306,14 +167,14 @@ ia32_setregs(struct thread *td, u_long entry, u_long stack, u_long ps_strings)
copyout(&desc, (caddr_t) ldt + 8*LUDATA_SEL, sizeof(desc));
codeseg = 0 /* base */
+ (((IA32_USRSTACK >> 12) - 1) << 32) /* limit */
+ (((FREEBSD32_USRSTACK >> 12) - 1) << 32) /* limit */
+ ((long)SDT_MEMERA << 52)
+ ((long)SEL_UPL << 57)
+ (1L << 59) /* present */
+ (1L << 62) /* 32 bits */
+ (1L << 63); /* page granularity */
dataseg = 0 /* base */
+ (((IA32_USRSTACK >> 12) - 1) << 32) /* limit */
+ (((FREEBSD32_USRSTACK >> 12) - 1) << 32) /* limit */
+ ((long)SDT_MEMRWA << 52)
+ ((long)SEL_UPL << 57)
+ (1L << 59) /* present */
@ -350,7 +211,7 @@ ia32_setregs(struct thread *td, u_long entry, u_long stack, u_long ps_strings)
ia64_set_eflag(PSL_USER);
/* PS_STRINGS value for BSD/OS binaries. It is 0 for non-BSD/OS. */
tf->tf_scratch.gr11 = IA32_PS_STRINGS;
tf->tf_scratch.gr11 = FREEBSD32_PS_STRINGS;
/*
* XXX - Linux emulator

View File

@ -0,0 +1,42 @@
/*-
* Copyright (c) 2002 Doug Rabson
* All rights reserved.
*
* 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.
*
* $FreeBSD$
*/
char ia32_sigcode[] = {
0xff, 0x54, 0x24, 0x10, /* call *SIGF_HANDLER(%esp) */
0x8d, 0x44, 0x24, 0x14, /* lea SIGF_UC(%esp),%eax */
0x50, /* pushl %eax */
0xf7, 0x40, 0x54, 0x00, 0x00, 0x02, 0x02, /* testl $PSL_VM,UC_EFLAGS(%eax) */
0x75, 0x03, /* jne 9f */
0x8e, 0x68, 0x14, /* movl UC_GS(%eax),%gs */
0xb8, 0x57, 0x01, 0x00, 0x00, /* 9: movl $SYS_sigreturn,%eax */
0x50, /* pushl %eax */
0xcd, 0x80, /* int $0x80 */
0xeb, 0xfe, /* 0: jmp 0b */
0
};
int sz_ia32_sigcode = sizeof(ia32_sigcode);

View File

@ -1,296 +0,0 @@
/*
* System call numbers.
*
* DO NOT EDIT-- this file is automatically generated.
* $FreeBSD$
* created from FreeBSD: src/sys/ia64/ia32/syscalls.master,v 1.23 2003/11/07 20:27:16 jhb Exp
*/
#define IA32_SYS_syscall 0
#define IA32_SYS_exit 1
#define IA32_SYS_fork 2
#define IA32_SYS_read 3
#define IA32_SYS_write 4
#define IA32_SYS_ia32_open 5
#define IA32_SYS_close 6
#define IA32_SYS_ia32_wait4 7
/* 8 is obsolete old creat */
#define IA32_SYS_link 9
#define IA32_SYS_unlink 10
/* 11 is obsolete execv */
#define IA32_SYS_chdir 12
#define IA32_SYS_fchdir 13
#define IA32_SYS_mknod 14
#define IA32_SYS_chmod 15
#define IA32_SYS_chown 16
#define IA32_SYS_break 17
#define IA32_SYS_ia32_getfsstat 18
/* 19 is obsolete olseek */
#define IA32_SYS_getpid 20
#define IA32_SYS_mount 21
#define IA32_SYS_unmount 22
#define IA32_SYS_setuid 23
#define IA32_SYS_getuid 24
#define IA32_SYS_geteuid 25
#define IA32_SYS_ptrace 26
#define IA32_SYS_sendmsg 28
#define IA32_SYS_recvfrom 29
#define IA32_SYS_accept 30
#define IA32_SYS_getpeername 31
#define IA32_SYS_getsockname 32
#define IA32_SYS_ia32_access 33
#define IA32_SYS_ia32_chflags 34
#define IA32_SYS_fchflags 35
#define IA32_SYS_sync 36
#define IA32_SYS_kill 37
#define IA32_SYS_getppid 39
#define IA32_SYS_dup 41
#define IA32_SYS_pipe 42
#define IA32_SYS_getegid 43
#define IA32_SYS_profil 44
#define IA32_SYS_ktrace 45
#define IA32_SYS_getgid 47
#define IA32_SYS_getlogin 49
#define IA32_SYS_setlogin 50
#define IA32_SYS_acct 51
#define IA32_SYS_sigpending 52
#define IA32_SYS_ia32_sigaltstack 53
#define IA32_SYS_ioctl 54
#define IA32_SYS_reboot 55
#define IA32_SYS_revoke 56
#define IA32_SYS_symlink 57
#define IA32_SYS_readlink 58
#define IA32_SYS_ia32_execve 59
#define IA32_SYS_umask 60
#define IA32_SYS_chroot 61
/* 62 is obsolete ofstat */
/* 63 is obsolete ogetkerninfo */
/* 64 is obsolete ogetpagesize */
/* 65 is obsolete omsync */
/* 66 is obsolete ovfork */
/* 67 is obsolete vread */
/* 68 is obsolete vwrite */
#define IA32_SYS_sbrk 69
#define IA32_SYS_sstk 70
/* 71 is obsolete ommap */
#define IA32_SYS_vadvise 72
#define IA32_SYS_munmap 73
#define IA32_SYS_mprotect 74
#define IA32_SYS_madvise 75
/* 76 is obsolete vhangup */
/* 77 is obsolete vlimit */
#define IA32_SYS_mincore 78
#define IA32_SYS_getgroups 79
#define IA32_SYS_setgroups 80
#define IA32_SYS_getpgrp 81
#define IA32_SYS_setpgid 82
#define IA32_SYS_ia32_setitimer 83
/* 84 is obsolete owait */
/* 85 is obsolete oswapon */
/* 86 is obsolete ogetitimer */
/* 87 is obsolete ogethostname */
/* 88 is obsolete osethostname */
#define IA32_SYS_getdtablesize 89
#define IA32_SYS_dup2 90
#define IA32_SYS_fcntl 92
#define IA32_SYS_ia32_select 93
#define IA32_SYS_fsync 95
#define IA32_SYS_setpriority 96
#define IA32_SYS_socket 97
#define IA32_SYS_connect 98
#define IA32_SYS_accept 99
#define IA32_SYS_getpriority 100
/* 101 is obsolete osend */
/* 102 is obsolete orecv */
/* 103 is obsolete osigreturn */
#define IA32_SYS_bind 104
#define IA32_SYS_setsockopt 105
#define IA32_SYS_listen 106
/* 107 is obsolete vtimes */
/* 108 is obsolete osigvec */
/* 109 is obsolete osigblock */
/* 110 is obsolete osigsetmask */
/* 111 is obsolete osigsuspend */
/* 112 is obsolete osigstack */
/* 113 is obsolete orecvmsg */
/* 114 is obsolete osendmsg */
/* 115 is obsolete vtrace */
#define IA32_SYS_ia32_gettimeofday 116
#define IA32_SYS_ia32_getrusage 117
#define IA32_SYS_getsockopt 118
#define IA32_SYS_ia32_readv 120
#define IA32_SYS_ia32_writev 121
#define IA32_SYS_ia32_settimeofday 122
#define IA32_SYS_fchown 123
#define IA32_SYS_fchmod 124
#define IA32_SYS_recvfrom 125
#define IA32_SYS_setreuid 126
#define IA32_SYS_setregid 127
#define IA32_SYS_rename 128
/* 129 is obsolete otruncate */
/* 130 is obsolete ftruncate */
#define IA32_SYS_flock 131
#define IA32_SYS_mkfifo 132
#define IA32_SYS_sendto 133
#define IA32_SYS_shutdown 134
#define IA32_SYS_socketpair 135
#define IA32_SYS_mkdir 136
#define IA32_SYS_rmdir 137
#define IA32_SYS_ia32_utimes 138
/* 139 is obsolete 4.2 sigreturn */
#define IA32_SYS_ia32_adjtime 140
/* 141 is obsolete ogetpeername */
/* 142 is obsolete ogethostid */
/* 143 is obsolete sethostid */
/* 144 is obsolete getrlimit */
/* 145 is obsolete setrlimit */
/* 146 is obsolete killpg */
#define IA32_SYS_setsid 147
#define IA32_SYS_quotactl 148
/* 149 is obsolete oquota */
/* 150 is obsolete ogetsockname */
#define IA32_SYS_getdirentries 156
#define IA32_SYS_ia32_statfs 157
#define IA32_SYS_ia32_fstatfs 158
#define IA32_SYS_getfh 161
#define IA32_SYS_getdomainname 162
#define IA32_SYS_setdomainname 163
#define IA32_SYS_uname 164
#define IA32_SYS_sysarch 165
#define IA32_SYS_rtprio 166
#define IA32_SYS_ia32_semsys 169
#define IA32_SYS_ia32_msgsys 170
#define IA32_SYS_ia32_shmsys 171
#define IA32_SYS_ia32_pread 173
#define IA32_SYS_ia32_pwrite 174
#define IA32_SYS_ntp_adjtime 176
#define IA32_SYS_setgid 181
#define IA32_SYS_setegid 182
#define IA32_SYS_seteuid 183
#define IA32_SYS_ia32_stat 188
#define IA32_SYS_ia32_fstat 189
#define IA32_SYS_ia32_lstat 190
#define IA32_SYS_pathconf 191
#define IA32_SYS_fpathconf 192
#define IA32_SYS_getrlimit 194
#define IA32_SYS_setrlimit 195
#define IA32_SYS_getdirentries 196
#define IA32_SYS_ia32_mmap 197
#define IA32_SYS___syscall 198
#define IA32_SYS_ia32_lseek 199
#define IA32_SYS_ia32_truncate 200
#define IA32_SYS_ia32_ftruncate 201
#define IA32_SYS_ia32_sysctl 202
#define IA32_SYS_mlock 203
#define IA32_SYS_munlock 204
#define IA32_SYS_undelete 205
#define IA32_SYS_futimes 206
#define IA32_SYS_getpgid 207
#define IA32_SYS_poll 209
#define IA32_SYS___semctl 220
#define IA32_SYS_semget 221
#define IA32_SYS_semop 222
#define IA32_SYS_msgctl 224
#define IA32_SYS_msgget 225
#define IA32_SYS_msgsnd 226
#define IA32_SYS_msgrcv 227
#define IA32_SYS_shmat 228
#define IA32_SYS_shmctl 229
#define IA32_SYS_shmdt 230
#define IA32_SYS_shmget 231
#define IA32_SYS_clock_gettime 232
#define IA32_SYS_clock_settime 233
#define IA32_SYS_clock_getres 234
#define IA32_SYS_nanosleep 240
#define IA32_SYS_minherit 250
#define IA32_SYS_rfork 251
#define IA32_SYS_openbsd_poll 252
#define IA32_SYS_issetugid 253
#define IA32_SYS_lchown 254
#define IA32_SYS_getdents 272
#define IA32_SYS_lchmod 274
#define IA32_SYS_netbsd_lchown 275
#define IA32_SYS_lutimes 276
#define IA32_SYS_netbsd_msync 277
#define IA32_SYS_nstat 278
#define IA32_SYS_nfstat 279
#define IA32_SYS_nlstat 280
#define IA32_SYS_fhstatfs 297
#define IA32_SYS_fhopen 298
#define IA32_SYS_fhstat 299
#define IA32_SYS_modnext 300
#define IA32_SYS_modstat 301
#define IA32_SYS_modfnext 302
#define IA32_SYS_modfind 303
#define IA32_SYS_kldload 304
#define IA32_SYS_kldunload 305
#define IA32_SYS_kldfind 306
#define IA32_SYS_kldnext 307
#define IA32_SYS_kldstat 308
#define IA32_SYS_kldfirstmod 309
#define IA32_SYS_getsid 310
#define IA32_SYS_setresuid 311
#define IA32_SYS_setresgid 312
/* 313 is obsolete signanosleep */
#define IA32_SYS_yield 321
/* 322 is obsolete thr_sleep */
/* 323 is obsolete thr_wakeup */
#define IA32_SYS_mlockall 324
#define IA32_SYS_munlockall 325
#define IA32_SYS___getcwd 326
#define IA32_SYS_sched_setparam 327
#define IA32_SYS_sched_getparam 328
#define IA32_SYS_sched_setscheduler 329
#define IA32_SYS_sched_getscheduler 330
#define IA32_SYS_sched_yield 331
#define IA32_SYS_sched_get_priority_max 332
#define IA32_SYS_sched_get_priority_min 333
#define IA32_SYS_sched_rr_get_interval 334
#define IA32_SYS_utrace 335
/* 336 is old ia32_sendfile */
#define IA32_SYS_kldsym 337
#define IA32_SYS_jail 338
#define IA32_SYS_sigprocmask 340
#define IA32_SYS_sigsuspend 341
#define IA32_SYS_ia32_sigaction 342
#define IA32_SYS_sigpending 343
#define IA32_SYS_sigreturn 344
#define IA32_SYS___acl_get_file 347
#define IA32_SYS___acl_set_file 348
#define IA32_SYS___acl_get_fd 349
#define IA32_SYS___acl_set_fd 350
#define IA32_SYS___acl_delete_file 351
#define IA32_SYS___acl_delete_fd 352
#define IA32_SYS___acl_aclcheck_file 353
#define IA32_SYS___acl_aclcheck_fd 354
#define IA32_SYS_extattrctl 355
#define IA32_SYS_extattr_set_file 356
#define IA32_SYS_extattr_get_file 357
#define IA32_SYS_extattr_delete_file 358
#define IA32_SYS_getresuid 360
#define IA32_SYS_getresgid 361
#define IA32_SYS_kqueue 362
#define IA32_SYS_kevent 363
#define IA32_SYS_extattr_set_fd 371
#define IA32_SYS_extattr_get_fd 372
#define IA32_SYS_extattr_delete_fd 373
#define IA32_SYS___setugid 374
#define IA32_SYS_eaccess 376
#define IA32_SYS_nmount 378
#define IA32_SYS_kse_exit 379
#define IA32_SYS_kse_wakeup 380
#define IA32_SYS_kse_create 381
#define IA32_SYS_kse_thr_interrupt 382
#define IA32_SYS_kse_release 383
#define IA32_SYS_kenv 390
#define IA32_SYS_lchflags 391
#define IA32_SYS_uuidgen 392
#define IA32_SYS_ia32_sendfile 393
#define IA32_SYS_thr_create 430
#define IA32_SYS_thr_exit 431
#define IA32_SYS_thr_self 432
#define IA32_SYS_thr_kill 433
#define IA32_SYS__umtx_lock 434
#define IA32_SYS__umtx_unlock 435
#define IA32_SYS_jail_attach 436
#define IA32_SYS_MAXSYSCALL 437

View File

@ -1,465 +0,0 @@
/*
* System call switch table.
*
* DO NOT EDIT-- this file is automatically generated.
* $FreeBSD$
* created from FreeBSD: src/sys/ia64/ia32/syscalls.master,v 1.23 2003/11/07 20:27:16 jhb Exp
*/
#include "opt_compat.h"
#include <sys/param.h>
#include <sys/sysent.h>
#include <sys/sysproto.h>
#include <sys/mount.h>
#include <ia64/ia32/ia32.h>
#include <ia64/ia32/ia32_proto.h>
#define AS(name) (sizeof(struct name) / sizeof(register_t))
#ifdef COMPAT_FREEBSD4
#define compat4(n, name) n, (sy_call_t *)__CONCAT(freebsd4_,name)
#else
#define compat4(n, name) 0, (sy_call_t *)nosys
#endif
/* The casts are bogus but will do for now. */
struct sysent ia32_sysent[] = {
{ SYF_MPSAFE | 0, (sy_call_t *)nosys }, /* 0 = syscall */
{ SYF_MPSAFE | AS(sys_exit_args), (sy_call_t *)sys_exit }, /* 1 = exit */
{ SYF_MPSAFE | 0, (sy_call_t *)fork }, /* 2 = fork */
{ SYF_MPSAFE | AS(read_args), (sy_call_t *)read }, /* 3 = read */
{ SYF_MPSAFE | AS(write_args), (sy_call_t *)write }, /* 4 = write */
{ AS(ia32_open_args), (sy_call_t *)ia32_open }, /* 5 = ia32_open */
{ SYF_MPSAFE | AS(close_args), (sy_call_t *)close }, /* 6 = close */
{ SYF_MPSAFE | AS(ia32_wait4_args), (sy_call_t *)ia32_wait4 }, /* 7 = ia32_wait4 */
{ 0, (sy_call_t *)nosys }, /* 8 = obsolete old creat */
{ AS(link_args), (sy_call_t *)link }, /* 9 = link */
{ AS(unlink_args), (sy_call_t *)unlink }, /* 10 = unlink */
{ 0, (sy_call_t *)nosys }, /* 11 = obsolete execv */
{ AS(chdir_args), (sy_call_t *)chdir }, /* 12 = chdir */
{ AS(fchdir_args), (sy_call_t *)fchdir }, /* 13 = fchdir */
{ AS(mknod_args), (sy_call_t *)mknod }, /* 14 = mknod */
{ AS(chmod_args), (sy_call_t *)chmod }, /* 15 = chmod */
{ AS(chown_args), (sy_call_t *)chown }, /* 16 = chown */
{ SYF_MPSAFE | AS(obreak_args), (sy_call_t *)obreak }, /* 17 = break */
{ AS(ia32_getfsstat_args), (sy_call_t *)ia32_getfsstat }, /* 18 = ia32_getfsstat */
{ 0, (sy_call_t *)nosys }, /* 19 = obsolete olseek */
{ SYF_MPSAFE | 0, (sy_call_t *)getpid }, /* 20 = getpid */
{ AS(mount_args), (sy_call_t *)mount }, /* 21 = mount */
{ AS(unmount_args), (sy_call_t *)unmount }, /* 22 = unmount */
{ SYF_MPSAFE | AS(setuid_args), (sy_call_t *)setuid }, /* 23 = setuid */
{ SYF_MPSAFE | 0, (sy_call_t *)getuid }, /* 24 = getuid */
{ SYF_MPSAFE | 0, (sy_call_t *)geteuid }, /* 25 = geteuid */
{ SYF_MPSAFE | AS(ptrace_args), (sy_call_t *)ptrace }, /* 26 = ptrace */
{ 0, (sy_call_t *)nosys }, /* 27 = recvmsg */
{ SYF_MPSAFE | AS(sendmsg_args), (sy_call_t *)sendmsg }, /* 28 = sendmsg */
{ SYF_MPSAFE | AS(recvfrom_args), (sy_call_t *)recvfrom }, /* 29 = recvfrom */
{ SYF_MPSAFE | AS(accept_args), (sy_call_t *)accept }, /* 30 = accept */
{ SYF_MPSAFE | AS(getpeername_args), (sy_call_t *)getpeername }, /* 31 = getpeername */
{ SYF_MPSAFE | AS(getsockname_args), (sy_call_t *)getsockname }, /* 32 = getsockname */
{ AS(ia32_access_args), (sy_call_t *)ia32_access }, /* 33 = ia32_access */
{ AS(ia32_chflags_args), (sy_call_t *)ia32_chflags }, /* 34 = ia32_chflags */
{ AS(fchflags_args), (sy_call_t *)fchflags }, /* 35 = fchflags */
{ 0, (sy_call_t *)sync }, /* 36 = sync */
{ SYF_MPSAFE | AS(kill_args), (sy_call_t *)kill }, /* 37 = kill */
{ 0, (sy_call_t *)nosys }, /* 38 = ostat */
{ SYF_MPSAFE | 0, (sy_call_t *)getppid }, /* 39 = getppid */
{ 0, (sy_call_t *)nosys }, /* 40 = olstat */
{ SYF_MPSAFE | AS(dup_args), (sy_call_t *)dup }, /* 41 = dup */
{ SYF_MPSAFE | 0, (sy_call_t *)pipe }, /* 42 = pipe */
{ SYF_MPSAFE | 0, (sy_call_t *)getegid }, /* 43 = getegid */
{ SYF_MPSAFE | AS(profil_args), (sy_call_t *)profil }, /* 44 = profil */
{ SYF_MPSAFE | AS(ktrace_args), (sy_call_t *)ktrace }, /* 45 = ktrace */
{ 0, (sy_call_t *)nosys }, /* 46 = osigaction */
{ SYF_MPSAFE | 0, (sy_call_t *)getgid }, /* 47 = getgid */
{ 0, (sy_call_t *)nosys }, /* 48 = osigprocmask */
{ SYF_MPSAFE | AS(getlogin_args), (sy_call_t *)getlogin }, /* 49 = getlogin */
{ SYF_MPSAFE | AS(setlogin_args), (sy_call_t *)setlogin }, /* 50 = setlogin */
{ SYF_MPSAFE | AS(acct_args), (sy_call_t *)acct }, /* 51 = acct */
{ SYF_MPSAFE | 0, (sy_call_t *)sigpending }, /* 52 = sigpending */
{ SYF_MPSAFE | AS(ia32_sigaltstack_args), (sy_call_t *)ia32_sigaltstack }, /* 53 = ia32_sigaltstack */
{ SYF_MPSAFE | AS(ioctl_args), (sy_call_t *)ioctl }, /* 54 = ioctl */
{ SYF_MPSAFE | AS(reboot_args), (sy_call_t *)reboot }, /* 55 = reboot */
{ AS(revoke_args), (sy_call_t *)revoke }, /* 56 = revoke */
{ AS(symlink_args), (sy_call_t *)symlink }, /* 57 = symlink */
{ AS(readlink_args), (sy_call_t *)readlink }, /* 58 = readlink */
{ AS(ia32_execve_args), (sy_call_t *)ia32_execve }, /* 59 = ia32_execve */
{ SYF_MPSAFE | AS(umask_args), (sy_call_t *)umask }, /* 60 = umask */
{ AS(chroot_args), (sy_call_t *)chroot }, /* 61 = chroot */
{ 0, (sy_call_t *)nosys }, /* 62 = obsolete ofstat */
{ 0, (sy_call_t *)nosys }, /* 63 = obsolete ogetkerninfo */
{ 0, (sy_call_t *)nosys }, /* 64 = obsolete ogetpagesize */
{ 0, (sy_call_t *)nosys }, /* 65 = obsolete omsync */
{ 0, (sy_call_t *)nosys }, /* 66 = obsolete ovfork */
{ 0, (sy_call_t *)nosys }, /* 67 = obsolete vread */
{ 0, (sy_call_t *)nosys }, /* 68 = obsolete vwrite */
{ SYF_MPSAFE | AS(sbrk_args), (sy_call_t *)sbrk }, /* 69 = sbrk */
{ SYF_MPSAFE | AS(sstk_args), (sy_call_t *)sstk }, /* 70 = sstk */
{ 0, (sy_call_t *)nosys }, /* 71 = obsolete ommap */
{ SYF_MPSAFE | AS(ovadvise_args), (sy_call_t *)ovadvise }, /* 72 = vadvise */
{ SYF_MPSAFE | AS(munmap_args), (sy_call_t *)munmap }, /* 73 = munmap */
{ SYF_MPSAFE | AS(mprotect_args), (sy_call_t *)mprotect }, /* 74 = mprotect */
{ SYF_MPSAFE | AS(madvise_args), (sy_call_t *)madvise }, /* 75 = madvise */
{ 0, (sy_call_t *)nosys }, /* 76 = obsolete vhangup */
{ 0, (sy_call_t *)nosys }, /* 77 = obsolete vlimit */
{ SYF_MPSAFE | AS(mincore_args), (sy_call_t *)mincore }, /* 78 = mincore */
{ SYF_MPSAFE | AS(getgroups_args), (sy_call_t *)getgroups }, /* 79 = getgroups */
{ SYF_MPSAFE | AS(setgroups_args), (sy_call_t *)setgroups }, /* 80 = setgroups */
{ SYF_MPSAFE | 0, (sy_call_t *)getpgrp }, /* 81 = getpgrp */
{ SYF_MPSAFE | AS(setpgid_args), (sy_call_t *)setpgid }, /* 82 = setpgid */
{ AS(ia32_setitimer_args), (sy_call_t *)ia32_setitimer }, /* 83 = ia32_setitimer */
{ 0, (sy_call_t *)nosys }, /* 84 = obsolete owait */
{ 0, (sy_call_t *)nosys }, /* 85 = obsolete oswapon */
{ 0, (sy_call_t *)nosys }, /* 86 = obsolete ogetitimer */
{ 0, (sy_call_t *)nosys }, /* 87 = obsolete ogethostname */
{ 0, (sy_call_t *)nosys }, /* 88 = obsolete osethostname */
{ SYF_MPSAFE | 0, (sy_call_t *)getdtablesize }, /* 89 = getdtablesize */
{ SYF_MPSAFE | AS(dup2_args), (sy_call_t *)dup2 }, /* 90 = dup2 */
{ 0, (sy_call_t *)nosys }, /* 91 = getdopt */
{ SYF_MPSAFE | AS(fcntl_args), (sy_call_t *)fcntl }, /* 92 = fcntl */
{ AS(ia32_select_args), (sy_call_t *)ia32_select }, /* 93 = ia32_select */
{ 0, (sy_call_t *)nosys }, /* 94 = setdopt */
{ AS(fsync_args), (sy_call_t *)fsync }, /* 95 = fsync */
{ SYF_MPSAFE | AS(setpriority_args), (sy_call_t *)setpriority }, /* 96 = setpriority */
{ SYF_MPSAFE | AS(socket_args), (sy_call_t *)socket }, /* 97 = socket */
{ SYF_MPSAFE | AS(connect_args), (sy_call_t *)connect }, /* 98 = connect */
{ SYF_MPSAFE | AS(accept_args), (sy_call_t *)accept }, /* 99 = accept */
{ SYF_MPSAFE | AS(getpriority_args), (sy_call_t *)getpriority }, /* 100 = getpriority */
{ 0, (sy_call_t *)nosys }, /* 101 = obsolete osend */
{ 0, (sy_call_t *)nosys }, /* 102 = obsolete orecv */
{ 0, (sy_call_t *)nosys }, /* 103 = obsolete osigreturn */
{ SYF_MPSAFE | AS(bind_args), (sy_call_t *)bind }, /* 104 = bind */
{ SYF_MPSAFE | AS(setsockopt_args), (sy_call_t *)setsockopt }, /* 105 = setsockopt */
{ SYF_MPSAFE | AS(listen_args), (sy_call_t *)listen }, /* 106 = listen */
{ 0, (sy_call_t *)nosys }, /* 107 = obsolete vtimes */
{ 0, (sy_call_t *)nosys }, /* 108 = obsolete osigvec */
{ 0, (sy_call_t *)nosys }, /* 109 = obsolete osigblock */
{ 0, (sy_call_t *)nosys }, /* 110 = obsolete osigsetmask */
{ 0, (sy_call_t *)nosys }, /* 111 = obsolete osigsuspend */
{ 0, (sy_call_t *)nosys }, /* 112 = obsolete osigstack */
{ 0, (sy_call_t *)nosys }, /* 113 = obsolete orecvmsg */
{ 0, (sy_call_t *)nosys }, /* 114 = obsolete osendmsg */
{ 0, (sy_call_t *)nosys }, /* 115 = obsolete vtrace */
{ AS(ia32_gettimeofday_args), (sy_call_t *)ia32_gettimeofday }, /* 116 = ia32_gettimeofday */
{ AS(ia32_getrusage_args), (sy_call_t *)ia32_getrusage }, /* 117 = ia32_getrusage */
{ SYF_MPSAFE | AS(getsockopt_args), (sy_call_t *)getsockopt }, /* 118 = getsockopt */
{ 0, (sy_call_t *)nosys }, /* 119 = resuba */
{ AS(ia32_readv_args), (sy_call_t *)ia32_readv }, /* 120 = ia32_readv */
{ AS(ia32_writev_args), (sy_call_t *)ia32_writev }, /* 121 = ia32_writev */
{ AS(ia32_settimeofday_args), (sy_call_t *)ia32_settimeofday }, /* 122 = ia32_settimeofday */
{ AS(fchown_args), (sy_call_t *)fchown }, /* 123 = fchown */
{ AS(fchmod_args), (sy_call_t *)fchmod }, /* 124 = fchmod */
{ SYF_MPSAFE | AS(recvfrom_args), (sy_call_t *)recvfrom }, /* 125 = recvfrom */
{ SYF_MPSAFE | AS(setreuid_args), (sy_call_t *)setreuid }, /* 126 = setreuid */
{ SYF_MPSAFE | AS(setregid_args), (sy_call_t *)setregid }, /* 127 = setregid */
{ AS(rename_args), (sy_call_t *)rename }, /* 128 = rename */
{ 0, (sy_call_t *)nosys }, /* 129 = obsolete otruncate */
{ 0, (sy_call_t *)nosys }, /* 130 = obsolete ftruncate */
{ SYF_MPSAFE | AS(flock_args), (sy_call_t *)flock }, /* 131 = flock */
{ AS(mkfifo_args), (sy_call_t *)mkfifo }, /* 132 = mkfifo */
{ SYF_MPSAFE | AS(sendto_args), (sy_call_t *)sendto }, /* 133 = sendto */
{ SYF_MPSAFE | AS(shutdown_args), (sy_call_t *)shutdown }, /* 134 = shutdown */
{ SYF_MPSAFE | AS(socketpair_args), (sy_call_t *)socketpair }, /* 135 = socketpair */
{ AS(mkdir_args), (sy_call_t *)mkdir }, /* 136 = mkdir */
{ AS(rmdir_args), (sy_call_t *)rmdir }, /* 137 = rmdir */
{ AS(ia32_utimes_args), (sy_call_t *)ia32_utimes }, /* 138 = ia32_utimes */
{ 0, (sy_call_t *)nosys }, /* 139 = obsolete 4.2 sigreturn */
{ AS(ia32_adjtime_args), (sy_call_t *)ia32_adjtime }, /* 140 = ia32_adjtime */
{ 0, (sy_call_t *)nosys }, /* 141 = obsolete ogetpeername */
{ 0, (sy_call_t *)nosys }, /* 142 = obsolete ogethostid */
{ 0, (sy_call_t *)nosys }, /* 143 = obsolete sethostid */
{ 0, (sy_call_t *)nosys }, /* 144 = obsolete getrlimit */
{ 0, (sy_call_t *)nosys }, /* 145 = obsolete setrlimit */
{ 0, (sy_call_t *)nosys }, /* 146 = obsolete killpg */
{ SYF_MPSAFE | 0, (sy_call_t *)setsid }, /* 147 = setsid */
{ AS(quotactl_args), (sy_call_t *)quotactl }, /* 148 = quotactl */
{ 0, (sy_call_t *)nosys }, /* 149 = obsolete oquota */
{ 0, (sy_call_t *)nosys }, /* 150 = obsolete ogetsockname */
{ 0, (sy_call_t *)nosys }, /* 151 = sem_lock */
{ 0, (sy_call_t *)nosys }, /* 152 = sem_wakeup */
{ 0, (sy_call_t *)nosys }, /* 153 = asyncdaemon */
{ 0, (sy_call_t *)nosys }, /* 154 = nosys */
{ 0, (sy_call_t *)nosys }, /* 155 = nfssvc */
{ AS(getdirentries_args), (sy_call_t *)getdirentries }, /* 156 = getdirentries */
{ AS(ia32_statfs_args), (sy_call_t *)ia32_statfs }, /* 157 = ia32_statfs */
{ AS(ia32_fstatfs_args), (sy_call_t *)ia32_fstatfs }, /* 158 = ia32_fstatfs */
{ 0, (sy_call_t *)nosys }, /* 159 = nosys */
{ 0, (sy_call_t *)nosys }, /* 160 = nosys */
{ AS(getfh_args), (sy_call_t *)getfh }, /* 161 = getfh */
{ SYF_MPSAFE | AS(getdomainname_args), (sy_call_t *)getdomainname }, /* 162 = getdomainname */
{ SYF_MPSAFE | AS(setdomainname_args), (sy_call_t *)setdomainname }, /* 163 = setdomainname */
{ SYF_MPSAFE | AS(uname_args), (sy_call_t *)uname }, /* 164 = uname */
{ SYF_MPSAFE | AS(sysarch_args), (sy_call_t *)sysarch }, /* 165 = sysarch */
{ SYF_MPSAFE | AS(rtprio_args), (sy_call_t *)rtprio }, /* 166 = rtprio */
{ 0, (sy_call_t *)nosys }, /* 167 = nosys */
{ 0, (sy_call_t *)nosys }, /* 168 = nosys */
{ AS(ia32_semsys_args), (sy_call_t *)ia32_semsys }, /* 169 = ia32_semsys */
{ AS(ia32_msgsys_args), (sy_call_t *)ia32_msgsys }, /* 170 = ia32_msgsys */
{ AS(ia32_shmsys_args), (sy_call_t *)ia32_shmsys }, /* 171 = ia32_shmsys */
{ 0, (sy_call_t *)nosys }, /* 172 = nosys */
{ AS(ia32_pread_args), (sy_call_t *)ia32_pread }, /* 173 = ia32_pread */
{ AS(ia32_pwrite_args), (sy_call_t *)ia32_pwrite }, /* 174 = ia32_pwrite */
{ 0, (sy_call_t *)nosys }, /* 175 = nosys */
{ SYF_MPSAFE | AS(ntp_adjtime_args), (sy_call_t *)ntp_adjtime }, /* 176 = ntp_adjtime */
{ 0, (sy_call_t *)nosys }, /* 177 = sfork */
{ 0, (sy_call_t *)nosys }, /* 178 = getdescriptor */
{ 0, (sy_call_t *)nosys }, /* 179 = setdescriptor */
{ 0, (sy_call_t *)nosys }, /* 180 = nosys */
{ SYF_MPSAFE | AS(setgid_args), (sy_call_t *)setgid }, /* 181 = setgid */
{ SYF_MPSAFE | AS(setegid_args), (sy_call_t *)setegid }, /* 182 = setegid */
{ SYF_MPSAFE | AS(seteuid_args), (sy_call_t *)seteuid }, /* 183 = seteuid */
{ 0, (sy_call_t *)nosys }, /* 184 = lfs_bmapv */
{ 0, (sy_call_t *)nosys }, /* 185 = lfs_markv */
{ 0, (sy_call_t *)nosys }, /* 186 = lfs_segclean */
{ 0, (sy_call_t *)nosys }, /* 187 = lfs_segwait */
{ AS(ia32_stat_args), (sy_call_t *)ia32_stat }, /* 188 = ia32_stat */
{ AS(ia32_fstat_args), (sy_call_t *)ia32_fstat }, /* 189 = ia32_fstat */
{ AS(ia32_lstat_args), (sy_call_t *)ia32_lstat }, /* 190 = ia32_lstat */
{ AS(pathconf_args), (sy_call_t *)pathconf }, /* 191 = pathconf */
{ SYF_MPSAFE | AS(fpathconf_args), (sy_call_t *)fpathconf }, /* 192 = fpathconf */
{ 0, (sy_call_t *)nosys }, /* 193 = nosys */
{ SYF_MPSAFE | AS(__getrlimit_args), (sy_call_t *)getrlimit }, /* 194 = getrlimit */
{ SYF_MPSAFE | AS(__setrlimit_args), (sy_call_t *)setrlimit }, /* 195 = setrlimit */
{ AS(getdirentries_args), (sy_call_t *)getdirentries }, /* 196 = getdirentries */
{ AS(ia32_mmap_args), (sy_call_t *)ia32_mmap }, /* 197 = ia32_mmap */
{ 0, (sy_call_t *)nosys }, /* 198 = __syscall */
{ AS(ia32_lseek_args), (sy_call_t *)ia32_lseek }, /* 199 = ia32_lseek */
{ AS(ia32_truncate_args), (sy_call_t *)ia32_truncate }, /* 200 = ia32_truncate */
{ AS(ia32_ftruncate_args), (sy_call_t *)ia32_ftruncate }, /* 201 = ia32_ftruncate */
{ SYF_MPSAFE | AS(ia32_sysctl_args), (sy_call_t *)ia32_sysctl }, /* 202 = ia32_sysctl */
{ SYF_MPSAFE | AS(mlock_args), (sy_call_t *)mlock }, /* 203 = mlock */
{ SYF_MPSAFE | AS(munlock_args), (sy_call_t *)munlock }, /* 204 = munlock */
{ AS(undelete_args), (sy_call_t *)undelete }, /* 205 = undelete */
{ AS(futimes_args), (sy_call_t *)futimes }, /* 206 = futimes */
{ SYF_MPSAFE | AS(getpgid_args), (sy_call_t *)getpgid }, /* 207 = getpgid */
{ 0, (sy_call_t *)nosys }, /* 208 = newreboot */
{ SYF_MPSAFE | AS(poll_args), (sy_call_t *)poll }, /* 209 = poll */
{ 0, (sy_call_t *)nosys }, /* 210 = */
{ 0, (sy_call_t *)nosys }, /* 211 = */
{ 0, (sy_call_t *)nosys }, /* 212 = */
{ 0, (sy_call_t *)nosys }, /* 213 = */
{ 0, (sy_call_t *)nosys }, /* 214 = */
{ 0, (sy_call_t *)nosys }, /* 215 = */
{ 0, (sy_call_t *)nosys }, /* 216 = */
{ 0, (sy_call_t *)nosys }, /* 217 = */
{ 0, (sy_call_t *)nosys }, /* 218 = */
{ 0, (sy_call_t *)nosys }, /* 219 = */
{ SYF_MPSAFE | AS(__semctl_args), (sy_call_t *)__semctl }, /* 220 = __semctl */
{ SYF_MPSAFE | AS(semget_args), (sy_call_t *)semget }, /* 221 = semget */
{ SYF_MPSAFE | AS(semop_args), (sy_call_t *)semop }, /* 222 = semop */
{ 0, (sy_call_t *)nosys }, /* 223 = semconfig */
{ SYF_MPSAFE | AS(msgctl_args), (sy_call_t *)msgctl }, /* 224 = msgctl */
{ SYF_MPSAFE | AS(msgget_args), (sy_call_t *)msgget }, /* 225 = msgget */
{ SYF_MPSAFE | AS(msgsnd_args), (sy_call_t *)msgsnd }, /* 226 = msgsnd */
{ SYF_MPSAFE | AS(msgrcv_args), (sy_call_t *)msgrcv }, /* 227 = msgrcv */
{ SYF_MPSAFE | AS(shmat_args), (sy_call_t *)shmat }, /* 228 = shmat */
{ SYF_MPSAFE | AS(shmctl_args), (sy_call_t *)shmctl }, /* 229 = shmctl */
{ SYF_MPSAFE | AS(shmdt_args), (sy_call_t *)shmdt }, /* 230 = shmdt */
{ SYF_MPSAFE | AS(shmget_args), (sy_call_t *)shmget }, /* 231 = shmget */
{ SYF_MPSAFE | AS(clock_gettime_args), (sy_call_t *)clock_gettime }, /* 232 = clock_gettime */
{ SYF_MPSAFE | AS(clock_settime_args), (sy_call_t *)clock_settime }, /* 233 = clock_settime */
{ SYF_MPSAFE | AS(clock_getres_args), (sy_call_t *)clock_getres }, /* 234 = clock_getres */
{ 0, (sy_call_t *)nosys }, /* 235 = timer_create */
{ 0, (sy_call_t *)nosys }, /* 236 = timer_delete */
{ 0, (sy_call_t *)nosys }, /* 237 = timer_settime */
{ 0, (sy_call_t *)nosys }, /* 238 = timer_gettime */
{ 0, (sy_call_t *)nosys }, /* 239 = timer_getoverrun */
{ SYF_MPSAFE | AS(nanosleep_args), (sy_call_t *)nanosleep }, /* 240 = nanosleep */
{ 0, (sy_call_t *)nosys }, /* 241 = nosys */
{ 0, (sy_call_t *)nosys }, /* 242 = nosys */
{ 0, (sy_call_t *)nosys }, /* 243 = nosys */
{ 0, (sy_call_t *)nosys }, /* 244 = nosys */
{ 0, (sy_call_t *)nosys }, /* 245 = nosys */
{ 0, (sy_call_t *)nosys }, /* 246 = nosys */
{ 0, (sy_call_t *)nosys }, /* 247 = nosys */
{ 0, (sy_call_t *)nosys }, /* 248 = nosys */
{ 0, (sy_call_t *)nosys }, /* 249 = nosys */
{ SYF_MPSAFE | AS(minherit_args), (sy_call_t *)minherit }, /* 250 = minherit */
{ SYF_MPSAFE | AS(rfork_args), (sy_call_t *)rfork }, /* 251 = rfork */
{ SYF_MPSAFE | AS(openbsd_poll_args), (sy_call_t *)openbsd_poll }, /* 252 = openbsd_poll */
{ SYF_MPSAFE | 0, (sy_call_t *)issetugid }, /* 253 = issetugid */
{ AS(lchown_args), (sy_call_t *)lchown }, /* 254 = lchown */
{ 0, (sy_call_t *)nosys }, /* 255 = nosys */
{ 0, (sy_call_t *)nosys }, /* 256 = nosys */
{ 0, (sy_call_t *)nosys }, /* 257 = nosys */
{ 0, (sy_call_t *)nosys }, /* 258 = nosys */
{ 0, (sy_call_t *)nosys }, /* 259 = nosys */
{ 0, (sy_call_t *)nosys }, /* 260 = nosys */
{ 0, (sy_call_t *)nosys }, /* 261 = nosys */
{ 0, (sy_call_t *)nosys }, /* 262 = nosys */
{ 0, (sy_call_t *)nosys }, /* 263 = nosys */
{ 0, (sy_call_t *)nosys }, /* 264 = nosys */
{ 0, (sy_call_t *)nosys }, /* 265 = nosys */
{ 0, (sy_call_t *)nosys }, /* 266 = nosys */
{ 0, (sy_call_t *)nosys }, /* 267 = nosys */
{ 0, (sy_call_t *)nosys }, /* 268 = nosys */
{ 0, (sy_call_t *)nosys }, /* 269 = nosys */
{ 0, (sy_call_t *)nosys }, /* 270 = nosys */
{ 0, (sy_call_t *)nosys }, /* 271 = nosys */
{ AS(getdents_args), (sy_call_t *)getdents }, /* 272 = getdents */
{ 0, (sy_call_t *)nosys }, /* 273 = nosys */
{ AS(lchmod_args), (sy_call_t *)lchmod }, /* 274 = lchmod */
{ AS(lchown_args), (sy_call_t *)lchown }, /* 275 = netbsd_lchown */
{ AS(lutimes_args), (sy_call_t *)lutimes }, /* 276 = lutimes */
{ SYF_MPSAFE | AS(msync_args), (sy_call_t *)msync }, /* 277 = netbsd_msync */
{ AS(nstat_args), (sy_call_t *)nstat }, /* 278 = nstat */
{ SYF_MPSAFE | AS(nfstat_args), (sy_call_t *)nfstat }, /* 279 = nfstat */
{ AS(nlstat_args), (sy_call_t *)nlstat }, /* 280 = nlstat */
{ 0, (sy_call_t *)nosys }, /* 281 = nosys */
{ 0, (sy_call_t *)nosys }, /* 282 = nosys */
{ 0, (sy_call_t *)nosys }, /* 283 = nosys */
{ 0, (sy_call_t *)nosys }, /* 284 = nosys */
{ 0, (sy_call_t *)nosys }, /* 285 = nosys */
{ 0, (sy_call_t *)nosys }, /* 286 = nosys */
{ 0, (sy_call_t *)nosys }, /* 287 = nosys */
{ 0, (sy_call_t *)nosys }, /* 288 = nosys */
{ 0, (sy_call_t *)nosys }, /* 289 = nosys */
{ 0, (sy_call_t *)nosys }, /* 290 = nosys */
{ 0, (sy_call_t *)nosys }, /* 291 = nosys */
{ 0, (sy_call_t *)nosys }, /* 292 = nosys */
{ 0, (sy_call_t *)nosys }, /* 293 = nosys */
{ 0, (sy_call_t *)nosys }, /* 294 = nosys */
{ 0, (sy_call_t *)nosys }, /* 295 = nosys */
{ 0, (sy_call_t *)nosys }, /* 296 = nosys */
{ AS(fhstatfs_args), (sy_call_t *)fhstatfs }, /* 297 = fhstatfs */
{ AS(fhopen_args), (sy_call_t *)fhopen }, /* 298 = fhopen */
{ AS(fhstat_args), (sy_call_t *)fhstat }, /* 299 = fhstat */
{ SYF_MPSAFE | AS(modnext_args), (sy_call_t *)modnext }, /* 300 = modnext */
{ SYF_MPSAFE | AS(modstat_args), (sy_call_t *)modstat }, /* 301 = modstat */
{ SYF_MPSAFE | AS(modfnext_args), (sy_call_t *)modfnext }, /* 302 = modfnext */
{ SYF_MPSAFE | AS(modfind_args), (sy_call_t *)modfind }, /* 303 = modfind */
{ SYF_MPSAFE | AS(kldload_args), (sy_call_t *)kldload }, /* 304 = kldload */
{ SYF_MPSAFE | AS(kldunload_args), (sy_call_t *)kldunload }, /* 305 = kldunload */
{ SYF_MPSAFE | AS(kldfind_args), (sy_call_t *)kldfind }, /* 306 = kldfind */
{ SYF_MPSAFE | AS(kldnext_args), (sy_call_t *)kldnext }, /* 307 = kldnext */
{ SYF_MPSAFE | AS(kldstat_args), (sy_call_t *)kldstat }, /* 308 = kldstat */
{ SYF_MPSAFE | AS(kldfirstmod_args), (sy_call_t *)kldfirstmod }, /* 309 = kldfirstmod */
{ SYF_MPSAFE | AS(getsid_args), (sy_call_t *)getsid }, /* 310 = getsid */
{ SYF_MPSAFE | AS(setresuid_args), (sy_call_t *)setresuid }, /* 311 = setresuid */
{ SYF_MPSAFE | AS(setresgid_args), (sy_call_t *)setresgid }, /* 312 = setresgid */
{ 0, (sy_call_t *)nosys }, /* 313 = obsolete signanosleep */
{ 0, (sy_call_t *)nosys }, /* 314 = aio_return */
{ 0, (sy_call_t *)nosys }, /* 315 = aio_suspend */
{ 0, (sy_call_t *)nosys }, /* 316 = aio_cancel */
{ 0, (sy_call_t *)nosys }, /* 317 = aio_error */
{ 0, (sy_call_t *)nosys }, /* 318 = aio_read */
{ 0, (sy_call_t *)nosys }, /* 319 = aio_write */
{ 0, (sy_call_t *)nosys }, /* 320 = lio_listio */
{ SYF_MPSAFE | 0, (sy_call_t *)yield }, /* 321 = yield */
{ 0, (sy_call_t *)nosys }, /* 322 = obsolete thr_sleep */
{ 0, (sy_call_t *)nosys }, /* 323 = obsolete thr_wakeup */
{ SYF_MPSAFE | AS(mlockall_args), (sy_call_t *)mlockall }, /* 324 = mlockall */
{ SYF_MPSAFE | 0, (sy_call_t *)munlockall }, /* 325 = munlockall */
{ AS(__getcwd_args), (sy_call_t *)__getcwd }, /* 326 = __getcwd */
{ SYF_MPSAFE | AS(sched_setparam_args), (sy_call_t *)sched_setparam }, /* 327 = sched_setparam */
{ SYF_MPSAFE | AS(sched_getparam_args), (sy_call_t *)sched_getparam }, /* 328 = sched_getparam */
{ SYF_MPSAFE | AS(sched_setscheduler_args), (sy_call_t *)sched_setscheduler }, /* 329 = sched_setscheduler */
{ SYF_MPSAFE | AS(sched_getscheduler_args), (sy_call_t *)sched_getscheduler }, /* 330 = sched_getscheduler */
{ SYF_MPSAFE | 0, (sy_call_t *)sched_yield }, /* 331 = sched_yield */
{ SYF_MPSAFE | AS(sched_get_priority_max_args), (sy_call_t *)sched_get_priority_max }, /* 332 = sched_get_priority_max */
{ SYF_MPSAFE | AS(sched_get_priority_min_args), (sy_call_t *)sched_get_priority_min }, /* 333 = sched_get_priority_min */
{ SYF_MPSAFE | AS(sched_rr_get_interval_args), (sy_call_t *)sched_rr_get_interval }, /* 334 = sched_rr_get_interval */
{ SYF_MPSAFE | AS(utrace_args), (sy_call_t *)utrace }, /* 335 = utrace */
{ compat4(SYF_MPSAFE | AS(freebsd4_ia32_sendfile_args),ia32_sendfile) }, /* 336 = old ia32_sendfile */
{ AS(kldsym_args), (sy_call_t *)kldsym }, /* 337 = kldsym */
{ SYF_MPSAFE | AS(jail_args), (sy_call_t *)jail }, /* 338 = jail */
{ 0, (sy_call_t *)nosys }, /* 339 = pioctl */
{ SYF_MPSAFE | AS(sigprocmask_args), (sy_call_t *)sigprocmask }, /* 340 = sigprocmask */
{ SYF_MPSAFE | AS(sigsuspend_args), (sy_call_t *)sigsuspend }, /* 341 = sigsuspend */
{ SYF_MPSAFE | AS(ia32_sigaction_args), (sy_call_t *)ia32_sigaction }, /* 342 = ia32_sigaction */
{ SYF_MPSAFE | AS(sigpending_args), (sy_call_t *)sigpending }, /* 343 = sigpending */
{ SYF_MPSAFE | AS(sigreturn_args), (sy_call_t *)sigreturn }, /* 344 = sigreturn */
{ 0, (sy_call_t *)nosys }, /* 345 = sigtimedwait */
{ 0, (sy_call_t *)nosys }, /* 346 = sigwaitinfo */
{ SYF_MPSAFE | AS(__acl_get_file_args), (sy_call_t *)__acl_get_file }, /* 347 = __acl_get_file */
{ SYF_MPSAFE | AS(__acl_set_file_args), (sy_call_t *)__acl_set_file }, /* 348 = __acl_set_file */
{ SYF_MPSAFE | AS(__acl_get_fd_args), (sy_call_t *)__acl_get_fd }, /* 349 = __acl_get_fd */
{ SYF_MPSAFE | AS(__acl_set_fd_args), (sy_call_t *)__acl_set_fd }, /* 350 = __acl_set_fd */
{ SYF_MPSAFE | AS(__acl_delete_file_args), (sy_call_t *)__acl_delete_file }, /* 351 = __acl_delete_file */
{ SYF_MPSAFE | AS(__acl_delete_fd_args), (sy_call_t *)__acl_delete_fd }, /* 352 = __acl_delete_fd */
{ SYF_MPSAFE | AS(__acl_aclcheck_file_args), (sy_call_t *)__acl_aclcheck_file }, /* 353 = __acl_aclcheck_file */
{ SYF_MPSAFE | AS(__acl_aclcheck_fd_args), (sy_call_t *)__acl_aclcheck_fd }, /* 354 = __acl_aclcheck_fd */
{ AS(extattrctl_args), (sy_call_t *)extattrctl }, /* 355 = extattrctl */
{ AS(extattr_set_file_args), (sy_call_t *)extattr_set_file }, /* 356 = extattr_set_file */
{ AS(extattr_get_file_args), (sy_call_t *)extattr_get_file }, /* 357 = extattr_get_file */
{ AS(extattr_delete_file_args), (sy_call_t *)extattr_delete_file }, /* 358 = extattr_delete_file */
{ 0, (sy_call_t *)nosys }, /* 359 = aio_waitcomplete */
{ SYF_MPSAFE | AS(getresuid_args), (sy_call_t *)getresuid }, /* 360 = getresuid */
{ SYF_MPSAFE | AS(getresgid_args), (sy_call_t *)getresgid }, /* 361 = getresgid */
{ SYF_MPSAFE | 0, (sy_call_t *)kqueue }, /* 362 = kqueue */
{ SYF_MPSAFE | AS(kevent_args), (sy_call_t *)kevent }, /* 363 = kevent */
{ 0, (sy_call_t *)nosys }, /* 364 = __cap_get_proc */
{ 0, (sy_call_t *)nosys }, /* 365 = __cap_set_proc */
{ 0, (sy_call_t *)nosys }, /* 366 = __cap_get_fd */
{ 0, (sy_call_t *)nosys }, /* 367 = __cap_get_file */
{ 0, (sy_call_t *)nosys }, /* 368 = __cap_set_fd */
{ 0, (sy_call_t *)nosys }, /* 369 = __cap_set_file */
{ 0, (sy_call_t *)nosys }, /* 370 = lkmressys */
{ AS(extattr_set_fd_args), (sy_call_t *)extattr_set_fd }, /* 371 = extattr_set_fd */
{ AS(extattr_get_fd_args), (sy_call_t *)extattr_get_fd }, /* 372 = extattr_get_fd */
{ AS(extattr_delete_fd_args), (sy_call_t *)extattr_delete_fd }, /* 373 = extattr_delete_fd */
{ SYF_MPSAFE | AS(__setugid_args), (sy_call_t *)__setugid }, /* 374 = __setugid */
{ 0, (sy_call_t *)nosys }, /* 375 = nfsclnt */
{ AS(eaccess_args), (sy_call_t *)eaccess }, /* 376 = eaccess */
{ 0, (sy_call_t *)nosys }, /* 377 = afs_syscall */
{ AS(nmount_args), (sy_call_t *)nmount }, /* 378 = nmount */
{ 0, (sy_call_t *)kse_exit }, /* 379 = kse_exit */
{ AS(kse_wakeup_args), (sy_call_t *)kse_wakeup }, /* 380 = kse_wakeup */
{ AS(kse_create_args), (sy_call_t *)kse_create }, /* 381 = kse_create */
{ AS(kse_thr_interrupt_args), (sy_call_t *)kse_thr_interrupt }, /* 382 = kse_thr_interrupt */
{ 0, (sy_call_t *)kse_release }, /* 383 = kse_release */
{ 0, (sy_call_t *)nosys }, /* 384 = __mac_get_proc */
{ 0, (sy_call_t *)nosys }, /* 385 = __mac_set_proc */
{ 0, (sy_call_t *)nosys }, /* 386 = __mac_get_fd */
{ 0, (sy_call_t *)nosys }, /* 387 = __mac_get_file */
{ 0, (sy_call_t *)nosys }, /* 388 = __mac_set_fd */
{ 0, (sy_call_t *)nosys }, /* 389 = __mac_set_file */
{ AS(kenv_args), (sy_call_t *)kenv }, /* 390 = kenv */
{ AS(lchflags_args), (sy_call_t *)lchflags }, /* 391 = lchflags */
{ AS(uuidgen_args), (sy_call_t *)uuidgen }, /* 392 = uuidgen */
{ SYF_MPSAFE | AS(ia32_sendfile_args), (sy_call_t *)ia32_sendfile }, /* 393 = ia32_sendfile */
{ 0, (sy_call_t *)nosys }, /* 394 = mac_syscall */
{ 0, (sy_call_t *)nosys }, /* 395 = nosys */
{ 0, (sy_call_t *)nosys }, /* 396 = nosys */
{ 0, (sy_call_t *)nosys }, /* 397 = nosys */
{ 0, (sy_call_t *)nosys }, /* 398 = nosys */
{ 0, (sy_call_t *)nosys }, /* 399 = nosys */
{ 0, (sy_call_t *)nosys }, /* 400 = ksem_close */
{ 0, (sy_call_t *)nosys }, /* 401 = ksem_post */
{ 0, (sy_call_t *)nosys }, /* 402 = ksem_wait */
{ 0, (sy_call_t *)nosys }, /* 403 = ksem_trywait */
{ 0, (sy_call_t *)nosys }, /* 404 = ksem_init */
{ 0, (sy_call_t *)nosys }, /* 405 = ksem_open */
{ 0, (sy_call_t *)nosys }, /* 406 = ksem_unlink */
{ 0, (sy_call_t *)nosys }, /* 407 = ksem_getvalue */
{ 0, (sy_call_t *)nosys }, /* 408 = ksem_destroy */
{ 0, (sy_call_t *)nosys }, /* 409 = __mac_get_pid */
{ 0, (sy_call_t *)nosys }, /* 410 = __mac_get_link */
{ 0, (sy_call_t *)nosys }, /* 411 = __mac_set_link */
{ 0, (sy_call_t *)nosys }, /* 412 = extattr_set_link */
{ 0, (sy_call_t *)nosys }, /* 413 = extattr_get_link */
{ 0, (sy_call_t *)nosys }, /* 414 = extattr_delete_link */
{ 0, (sy_call_t *)nosys }, /* 415 = __mac_execve */
{ 0, (sy_call_t *)nosys }, /* 416 = newsigaction */
{ 0, (sy_call_t *)nosys }, /* 417 = newsigreturn */
{ 0, (sy_call_t *)nosys }, /* 418 = __xstat */
{ 0, (sy_call_t *)nosys }, /* 419 = __xfstat */
{ 0, (sy_call_t *)nosys }, /* 420 = __xlstat */
{ 0, (sy_call_t *)nosys }, /* 421 = getcontext */
{ 0, (sy_call_t *)nosys }, /* 422 = setcontext */
{ 0, (sy_call_t *)nosys }, /* 423 = swapcontext */
{ 0, (sy_call_t *)nosys }, /* 424 = swapoff */
{ 0, (sy_call_t *)nosys }, /* 425 = __acl_get_link */
{ 0, (sy_call_t *)nosys }, /* 426 = __acl_set_link */
{ 0, (sy_call_t *)nosys }, /* 427 = __acl_delete_link */
{ 0, (sy_call_t *)nosys }, /* 428 = __acl_aclcheck_link */
{ 0, (sy_call_t *)nosys }, /* 429 = sigwait */
{ SYF_MPSAFE | AS(thr_create_args), (sy_call_t *)thr_create }, /* 430 = thr_create */
{ SYF_MPSAFE | 0, (sy_call_t *)thr_exit }, /* 431 = thr_exit */
{ SYF_MPSAFE | AS(thr_self_args), (sy_call_t *)thr_self }, /* 432 = thr_self */
{ SYF_MPSAFE | AS(thr_kill_args), (sy_call_t *)thr_kill }, /* 433 = thr_kill */
{ SYF_MPSAFE | AS(_umtx_lock_args), (sy_call_t *)_umtx_lock }, /* 434 = _umtx_lock */
{ SYF_MPSAFE | AS(_umtx_unlock_args), (sy_call_t *)_umtx_unlock }, /* 435 = _umtx_unlock */
{ SYF_MPSAFE | AS(jail_attach_args), (sy_call_t *)jail_attach }, /* 436 = jail_attach */
};

View File

@ -1,385 +0,0 @@
/*-
* Copyright (c) 2002 Doug Rabson
* All rights reserved.
*
* 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.
*
* $FreeBSD$
*/
#define __ELF_WORD_SIZE 32
#include <sys/param.h>
#include <sys/exec.h>
#include <sys/fcntl.h>
#include <sys/imgact.h>
#include <sys/kernel.h>
#include <sys/lock.h>
#include <sys/malloc.h>
#include <sys/mutex.h>
#include <sys/mman.h>
#include <sys/namei.h>
#include <sys/pioctl.h>
#include <sys/proc.h>
#include <sys/procfs.h>
#include <sys/resourcevar.h>
#include <sys/systm.h>
#include <sys/signalvar.h>
#include <sys/stat.h>
#include <sys/sx.h>
#include <sys/syscall.h>
#include <sys/sysctl.h>
#include <sys/sysent.h>
#include <sys/vnode.h>
#include <sys/imgact_elf.h>
#include <machine/frame.h>
#include <machine/md_var.h>
#include <machine/pcb.h>
#include <vm/vm.h>
#include <vm/vm_kern.h>
#include <vm/vm_param.h>
#include <vm/pmap.h>
#include <vm/vm_map.h>
#include <vm/vm_object.h>
#include <vm/vm_extern.h>
#include <ia64/ia32/ia32_util.h>
#include <i386/include/psl.h>
#include <i386/include/segments.h>
#include <i386/include/specialreg.h>
static register_t *ia32_copyout_strings(struct image_params *imgp);
static void ia32_setregs(struct thread *td, u_long entry, u_long stack,
u_long ps_strings);
extern struct sysent ia32_sysent[];
static char ia32_sigcode[] = {
0xff, 0x54, 0x24, 0x10, /* call *SIGF_HANDLER(%esp) */
0x8d, 0x44, 0x24, 0x14, /* lea SIGF_UC(%esp),%eax */
0x50, /* pushl %eax */
0xf7, 0x40, 0x54, 0x00, 0x00, 0x02, 0x02, /* testl $PSL_VM,UC_EFLAGS(%eax) */
0x75, 0x03, /* jne 9f */
0x8e, 0x68, 0x14, /* movl UC_GS(%eax),%gs */
0xb8, 0x57, 0x01, 0x00, 0x00, /* 9: movl $SYS_sigreturn,%eax */
0x50, /* pushl %eax */
0xcd, 0x80, /* int $0x80 */
0xeb, 0xfe, /* 0: jmp 0b */
0
};
static int ia32_szsigcode = sizeof(ia32_sigcode);
struct sysentvec ia32_freebsd_sysvec = {
SYS_MAXSYSCALL,
ia32_sysent,
0,
0,
NULL,
0,
NULL,
NULL,
elf32_freebsd_fixup,
sendsig,
ia32_sigcode,
&ia32_szsigcode,
NULL,
"FreeBSD ELF",
elf32_coredump,
NULL,
IA32_MINSIGSTKSZ,
IA32_PAGE_SIZE,
0,
IA32_USRSTACK,
IA32_USRSTACK,
IA32_PS_STRINGS,
VM_PROT_ALL,
ia32_copyout_strings,
ia32_setregs,
NULL
};
static Elf32_Brandinfo ia32_brand_info = {
ELFOSABI_FREEBSD,
EM_386,
"FreeBSD",
"/compat/ia32",
"/lib/ld-elf.so.1",
&ia32_freebsd_sysvec
};
SYSINIT(ia32, SI_SUB_EXEC, SI_ORDER_ANY,
(sysinit_cfunc_t) elf32_insert_brand_entry,
&ia32_brand_info);
static register_t *
ia32_copyout_strings(struct image_params *imgp)
{
int argc, envc;
u_int32_t *vectp;
char *stringp, *destp;
u_int32_t *stack_base;
struct ia32_ps_strings *arginfo;
int szsigcode;
/*
* Calculate string base and vector table pointers.
* Also deal with signal trampoline code for this exec type.
*/
arginfo = (struct ia32_ps_strings *)IA32_PS_STRINGS;
szsigcode = *(imgp->proc->p_sysent->sv_szsigcode);
destp = (caddr_t)arginfo - szsigcode - IA32_USRSPACE -
roundup((ARG_MAX - imgp->stringspace), sizeof(char *));
/*
* install sigcode
*/
if (szsigcode)
copyout(imgp->proc->p_sysent->sv_sigcode,
((caddr_t)arginfo - szsigcode), szsigcode);
/*
* If we have a valid auxargs ptr, prepare some room
* on the stack.
*/
if (imgp->auxargs) {
/*
* 'AT_COUNT*2' is size for the ELF Auxargs data. This is for
* lower compatibility.
*/
imgp->auxarg_size = (imgp->auxarg_size) ? imgp->auxarg_size
: (AT_COUNT * 2);
/*
* The '+ 2' is for the null pointers at the end of each of
* the arg and env vector sets,and imgp->auxarg_size is room
* for argument of Runtime loader.
*/
vectp = (u_int32_t *) (destp - (imgp->argc + imgp->envc + 2 +
imgp->auxarg_size) * sizeof(u_int32_t));
} else
/*
* The '+ 2' is for the null pointers at the end of each of
* the arg and env vector sets
*/
vectp = (u_int32_t *)
(destp - (imgp->argc + imgp->envc + 2) * sizeof(u_int32_t));
/*
* vectp also becomes our initial stack base
*/
vectp = (void*)((uintptr_t)vectp & ~15);
stack_base = vectp;
stringp = imgp->stringbase;
argc = imgp->argc;
envc = imgp->envc;
/*
* Copy out strings - arguments and environment.
*/
copyout(stringp, destp, ARG_MAX - imgp->stringspace);
/*
* Fill in "ps_strings" struct for ps, w, etc.
*/
suword32(&arginfo->ps_argvstr, (u_int32_t)(intptr_t)vectp);
suword32(&arginfo->ps_nargvstr, argc);
/*
* Fill in argument portion of vector table.
*/
for (; argc > 0; --argc) {
suword32(vectp++, (u_int32_t)(intptr_t)destp);
while (*stringp++ != 0)
destp++;
destp++;
}
/* a null vector table pointer separates the argp's from the envp's */
suword32(vectp++, 0);
suword32(&arginfo->ps_envstr, (u_int32_t)(intptr_t)vectp);
suword32(&arginfo->ps_nenvstr, envc);
/*
* Fill in environment portion of vector table.
*/
for (; envc > 0; --envc) {
suword32(vectp++, (u_int32_t)(intptr_t)destp);
while (*stringp++ != 0)
destp++;
destp++;
}
/* end of vector table is a null pointer */
suword32(vectp, 0);
return ((register_t *)stack_base);
}
static void
ia32_setregs(struct thread *td, u_long entry, u_long stack, u_long ps_strings)
{
struct trapframe *tf = td->td_frame;
vm_offset_t gdt, ldt;
u_int64_t codesel, datasel, ldtsel;
u_int64_t codeseg, dataseg, gdtseg, ldtseg;
struct segment_descriptor desc;
struct vmspace *vmspace = td->td_proc->p_vmspace;
exec_setregs(td, entry, stack, ps_strings);
/* Non-syscall frames are cleared by exec_setregs() */
if (tf->tf_flags & FRAME_SYSCALL) {
bzero(&tf->tf_scratch, sizeof(tf->tf_scratch));
bzero(&tf->tf_scratch_fp, sizeof(tf->tf_scratch_fp));
} else
tf->tf_special.ndirty = 0;
tf->tf_special.psr |= IA64_PSR_IS;
tf->tf_special.sp = stack;
/* Point the RSE backstore to something harmless. */
tf->tf_special.bspstore = (IA32_PS_STRINGS - ia32_szsigcode -
IA32_USRSPACE + 15) & ~15;
codesel = LSEL(LUCODE_SEL, SEL_UPL);
datasel = LSEL(LUDATA_SEL, SEL_UPL);
ldtsel = GSEL(GLDT_SEL, SEL_UPL);
/* Setup ia32 segment registers. */
tf->tf_scratch.gr16 = (datasel << 48) | (datasel << 32) |
(datasel << 16) | datasel;
tf->tf_scratch.gr17 = (ldtsel << 32) | (datasel << 16) | codesel;
/*
* Build the GDT and LDT.
*/
gdt = IA32_USRSTACK;
vm_map_find(&vmspace->vm_map, 0, 0, &gdt, IA32_PAGE_SIZE << 1, 0,
VM_PROT_ALL, VM_PROT_ALL, 0);
ldt = gdt + IA32_PAGE_SIZE;
desc.sd_lolimit = 8*NLDT-1;
desc.sd_lobase = ldt & 0xffffff;
desc.sd_type = SDT_SYSLDT;
desc.sd_dpl = SEL_UPL;
desc.sd_p = 1;
desc.sd_hilimit = 0;
desc.sd_def32 = 0;
desc.sd_gran = 0;
desc.sd_hibase = ldt >> 24;
copyout(&desc, (caddr_t) gdt + 8*GLDT_SEL, sizeof(desc));
desc.sd_lolimit = ((IA32_USRSTACK >> 12) - 1) & 0xffff;
desc.sd_lobase = 0;
desc.sd_type = SDT_MEMERA;
desc.sd_dpl = SEL_UPL;
desc.sd_p = 1;
desc.sd_hilimit = ((IA32_USRSTACK >> 12) - 1) >> 16;
desc.sd_def32 = 1;
desc.sd_gran = 1;
desc.sd_hibase = 0;
copyout(&desc, (caddr_t) ldt + 8*LUCODE_SEL, sizeof(desc));
desc.sd_type = SDT_MEMRWA;
copyout(&desc, (caddr_t) ldt + 8*LUDATA_SEL, sizeof(desc));
codeseg = 0 /* base */
+ (((IA32_USRSTACK >> 12) - 1) << 32) /* limit */
+ ((long)SDT_MEMERA << 52)
+ ((long)SEL_UPL << 57)
+ (1L << 59) /* present */
+ (1L << 62) /* 32 bits */
+ (1L << 63); /* page granularity */
dataseg = 0 /* base */
+ (((IA32_USRSTACK >> 12) - 1) << 32) /* limit */
+ ((long)SDT_MEMRWA << 52)
+ ((long)SEL_UPL << 57)
+ (1L << 59) /* present */
+ (1L << 62) /* 32 bits */
+ (1L << 63); /* page granularity */
tf->tf_scratch.csd = codeseg;
tf->tf_scratch.ssd = dataseg;
tf->tf_scratch.gr24 = dataseg; /* ESD */
tf->tf_scratch.gr27 = dataseg; /* DSD */
tf->tf_scratch.gr28 = dataseg; /* FSD */
tf->tf_scratch.gr29 = dataseg; /* GSD */
gdtseg = gdt /* base */
+ ((8L*NGDT - 1) << 32) /* limit */
+ ((long)SDT_SYSNULL << 52)
+ ((long)SEL_UPL << 57)
+ (1L << 59) /* present */
+ (0L << 62) /* 16 bits */
+ (0L << 63); /* byte granularity */
ldtseg = ldt /* base */
+ ((8L*NLDT - 1) << 32) /* limit */
+ ((long)SDT_SYSLDT << 52)
+ ((long)SEL_UPL << 57)
+ (1L << 59) /* present */
+ (0L << 62) /* 16 bits */
+ (0L << 63); /* byte granularity */
tf->tf_scratch.gr30 = ldtseg; /* LDTD */
tf->tf_scratch.gr31 = gdtseg; /* GDTD */
/* Set ia32 control registers on this processor. */
ia64_set_cflg(CR0_PE | CR0_PG | ((long)(CR4_XMM | CR4_FXSR) << 32));
ia64_set_eflag(PSL_USER);
/* PS_STRINGS value for BSD/OS binaries. It is 0 for non-BSD/OS. */
tf->tf_scratch.gr11 = IA32_PS_STRINGS;
/*
* XXX - Linux emulator
* Make sure sure edx is 0x0 on entry. Linux binaries depend
* on it.
*/
td->td_retval[1] = 0;
}
void
ia32_restorectx(struct pcb *pcb)
{
ia64_set_cflg(pcb->pcb_ia32_cflg);
ia64_set_eflag(pcb->pcb_ia32_eflag);
ia64_set_fcr(pcb->pcb_ia32_fcr);
ia64_set_fdr(pcb->pcb_ia32_fdr);
ia64_set_fir(pcb->pcb_ia32_fir);
ia64_set_fsr(pcb->pcb_ia32_fsr);
}
void
ia32_savectx(struct pcb *pcb)
{
pcb->pcb_ia32_cflg = ia64_get_cflg();
pcb->pcb_ia32_eflag = ia64_get_eflag();
pcb->pcb_ia32_fcr = ia64_get_fcr();
pcb->pcb_ia32_fdr = ia64_get_fdr();
pcb->pcb_ia32_fir = ia64_get_fir();
pcb->pcb_ia32_fsr = ia64_get_fsr();
}

View File

@ -1,92 +0,0 @@
/*-
* Copyright (c) 1998-1999 Andrew Gallatin
* All rights reserved.
*
* 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
* in this position and unchanged.
* 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.
* 3. The name of the author may not be used to endorse or promote products
* derived from this software withough specific prior written permission
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 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.
*
* $FreeBSD$
*/
#include <vm/vm.h>
#include <vm/vm_param.h>
#include <vm/pmap.h>
#include <sys/exec.h>
#include <sys/sysent.h>
#include <sys/cdefs.h>
struct ia32_ps_strings {
u_int32_t ps_argvstr; /* first of 0 or more argument strings */
int ps_nargvstr; /* the number of argument strings */
u_int32_t ps_envstr; /* first of 0 or more environment strings */
int ps_nenvstr; /* the number of environment strings */
};
#define IA32_MINSIGSTKSZ 2048
#define IA32_PAGE_SIZE 4096
#define IA32_USRSTACK (2L*1024*1024*1024 - IA32_PAGE_SIZE*2)
#define IA32_PS_STRINGS (IA32_USRSTACK - sizeof(struct ia32_ps_strings))
#define IA32_USRSPACE IA32_PAGE_SIZE
static __inline caddr_t stackgap_init(void);
static __inline void *stackgap_alloc(caddr_t *, size_t);
static __inline caddr_t
stackgap_init()
{
#define szsigcode (*(curproc->p_sysent->sv_szsigcode))
return (((caddr_t)IA32_PS_STRINGS) - szsigcode - IA32_USRSPACE);
#undef szsigcode
}
static __inline void *
stackgap_alloc(sgp, sz)
caddr_t *sgp;
size_t sz;
{
void *p;
p = (void *) *sgp;
*sgp += ALIGN(sz);
return p;
}
extern const char ia32_emul_path[];
int ia32_emul_find(struct thread *, caddr_t *, const char *, char *,
char **, int);
#define CHECKALT(p, sgp, path, i) \
do { \
int _error; \
\
_error = ia32_emul_find(p, sgp, ia32_emul_path, path, \
&path, i); \
if (_error == EFAULT) \
return (_error); \
} while (0)
#define CHECKALTEXIST(p, sgp, path) CHECKALT((p), (sgp), (path), 0)
#define CHECKALTCREAT(p, sgp, path) CHECKALT((p), (sgp), (path), 1)

View File

@ -1,12 +0,0 @@
# $FreeBSD$
sysnames="/dev/null"
sysproto="ia32_proto.h"
sysproto_h=_IA32_SYSPROTO_H_
syshdr="ia32_syscall.h"
syssw="ia32_sysent.c"
sysmk="/dev/null"
syshide="/dev/null"
syscallprefix="IA32_SYS_"
switchname="ia32_sysent"
namesname="ia32_syscallnames"
sysvec="\n"

View File

@ -1,611 +0,0 @@
$FreeBSD$
; from: @(#)syscalls.master 8.2 (Berkeley) 1/13/94
; from: src/sys/kern/syscalls.master 1.107
;
; System call name/number master file.
; Processed to created init_sysent.c, syscalls.c and syscall.h.
; Columns: number [M]type nargs namespc name alt{name,tag,rtyp}/comments
; number system call number, must be in order
; type one of [M]STD, [M]OBSOL, [M]UNIMPL, [M]COMPAT, [M]CPT_NOA,
; [M]LIBCOMPAT, [M]NODEF, [M]NOARGS, [M]NOPROTO, [M]NOIMPL,
; [M]NOSTD
; namespc one of POSIX, BSD, NOHIDE
; name psuedo-prototype of syscall routine
; If one of the following alts is different, then all appear:
; altname name of system call if different
; alttag name of args struct tag if different from [o]`name'"_args"
; altrtyp return type if not int (bogus - syscalls always return int)
; for UNIMPL/OBSOL, name continues with comments
; types:
; [M] e.g. like MSTD -- means the system call is MP-safe. If no
; M prefix is used, the syscall wrapper will obtain the Giant
; lock for the syscall.
; STD always included
; COMPAT included on COMPAT #ifdef
; LIBCOMPAT included on COMPAT #ifdef, and placed in syscall.h
; OBSOL obsolete, not included in system, only specifies name
; UNIMPL not implemented, placeholder only
; NOSTD implemented but as a lkm that can be statically
; compiled in sysent entry will be filled with lkmsys
; so the SYSCALL_MODULE macro works
; #ifdef's, etc. may be included, and are copied to the output files.
#include <sys/param.h>
#include <sys/sysent.h>
#include <sys/sysproto.h>
#include <sys/mount.h>
#include <ia64/ia32/ia32.h>
#include <ia64/ia32/ia32_proto.h>
; Reserved/unimplemented system calls in the range 0-150 inclusive
; are reserved for use in future Berkeley releases.
; Additional system calls implemented in vendor and other
; redistributions should be placed in the reserved range at the end
; of the current calls.
0 MNOPROTO NOHIDE { int nosys(void); } syscall nosys_args int
1 MNOPROTO NOHIDE { void sys_exit(int rval); } exit sys_exit_args void
2 MNOPROTO POSIX { int fork(void); }
3 MNOPROTO POSIX { ssize_t read(int fd, void *buf, size_t nbyte); }
4 MNOPROTO POSIX { ssize_t write(int fd, const void *buf, size_t nbyte); }
5 STD POSIX { int ia32_open(char *path, int flags, int mode); }
; XXX should be { int open(const char *path, int flags, ...); }
; but we're not ready for `const' or varargs.
; XXX man page says `mode_t mode'.
6 MNOPROTO POSIX { int close(int fd); }
7 MSTD BSD { int ia32_wait4(int pid, int *status, int options, \
struct rusage32 *rusage); }
8 OBSOL BSD old creat
9 NOPROTO POSIX { int link(char *path, char *link); }
10 NOPROTO POSIX { int unlink(char *path); }
11 OBSOL NOHIDE execv
12 NOPROTO POSIX { int chdir(char *path); }
13 NOPROTO BSD { int fchdir(int fd); }
14 NOPROTO POSIX { int mknod(char *path, int mode, int dev); }
15 NOPROTO POSIX { int chmod(char *path, int mode); }
16 NOPROTO POSIX { int chown(char *path, int uid, int gid); }
17 MNOPROTO BSD { int obreak(char *nsize); } break obreak_args int
18 STD BSD { int ia32_getfsstat(struct statfs32 *buf, \
long bufsize, int flags); }
19 OBSOL POSIX olseek
20 MNOPROTO POSIX { pid_t getpid(void); }
21 NOPROTO BSD { int mount(char *type, char *path, int flags, \
caddr_t data); }
; XXX `path' should have type `const char *' but we're not ready for that.
22 NOPROTO BSD { int unmount(char *path, int flags); }
23 MNOPROTO POSIX { int setuid(uid_t uid); }
24 MNOPROTO POSIX { uid_t getuid(void); }
25 MNOPROTO POSIX { uid_t geteuid(void); }
26 MNOPROTO BSD { int ptrace(int req, pid_t pid, caddr_t addr, \
int data); }
27 UNIMPL BSD recvmsg
28 MNOPROTO BSD { int sendmsg(int s, caddr_t msg, int flags); }
29 MNOPROTO BSD { int recvfrom(int s, caddr_t buf, size_t len, \
int flags, caddr_t from, int *fromlenaddr); }
30 MNOPROTO BSD { int accept(int s, caddr_t name, int *anamelen); }
31 MNOPROTO BSD { int getpeername(int fdes, caddr_t asa, int *alen); }
32 MNOPROTO BSD { int getsockname(int fdes, caddr_t asa, int *alen); }
33 STD POSIX { int ia32_access(char *path, int flags); }
34 STD BSD { int ia32_chflags(char *path, int flags); }
35 NOPROTO BSD { int fchflags(int fd, int flags); }
36 NOPROTO BSD { int sync(void); }
37 MNOPROTO POSIX { int kill(int pid, int signum); }
38 UNIMPL POSIX ostat
39 MNOPROTO POSIX { pid_t getppid(void); }
40 UNIMPL POSIX olstat
41 MNOPROTO POSIX { int dup(u_int fd); }
42 MNOPROTO POSIX { int pipe(void); }
43 MNOPROTO POSIX { gid_t getegid(void); }
44 MNOPROTO BSD { int profil(caddr_t samples, size_t size, \
size_t offset, u_int scale); }
45 MNOPROTO BSD { int ktrace(const char *fname, int ops, int facs, \
int pid); }
46 UNIMPL POSIX osigaction
47 MNOPROTO POSIX { gid_t getgid(void); }
48 UNIMPL POSIX osigprocmask
49 MNOPROTO BSD { int getlogin(char *namebuf, u_int namelen); }
50 MNOPROTO BSD { int setlogin(char *namebuf); }
51 MNOPROTO BSD { int acct(char *path); }
52 MNOPROTO POSIX { int sigpending(void); }
53 MSTD BSD { int ia32_sigaltstack(struct sigaltstack32 *ss, struct sigaltstack32 *oss); }
54 MNOPROTO POSIX { int ioctl(int fd, u_long com, caddr_t data); }
55 MNOPROTO BSD { int reboot(int opt); }
56 NOPROTO POSIX { int revoke(char *path); }
57 NOPROTO POSIX { int symlink(char *path, char *link); }
58 NOPROTO POSIX { int readlink(char *path, char *buf, int count); }
59 STD POSIX { int ia32_execve(char *fname, u_int32_t *argv, u_int32_t *envv); }
60 MNOPROTO POSIX { int umask(int newmask); } umask umask_args int
61 NOPROTO BSD { int chroot(char *path); }
62 OBSOL POSIX ofstat
63 OBSOL BSD ogetkerninfo
64 OBSOL BSD ogetpagesize
65 OBSOL BSD omsync
66 OBSOL BSD ovfork
67 OBSOL NOHIDE vread
68 OBSOL NOHIDE vwrite
69 MNOPROTO BSD { int sbrk(int incr); }
70 MNOPROTO BSD { int sstk(int incr); }
71 OBSOL BSD ommap
72 MNOPROTO BSD { int ovadvise(int anom); } vadvise ovadvise_args int
73 MNOPROTO BSD { int munmap(void *addr, size_t len); }
74 MNOPROTO BSD { int mprotect(const void *addr, size_t len, int prot); }
75 MNOPROTO BSD { int madvise(void *addr, size_t len, int behav); }
76 OBSOL NOHIDE vhangup
77 OBSOL NOHIDE vlimit
78 MNOPROTO BSD { int mincore(const void *addr, size_t len, \
char *vec); }
79 MNOPROTO POSIX { int getgroups(u_int gidsetsize, gid_t *gidset); }
80 MNOPROTO POSIX { int setgroups(u_int gidsetsize, gid_t *gidset); }
81 MNOPROTO POSIX { int getpgrp(void); }
82 MNOPROTO POSIX { int setpgid(int pid, int pgid); }
83 STD BSD { int ia32_setitimer(u_int which, \
struct itimerval32 *itv, \
struct itimerval32 *oitv); }
84 OBSOL BSD owait
85 OBSOL BSD oswapon
86 OBSOL BSD ogetitimer
87 OBSOL BSD ogethostname
88 OBSOL BSD osethostname
89 MNOPROTO BSD { int getdtablesize(void); }
90 MNOPROTO POSIX { int dup2(u_int from, u_int to); }
91 UNIMPL BSD getdopt
92 MNOPROTO POSIX { int fcntl(int fd, int cmd, long arg); }
; XXX should be { int fcntl(int fd, int cmd, ...); }
; but we're not ready for varargs.
; XXX man page says `int arg' too.
93 STD BSD { int ia32_select(int nd, fd_set *in, fd_set *ou, \
fd_set *ex, struct timeval32 *tv); }
; XXX need to override for big-endian - little-endian should work fine.
94 UNIMPL BSD setdopt
95 NOPROTO POSIX { int fsync(int fd); }
96 MNOPROTO BSD { int setpriority(int which, int who, int prio); }
97 MNOPROTO BSD { int socket(int domain, int type, int protocol); }
98 MNOPROTO BSD { int connect(int s, caddr_t name, int namelen); }
99 MNOPROTO BSD { int accept(int s, caddr_t name, int *anamelen); } \
accept accept_args int
100 MNOPROTO BSD { int getpriority(int which, int who); }
101 OBSOL BSD osend
102 OBSOL BSD orecv
103 OBSOL BSD osigreturn
104 MNOPROTO BSD { int bind(int s, caddr_t name, int namelen); }
105 MNOPROTO BSD { int setsockopt(int s, int level, int name, \
caddr_t val, int valsize); }
106 MNOPROTO BSD { int listen(int s, int backlog); }
107 OBSOL NOHIDE vtimes
108 OBSOL BSD osigvec
109 OBSOL BSD osigblock
110 OBSOL BSD osigsetmask
111 OBSOL POSIX osigsuspend
112 OBSOL BSD osigstack
113 OBSOL BSD orecvmsg
114 OBSOL BSD osendmsg
115 OBSOL NOHIDE vtrace
116 STD BSD { int ia32_gettimeofday(struct timeval32 *tp, \
struct timezone *tzp); }
117 STD BSD { int ia32_getrusage(int who, struct rusage32 *rusage); }
118 MNOPROTO BSD { int getsockopt(int s, int level, int name, \
caddr_t val, int *avalsize); }
119 UNIMPL NOHIDE resuba (BSD/OS 2.x)
120 STD BSD { int ia32_readv(int fd, struct iovec32 *iovp, u_int iovcnt); }
121 STD BSD { int ia32_writev(int fd, struct iovec32 *iovp, \
u_int iovcnt); }
122 STD BSD { int ia32_settimeofday(struct timeval32 *tv, \
struct timezone *tzp); }
123 NOPROTO BSD { int fchown(int fd, int uid, int gid); }
124 NOPROTO BSD { int fchmod(int fd, int mode); }
125 MNOPROTO BSD { int recvfrom(int s, caddr_t buf, size_t len, \
int flags, caddr_t from, int *fromlenaddr); } \
recvfrom recvfrom_args int
126 MNOPROTO BSD { int setreuid(int ruid, int euid); }
127 MNOPROTO BSD { int setregid(int rgid, int egid); }
128 NOPROTO POSIX { int rename(char *from, char *to); }
129 OBSOL BSD otruncate
130 OBSOL BSD ftruncate
131 MNOPROTO BSD { int flock(int fd, int how); }
132 NOPROTO POSIX { int mkfifo(char *path, int mode); }
133 MNOPROTO BSD { int sendto(int s, caddr_t buf, size_t len, \
int flags, caddr_t to, int tolen); }
134 MNOPROTO BSD { int shutdown(int s, int how); }
135 MNOPROTO BSD { int socketpair(int domain, int type, int protocol, \
int *rsv); }
136 NOPROTO POSIX { int mkdir(char *path, int mode); }
137 NOPROTO POSIX { int rmdir(char *path); }
138 STD BSD { int ia32_utimes(char *path, \
struct timeval32 *tptr); }
139 OBSOL NOHIDE 4.2 sigreturn
140 STD BSD { int ia32_adjtime(struct timeval32 *delta, \
struct timeval32 *olddelta); }
141 OBSOL BSD ogetpeername
142 OBSOL BSD ogethostid
143 OBSOL BSD sethostid
144 OBSOL BSD getrlimit
145 OBSOL BSD setrlimit
146 OBSOL BSD killpg
147 MNOPROTO POSIX { int setsid(void); }
148 NOPROTO BSD { int quotactl(char *path, int cmd, int uid, \
caddr_t arg); }
149 OBSOL BSD oquota
150 OBSOL BSD ogetsockname
; Syscalls 151-180 inclusive are reserved for vendor-specific
; system calls. (This includes various calls added for compatibity
; with other Unix variants.)
; Some of these calls are now supported by BSD...
151 UNIMPL NOHIDE sem_lock (BSD/OS 2.x)
152 UNIMPL NOHIDE sem_wakeup (BSD/OS 2.x)
153 UNIMPL NOHIDE asyncdaemon (BSD/OS 2.x)
154 UNIMPL NOHIDE nosys
; 155 is initialized by the NFS code, if present.
155 UNIMPL NOHIDE nfssvc
156 NOPROTO BSD { int getdirentries(int fd, char *buf, u_int count, \
long *basep); }
157 STD BSD { int ia32_statfs(char *path, struct statfs32 *buf); }
158 STD BSD { int ia32_fstatfs(int fd, struct statfs32 *buf); }
159 UNIMPL NOHIDE nosys
160 UNIMPL NOHIDE nosys
161 NOPROTO BSD { int getfh(char *fname, struct fhandle *fhp); }
162 MNOPROTO BSD { int getdomainname(char *domainname, int len); }
163 MNOPROTO BSD { int setdomainname(char *domainname, int len); }
164 MNOPROTO BSD { int uname(struct utsname *name); }
165 MNOPROTO BSD { int sysarch(int op, char *parms); }
166 MNOPROTO BSD { int rtprio(int function, pid_t pid, \
struct rtprio *rtp); }
167 UNIMPL NOHIDE nosys
168 UNIMPL NOHIDE nosys
169 STD BSD { int ia32_semsys(int which, int a2, int a3, int a4, \
int a5); }
170 STD BSD { int ia32_msgsys(int which, int a2, int a3, int a4, \
int a5, int a6); }
171 STD BSD { int ia32_shmsys(int which, int a2, int a3, int a4); }
172 UNIMPL NOHIDE nosys
173 STD POSIX { ssize_t ia32_pread(int fd, void *buf, size_t nbyte, \
int pad, u_int32_t offsetlo, u_int32_t offsethi); }
; XXX note - bigendian is different
174 STD POSIX { ssize_t ia32_pwrite(int fd, const void *buf, \
size_t nbyte, int pad, u_int32_t offsetlo, \
u_int32_t offsethi); }
; XXX note - bigendian is different
175 UNIMPL NOHIDE nosys
176 MNOPROTO BSD { int ntp_adjtime(struct timex *tp); }
177 UNIMPL NOHIDE sfork (BSD/OS 2.x)
178 UNIMPL NOHIDE getdescriptor (BSD/OS 2.x)
179 UNIMPL NOHIDE setdescriptor (BSD/OS 2.x)
180 UNIMPL NOHIDE nosys
; Syscalls 181-199 are used by/reserved for BSD
181 MNOPROTO POSIX { int setgid(gid_t gid); }
182 MNOPROTO BSD { int setegid(gid_t egid); }
183 MNOPROTO BSD { int seteuid(uid_t euid); }
184 UNIMPL BSD lfs_bmapv
185 UNIMPL BSD lfs_markv
186 UNIMPL BSD lfs_segclean
187 UNIMPL BSD lfs_segwait
188 STD POSIX { int ia32_stat(char *path, struct stat32 *ub); }
189 STD POSIX { int ia32_fstat(int fd, struct stat32 *ub); }
190 STD POSIX { int ia32_lstat(char *path, struct stat32 *ub); }
191 NOPROTO POSIX { int pathconf(char *path, int name); }
192 MNOPROTO POSIX { int fpathconf(int fd, int name); }
193 UNIMPL NOHIDE nosys
194 MNOPROTO BSD { int getrlimit(u_int which, \
struct rlimit *rlp); } \
getrlimit __getrlimit_args int
195 MNOPROTO BSD { int setrlimit(u_int which, \
struct rlimit *rlp); } \
setrlimit __setrlimit_args int
196 NOPROTO BSD { int getdirentries(int fd, char *buf, u_int count, \
long *basep); }
197 STD BSD { caddr_t ia32_mmap(caddr_t addr, size_t len, \
int prot, int flags, int fd, int pad, \
u_int32_t poslo, u_int32_t poshi); }
198 NOPROTO NOHIDE { int nosys(void); } __syscall __syscall_args int
; XXX note - bigendian is different
199 STD POSIX { off_t ia32_lseek(int fd, int pad, \
u_int32_t offsetlo, u_int32_t offsethi, \
int whence); }
; XXX note - bigendian is different
200 STD BSD { int ia32_truncate(char *path, int pad, \
u_int32_t lengthlo, u_int32_t lengthhi); }
; XXX note - bigendian is different
201 STD BSD { int ia32_ftruncate(int fd, int pad, \
u_int32_t lengthlo, u_int32_t lengthhi); }
202 MSTD BSD { int ia32_sysctl(int *name, u_int namelen, \
void *old, u_int32_t *oldlenp, void *new, \
u_int32_t newlen); }
203 MNOPROTO BSD { int mlock(const void *addr, size_t len); }
204 MNOPROTO BSD { int munlock(const void *addr, size_t len); }
205 NOPROTO BSD { int undelete(char *path); }
206 NOPROTO BSD { int futimes(int fd, struct timeval *tptr); }
207 MNOPROTO BSD { int getpgid(pid_t pid); }
208 UNIMPL NOHIDE newreboot (NetBSD)
209 MNOPROTO BSD { int poll(struct pollfd *fds, u_int nfds, \
int timeout); }
;
; The following are reserved for loadable syscalls
;
210 UNIMPL NOHIDE
211 UNIMPL NOHIDE
212 UNIMPL NOHIDE
213 UNIMPL NOHIDE
214 UNIMPL NOHIDE
215 UNIMPL NOHIDE
216 UNIMPL NOHIDE
217 UNIMPL NOHIDE
218 UNIMPL NOHIDE
219 UNIMPL NOHIDE
;
; The following were introduced with NetBSD/4.4Lite-2
; They are initialized by thier respective modules/sysinits
220 MNOPROTO BSD { int __semctl(int semid, int semnum, int cmd, \
union semun *arg); }
221 MNOPROTO BSD { int semget(key_t key, int nsems, int semflg); }
222 MNOPROTO BSD { int semop(int semid, struct sembuf *sops, \
u_int nsops); }
223 UNIMPL NOHIDE semconfig
224 MNOPROTO BSD { int msgctl(int msqid, int cmd, \
struct msqid_ds *buf); }
225 MNOPROTO BSD { int msgget(key_t key, int msgflg); }
226 MNOPROTO BSD { int msgsnd(int msqid, void *msgp, size_t msgsz, \
int msgflg); }
227 MNOPROTO BSD { int msgrcv(int msqid, void *msgp, size_t msgsz, \
long msgtyp, int msgflg); }
228 MNOPROTO BSD { int shmat(int shmid, void *shmaddr, int shmflg); }
229 MNOPROTO BSD { int shmctl(int shmid, int cmd, \
struct shmid_ds *buf); }
230 MNOPROTO BSD { int shmdt(void *shmaddr); }
231 MNOPROTO BSD { int shmget(key_t key, int size, int shmflg); }
;
232 MNOPROTO POSIX { int clock_gettime(clockid_t clock_id, \
struct timespec *tp); }
233 MNOPROTO POSIX { int clock_settime(clockid_t clock_id, \
const struct timespec *tp); }
234 MNOPROTO POSIX { int clock_getres(clockid_t clock_id, \
struct timespec *tp); }
235 UNIMPL NOHIDE timer_create
236 UNIMPL NOHIDE timer_delete
237 UNIMPL NOHIDE timer_settime
238 UNIMPL NOHIDE timer_gettime
239 UNIMPL NOHIDE timer_getoverrun
240 MNOPROTO POSIX { int nanosleep(const struct timespec *rqtp, \
struct timespec *rmtp); }
241 UNIMPL NOHIDE nosys
242 UNIMPL NOHIDE nosys
243 UNIMPL NOHIDE nosys
244 UNIMPL NOHIDE nosys
245 UNIMPL NOHIDE nosys
246 UNIMPL NOHIDE nosys
247 UNIMPL NOHIDE nosys
248 UNIMPL NOHIDE nosys
249 UNIMPL NOHIDE nosys
; syscall numbers initially used in OpenBSD
250 MNOPROTO BSD { int minherit(void *addr, size_t len, int inherit); }
251 MNOPROTO BSD { int rfork(int flags); }
252 MNOPROTO BSD { int openbsd_poll(struct pollfd *fds, u_int nfds, \
int timeout); }
253 MNOPROTO BSD { int issetugid(void); }
254 NOPROTO BSD { int lchown(char *path, int uid, int gid); }
255 UNIMPL NOHIDE nosys
256 UNIMPL NOHIDE nosys
257 UNIMPL NOHIDE nosys
258 UNIMPL NOHIDE nosys
259 UNIMPL NOHIDE nosys
260 UNIMPL NOHIDE nosys
261 UNIMPL NOHIDE nosys
262 UNIMPL NOHIDE nosys
263 UNIMPL NOHIDE nosys
264 UNIMPL NOHIDE nosys
265 UNIMPL NOHIDE nosys
266 UNIMPL NOHIDE nosys
267 UNIMPL NOHIDE nosys
268 UNIMPL NOHIDE nosys
269 UNIMPL NOHIDE nosys
270 UNIMPL NOHIDE nosys
271 UNIMPL NOHIDE nosys
272 NOPROTO BSD { int getdents(int fd, char *buf, size_t count); }
273 UNIMPL NOHIDE nosys
274 NOPROTO BSD { int lchmod(char *path, mode_t mode); }
275 NOPROTO BSD { int lchown(char *path, uid_t uid, gid_t gid); } netbsd_lchown lchown_args int
276 NOPROTO BSD { int lutimes(char *path, struct timeval *tptr); }
277 MNOPROTO BSD { int msync(void *addr, size_t len, int flags); } netbsd_msync msync_args int
278 NOPROTO BSD { int nstat(char *path, struct nstat *ub); }
279 MNOPROTO BSD { int nfstat(int fd, struct nstat *sb); }
280 NOPROTO BSD { int nlstat(char *path, struct nstat *ub); }
281 UNIMPL NOHIDE nosys
282 UNIMPL NOHIDE nosys
283 UNIMPL NOHIDE nosys
284 UNIMPL NOHIDE nosys
285 UNIMPL NOHIDE nosys
286 UNIMPL NOHIDE nosys
287 UNIMPL NOHIDE nosys
288 UNIMPL NOHIDE nosys
289 UNIMPL NOHIDE nosys
290 UNIMPL NOHIDE nosys
291 UNIMPL NOHIDE nosys
292 UNIMPL NOHIDE nosys
293 UNIMPL NOHIDE nosys
294 UNIMPL NOHIDE nosys
295 UNIMPL NOHIDE nosys
296 UNIMPL NOHIDE nosys
; XXX 297 is 300 in NetBSD
297 NOPROTO BSD { int fhstatfs(const struct fhandle *u_fhp, struct statfs *buf); }
298 NOPROTO BSD { int fhopen(const struct fhandle *u_fhp, int flags); }
299 NOPROTO BSD { int fhstat(const struct fhandle *u_fhp, struct stat *sb); }
; syscall numbers for FreeBSD
300 MNOPROTO BSD { int modnext(int modid); }
301 MNOPROTO BSD { int modstat(int modid, struct module_stat* stat); }
302 MNOPROTO BSD { int modfnext(int modid); }
303 MNOPROTO BSD { int modfind(const char *name); }
304 MNOPROTO BSD { int kldload(const char *file); }
305 MNOPROTO BSD { int kldunload(int fileid); }
306 MNOPROTO BSD { int kldfind(const char *file); }
307 MNOPROTO BSD { int kldnext(int fileid); }
308 MNOPROTO BSD { int kldstat(int fileid, struct kld_file_stat* stat); }
309 MNOPROTO BSD { int kldfirstmod(int fileid); }
310 MNOPROTO BSD { int getsid(pid_t pid); }
311 MNOPROTO BSD { int setresuid(uid_t ruid, uid_t euid, uid_t suid); }
312 MNOPROTO BSD { int setresgid(gid_t rgid, gid_t egid, gid_t sgid); }
313 OBSOL NOHIDE signanosleep
314 UNIMPL NOHIDE aio_return
315 UNIMPL NOHIDE aio_suspend
316 UNIMPL NOHIDE aio_cancel
317 UNIMPL NOHIDE aio_error
318 UNIMPL NOHIDE aio_read
319 UNIMPL NOHIDE aio_write
320 UNIMPL NOHIDE lio_listio
321 MNOPROTO BSD { int yield(void); }
322 OBSOL NOHIDE thr_sleep
323 OBSOL NOHIDE thr_wakeup
324 MNOPROTO BSD { int mlockall(int how); }
325 MNOPROTO BSD { int munlockall(void); }
326 NOPROTO BSD { int __getcwd(u_char *buf, u_int buflen); }
327 MNOPROTO POSIX { int sched_setparam (pid_t pid, const struct sched_param *param); }
328 MNOPROTO POSIX { int sched_getparam (pid_t pid, struct sched_param *param); }
329 MNOPROTO POSIX { int sched_setscheduler (pid_t pid, int policy, const struct sched_param *param); }
330 MNOPROTO POSIX { int sched_getscheduler (pid_t pid); }
331 MNOPROTO POSIX { int sched_yield (void); }
332 MNOPROTO POSIX { int sched_get_priority_max (int policy); }
333 MNOPROTO POSIX { int sched_get_priority_min (int policy); }
334 MNOPROTO POSIX { int sched_rr_get_interval (pid_t pid, struct timespec *interval); }
335 MNOPROTO BSD { int utrace(const void *addr, size_t len); }
; XXX note - bigendian is different
336 MCOMPAT4 BSD { int ia32_sendfile(int fd, int s, u_int32_t offsetlo,\
u_int32_t offsethi, size_t nbytes, \
struct sf_hdtr *hdtr, off_t *sbytes, int flags); }
337 NOPROTO BSD { int kldsym(int fileid, int cmd, void *data); }
338 MNOPROTO BSD { int jail(struct jail *jail); }
339 UNIMPL BSD pioctl
340 MNOPROTO POSIX { int sigprocmask(int how, const sigset_t *set, \
sigset_t *oset); }
341 MNOPROTO POSIX { int sigsuspend(const sigset_t *sigmask); }
342 MSTD POSIX { int ia32_sigaction(int sig, \
struct sigaction32 *act, \
struct sigaction32 *oact); }
343 MNOPROTO POSIX { int sigpending(sigset_t *set); }
344 MNOPROTO BSD { int sigreturn(const struct __ucontext *sigcntxp); }
345 UNIMPL NOHIDE sigtimedwait
346 UNIMPL NOHIDE sigwaitinfo
347 MNOPROTO BSD { int __acl_get_file(const char *path, \
acl_type_t type, struct acl *aclp); }
348 MNOPROTO BSD { int __acl_set_file(const char *path, \
acl_type_t type, struct acl *aclp); }
349 MNOPROTO BSD { int __acl_get_fd(int filedes, acl_type_t type, \
struct acl *aclp); }
350 MNOPROTO BSD { int __acl_set_fd(int filedes, acl_type_t type, \
struct acl *aclp); }
351 MNOPROTO BSD { int __acl_delete_file(const char *path, \
acl_type_t type); }
352 MNOPROTO BSD { int __acl_delete_fd(int filedes, acl_type_t type); }
353 MNOPROTO BSD { int __acl_aclcheck_file(const char *path, \
acl_type_t type, struct acl *aclp); }
354 MNOPROTO BSD { int __acl_aclcheck_fd(int filedes, acl_type_t type, \
struct acl *aclp); }
355 NOPROTO BSD { int extattrctl(const char *path, int cmd, \
const char *filename, int attrnamespace, \
const char *attrname); }
356 NOPROTO BSD { int extattr_set_file(const char *path, \
int attrnamespace, const char *attrname, \
void *data, size_t nbytes); }
357 NOPROTO BSD { ssize_t extattr_get_file(const char *path, \
int attrnamespace, const char *attrname, \
void *data, size_t nbytes); }
358 NOPROTO BSD { int extattr_delete_file(const char *path, \
int attrnamespace, const char *attrname); }
359 UNIMPL NOHIDE aio_waitcomplete
360 MNOPROTO BSD { int getresuid(uid_t *ruid, uid_t *euid, uid_t *suid); }
361 MNOPROTO BSD { int getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid); }
362 MNOPROTO BSD { int kqueue(void); }
363 MNOPROTO BSD { int kevent(int fd, \
const struct kevent *changelist, int nchanges, \
struct kevent *eventlist, int nevents, \
const struct timespec *timeout); }
364 UNIMPL NOHIDE __cap_get_proc
365 UNIMPL NOHIDE __cap_set_proc
366 UNIMPL NOHIDE __cap_get_fd
367 UNIMPL NOHIDE __cap_get_file
368 UNIMPL NOHIDE __cap_set_fd
369 UNIMPL NOHIDE __cap_set_file
370 UNIMPL NOHIDE lkmressys
371 NOPROTO BSD { int extattr_set_fd(int fd, int attrnamespace, \
const char *attrname, void *data, \
size_t nbytes); }
372 NOPROTO BSD { ssize_t extattr_get_fd(int fd, int attrnamespace, \
const char *attrname, void *data, size_t nbytes); }
373 NOPROTO BSD { int extattr_delete_fd(int fd, int attrnamespace, \
const char *attrname); }
374 MNOPROTO BSD { int __setugid(int flag); }
375 UNIMPL BSD nfsclnt
376 NOPROTO BSD { int eaccess(char *path, int flags); }
377 UNIMPL BSD afs_syscall
378 NOPROTO BSD { int nmount(struct iovec *iovp, unsigned int iovcnt, \
int flags); }
379 NOPROTO BSD { int kse_exit(void); }
380 NOPROTO BSD { int kse_wakeup(struct kse_mailbox *mbx); }
381 NOPROTO BSD { int kse_create(struct kse_mailbox *mbx, \
int newgroup); }
382 NOPROTO BSD { int kse_thr_interrupt(struct kse_thr_mailbox *tmbx); }
383 NOPROTO BSD { int kse_release(void); }
384 UNIMPL BSD __mac_get_proc
385 UNIMPL BSD __mac_set_proc
386 UNIMPL BSD __mac_get_fd
387 UNIMPL BSD __mac_get_file
388 UNIMPL BSD __mac_set_fd
389 UNIMPL BSD __mac_set_file
390 NOPROTO BSD { int kenv(int what, const char *name, char *value, \
int len); }
391 NOPROTO BSD { int lchflags(const char *path, int flags); }
392 NOPROTO BSD { int uuidgen(struct uuid *store, int count); }
393 MSTD BSD { int ia32_sendfile(int fd, int s, u_int32_t offsetlo, \
u_int32_t offsethi, size_t nbytes, \
struct sf_hdtr *hdtr, off_t *sbytes, int flags); }
394 UNIMPL NOHIDE mac_syscall
395 UNIMPL NOHIDE nosys
396 UNIMPL NOHIDE nosys
397 UNIMPL NOHIDE nosys
398 UNIMPL NOHIDE nosys
399 UNIMPL NOHIDE nosys
400 UNIMPL NOHIDE ksem_close
401 UNIMPL NOHIDE ksem_post
402 UNIMPL NOHIDE ksem_wait
403 UNIMPL NOHIDE ksem_trywait
404 UNIMPL NOHIDE ksem_init
405 UNIMPL NOHIDE ksem_open
406 UNIMPL NOHIDE ksem_unlink
407 UNIMPL NOHIDE ksem_getvalue
408 UNIMPL NOHIDE ksem_destroy
409 UNIMPL BSD __mac_get_pid
410 UNIMPL BSD __mac_get_link
411 UNIMPL BSD __mac_set_link
412 UNIMPL BSD extattr_set_link
413 UNIMPL BSD extattr_get_link
414 UNIMPL BSD extattr_delete_link
415 UNIMPL BSD __mac_execve
416 UNIMPL BSD newsigaction
417 UNIMPL BSD newsigreturn
418 UNIMPL BSD __xstat
419 UNIMPL BSD __xfstat
420 UNIMPL BSD __xlstat
421 UNIMPL BSD getcontext
422 UNIMPL BSD setcontext
423 UNIMPL BSD swapcontext
424 UNIMPL BSD swapoff
425 UNIMPL BSD __acl_get_link
426 UNIMPL BSD __acl_set_link
427 UNIMPL BSD __acl_delete_link
428 UNIMPL BSD __acl_aclcheck_link
429 UNIMPL NOHIDE sigwait
430 MNOPROTO BSD { int thr_create(ucontext_t *ctx, thr_id_t *id, \
int flag s); }
431 MNOPROTO BSD { void thr_exit(void); }
432 MNOPROTO BSD { int thr_self(thr_id_t *id); }
433 MNOPROTO BSD { int thr_kill(thr_id_t id, int sig); }
434 MNOPROTO BSD { int _umtx_lock(struct umtx *umtx); }
435 MNOPROTO BSD { int _umtx_unlock(struct umtx *umtx); }
436 MNOPROTO BSD { int jail_attach(int jid); }