1 $NetBSD: syscalls.master,v 1.6 2002/01/27 15:27:33 bjh21 Exp $ 2 3; Derived from sys/compat/linux/arch/*/syscalls.master 4; and from Linux 2.4.12 arch/arm/kernel/calls.S 5 6; NetBSD/arm COMPAT_LINUX system call name/number "master" file. 7; (See syscalls.conf to see what it is processed into.) 8; 9; Fields: number type [type-dependent ...] 10; number system call number, must be in order 11; type one of STD, OBSOL, UNIMPL, NODEF, NOARGS, or one of 12; the compatibility options defined in syscalls.conf. 13; 14; types: 15; STD always included 16; OBSOL obsolete, not included in system 17; UNIMPL unimplemented, not included in system 18; NODEF included, but don't define the syscall number 19; NOARGS included, but don't define the syscall args structure 20; INDIR included, but don't define the syscall args structure 21; and allow it to be "really" varargs. 22; 23; The compat options are defined in the syscalls.conf file, and the 24; compat option name is prefixed to the syscall name. Other than 25; that, they're like NODEF (for 'compat' options), or STD (for 26; 'libcompat' options). 27; 28; The type-dependent arguments are as follows: 29; For STD, NODEF, NOARGS, and compat syscalls: 30; { pseudo-proto } [alias] 31; For other syscalls: 32; [comment] 33; 34; #ifdef's, etc. may be included, and are copied to the output files. 35; #include's are copied to the syscall names and switch definition files only. 36 37#if defined(_KERNEL_OPT) 38#include "opt_compat_43.h" 39#endif 40 41#include <sys/param.h> 42#include <sys/poll.h> 43#include <sys/systm.h> 44#include <sys/signal.h> 45#include <sys/mount.h> 46#include <sys/syscallargs.h> 47 48#include <compat/linux/common/linux_types.h> 49#include <compat/linux/common/linux_signal.h> 50#include <compat/linux/common/linux_siginfo.h> 51#include <compat/linux/common/linux_machdep.h> 52 53#include <compat/linux/linux_syscallargs.h> 54 55%% 56; XXX We have to explicitly declare linux_sys_nosys. 570 NOARGS { int linux_sys_nosys(void); } 581 NOARGS { int sys_exit(int rval); } 592 NOARGS { int sys_fork(void); } 603 NOARGS { int sys_read(int fd, char *buf, u_int nbyte); } 614 NOARGS { int sys_write(int fd, char *buf, u_int nbyte); } 625 STD { int linux_sys_open(const char *path, int flags, \ 63 int mode); } 646 NOARGS { int sys_close(int fd); } 657 STD { int linux_sys_waitpid(int pid, int *status, \ 66 int options);} 678 STD { int linux_sys_creat(const char *path, int mode); } 689 STD { int linux_sys_link(const char *path, const \ 69 char *link); } 7010 STD { int linux_sys_unlink(const char *path); } 7111 STD { int linux_sys_execve(const char *path, char **argp, \ 72 char **envp); } 7312 STD { int linux_sys_chdir(const char *path); } 7413 STD { int linux_sys_time(linux_time_t *t); } 7514 STD { int linux_sys_mknod(const char *path, int mode, \ 76 int dev); } 7715 STD { int linux_sys_chmod(const char *path, int mode); } 7816 STD { int linux_sys_lchown16(const char *path, int uid, \ 79 int gid); } 8017 OBSOL break 8118 OBSOL ostat 8219 NOARGS { long compat_43_sys_lseek(int fd, long offset, \ 83 int whence); } 8420 NOARGS MPSAFE { pid_t sys_getpid(void); } 8521 UNIMPL mount 8622 OBSOL umount 8723 NOARGS { int sys_setuid(uid_t uid); } 8824 NOARGS { uid_t sys_getuid(void); } 8925 STD { int linux_sys_stime(linux_time_t *t); } 9026 STD { int linux_sys_ptrace(int request, int pid, \ 91 int addr, int data); } 9227 STD { int linux_sys_alarm(unsigned int secs); } 9328 OBSOL ofstat 9429 STD { int linux_sys_pause(void); } 9530 STD { int linux_sys_utime(const char *path, \ 96 struct linux_utimbuf *times); } 9731 OBSOL stty 9832 OBSOL gtty 9933 STD { int linux_sys_access(const char *path, int flags); } 10034 STD { int linux_sys_nice(int incr); } 10135 OBSOL ftime 10236 NOARGS { int sys_sync(void); } 10337 STD { int linux_sys_kill(int pid, int signum); } 10438 STD { int linux_sys_rename(const char *from, \ 105 const char *to); } 10639 STD { int linux_sys_mkdir(const char *path, int mode); } 10740 STD { int linux_sys_rmdir(const char *path); } 10841 NOARGS { int sys_dup(u_int fd); } 10942 STD { int linux_sys_pipe(int *pfds); } 11043 STD { int linux_sys_times(struct times *tms); } 11144 OBSOL prof 11245 STD { int linux_sys_brk(char *nsize); } 11346 NOARGS { int sys_setgid(gid_t gid); } 11447 NOARGS { gid_t sys_getgid(void); } 11548 STD { int linux_sys_signal(int signum, \ 116 linux_handler_t handler); } 11749 NOARGS { uid_t sys_geteuid(void); } 11850 NOARGS { gid_t sys_getegid(void); } 11951 NOARGS { int sys_acct(char *path); } 12052 UNIMPL umount 12153 OBSOL lock 12254 STD { int linux_sys_ioctl(int fd, u_long com, \ 123 caddr_t data); } 12455 STD { int linux_sys_fcntl(int fd, int cmd, void *arg); } 12556 OBSOL mpx 12657 NOARGS { int sys_setpgid(int pid, int pgid); } 12758 OBSOL ulimit 12859 STD { int linux_sys_oldolduname( \ 129 struct linux_oldold_utsname *up); } 13060 NOARGS { int sys_umask(int newmask); } 13161 NOARGS { int sys_chroot(char *path); } 13262 UNIMPL ustat 13363 NOARGS { int sys_dup2(u_int from, u_int to); } 13464 NOARGS { pid_t sys_getppid(void); } 13565 NOARGS { int sys_getpgrp(void); } 13666 NOARGS { int sys_setsid(void); } 13767 STD { int linux_sys_sigaction(int signum, \ 138 const struct linux_old_sigaction *nsa, \ 139 struct linux_old_sigaction *osa); } 14068 STD { int linux_sys_siggetmask(void); } 14169 STD { int linux_sys_sigsetmask(linux_old_sigset_t mask); } 14270 NOARGS { int sys_setreuid(uid_t ruid, uid_t euid); } 14371 NOARGS { int sys_setregid(gid_t rgid, gid_t egid); } 14472 STD { int linux_sys_sigsuspend(caddr_t restart, \ 145 int oldmask, int mask); } 14673 STD { int linux_sys_sigpending(linux_old_sigset_t *set); } 14774 NOARGS { int compat_43_sys_sethostname(char *hostname, \ 148 u_int len);} 14975 NOARGS { int compat_43_sys_setrlimit(u_int which, \ 150 struct orlimit *rlp); } 15176 NOARGS { int compat_43_sys_getrlimit(u_int which, \ 152 struct orlimit *rlp); } 15377 NOARGS { int sys_getrusage(int who, struct rusage *rusage); } 15478 STD { int linux_sys_gettimeofday(struct timeval *tp, \ 155 struct timezone *tzp); } 15679 STD { int linux_sys_settimeofday(struct timeval *tp, \ 157 struct timezone *tzp); } 15880 NOARGS { int sys_getgroups(u_int gidsetsize, gid_t *gidset); } 15981 NOARGS { int sys_setgroups(u_int gidsetsize, gid_t *gidset); } 16082 STD { int linux_sys_oldselect(struct linux_oldselect *lsp); } 16183 STD { int linux_sys_symlink(const char *path, \ 162 const char *to); } 16384 NOARGS { int compat_43_sys_lstat(const char *path, \ 164 struct stat43 *up); } oolstat 16585 STD { int linux_sys_readlink(const char *name, char *buf, \ 166 int count); } 167#ifdef EXEC_AOUT 16886 STD { int linux_sys_uselib(const char *path); } 169#else 17086 EXCL uselib 171#endif 17287 STD { int linux_sys_swapon(char *name); } 17388 STD { int linux_sys_reboot(int magic1, int magic2, \ 174 int cmd, void *arg); } 17589 STD { int linux_sys_readdir(int fd, caddr_t dent, \ 176 unsigned int count); } 17790 STD { int linux_sys_old_mmap(struct linux_oldmmap *lmp); } 17891 NOARGS { int sys_munmap(caddr_t addr, int len); } 17992 STD { int linux_sys_truncate(const char *path, \ 180 long length); } 18193 NOARGS { int compat_43_sys_ftruncate(int fd, long length); } 18294 NOARGS { int sys_fchmod(int fd, int mode); } 18395 STD { int linux_sys_fchown16(int fd, int uid, int gid); } 18496 NOARGS { int sys_getpriority(int which, int who); } 18597 NOARGS { int sys_setpriority(int which, int who, int prio); } 18698 NOARGS { int sys_profil(caddr_t samples, u_int size, \ 187 u_int offset, u_int scale); } 18899 STD { int linux_sys_statfs(const char *path, \ 189 struct linux_statfs *sp); } 190100 STD { int linux_sys_fstatfs(int fd, \ 191 struct linux_statfs *sp); } 192101 UNIMPL 193102 STD { int linux_sys_socketcall(int what, void *args); } 194103 UNIMPL syslog 195104 NOARGS { int sys_setitimer(u_int which, \ 196 struct itimerval *itv, struct itimerval *oitv); } 197105 NOARGS { int sys_getitimer(u_int which, \ 198 struct itimerval *itv); } 199106 STD { int linux_sys_stat(const char *path, \ 200 struct linux_stat *sp); } 201107 STD { int linux_sys_lstat(const char *path, \ 202 struct linux_stat *sp); } 203108 STD { int linux_sys_fstat(int fd, struct linux_stat *sp); } 204109 STD { int linux_sys_olduname(struct linux_oldutsname *up); } 205110 UNIMPL 206111 UNIMPL vhangup 207112 UNIMPL idle 208113 UNIMPL syscall 209114 STD { int linux_sys_wait4(int pid, int *status, \ 210 int options, struct rusage *rusage); } 211115 STD { int linux_sys_swapoff(const char *path); } 212116 STD { int linux_sys_sysinfo(struct linux_sysinfo *arg); } 213117 STD { int linux_sys_ipc(int what, int a1, int a2, int a3, \ 214 caddr_t ptr); } 215118 NOARGS { int sys_fsync(int fd); } 216119 STD { int linux_sys_sigreturn(struct linux_sigcontext *scp); } 217120 STD { int linux_sys_clone(int flags, void *stack); } 218121 STD { int linux_sys_setdomainname(char *domainname, \ 219 int len); } 220122 STD { int linux_sys_uname(struct linux_utsname *up); } 221123 UNIMPL modify_ldt 222124 UNIMPL adjtimex 223125 NOARGS { int sys_mprotect(caddr_t addr, int len, int prot); } 224126 STD { int linux_sys_sigprocmask(int how, \ 225 const linux_old_sigset_t *set, \ 226 linux_old_sigset_t *oset); } 227127 UNIMPL create_module 228128 UNIMPL init_module 229129 UNIMPL delete_module 230130 UNIMPL get_kernel_syms 231131 UNIMPL quotactl 232132 STD { int linux_sys_getpgid(int pid); } 233133 NOARGS { int sys_fchdir(int fd); } 234134 UNIMPL bdflush 235135 UNIMPL sysfs 236136 STD { int linux_sys_personality(int per); } 237137 UNIMPL afs_syscall 238138 STD { int linux_sys_setfsuid(uid_t uid); } 239139 NOARGS { int linux_sys_getfsuid(void); } 240140 STD { int linux_sys_llseek(int fd, u_int32_t ohigh, \ 241 u_int32_t olow, caddr_t res, int whence); } 242141 STD { int linux_sys_getdents(int fd, \ 243 struct linux_dirent *dent, unsigned int count); } 244142 STD { int linux_sys_select(int nfds, fd_set *readfds, \ 245 fd_set *writefds, fd_set *exceptfds, \ 246 struct timeval *timeout); } 247143 NOARGS { int sys_flock(int fd, int how); } 248144 STD { int linux_sys_msync(caddr_t addr, int len, int fl); } 249145 NOARGS { int sys_readv(int fd, struct iovec *iovp, \ 250 u_int iovcnt); } 251146 NOARGS { int sys_writev(int fd, struct iovec *iovp, \ 252 u_int iovcnt); } 253147 NOARGS { pid_t sys_getsid(pid_t pid); } 254148 STD { int linux_sys_fdatasync(int fd); } 255149 STD { int linux_sys___sysctl(struct linux___sysctl *lsp); } 256150 NOARGS { int sys_mlock(caddr_t addr, size_t len); } 257151 NOARGS { int sys_munlock(caddr_t addr, size_t len); } 258152 NOARGS { int sys_mlockall(int flags); } 259153 NOARGS { int sys_munlockall(void); } 260154 STD { int linux_sys_sched_setparam(pid_t pid, \ 261 const struct linux_sched_param *sp); } 262155 STD { int linux_sys_sched_getparam(pid_t pid, \ 263 struct linux_sched_param *sp); } 264156 STD { int linux_sys_sched_setscheduler(pid_t pid, \ 265 int policy, const struct linux_sched_param *sp); } 266157 STD { int linux_sys_sched_getscheduler(pid_t pid); } 267158 STD { int linux_sys_sched_yield(void); } 268159 STD { int linux_sys_sched_get_priority_max(int policy); } 269160 STD { int linux_sys_sched_get_priority_min(int policy); } 270161 UNIMPL sched_rr_get_interval 271162 NOARGS { int sys_nanosleep(const struct timespec *rqtp, \ 272 struct timespec *rmtp); } 273163 STD { void *linux_sys_mremap(void *old_address, \ 274 size_t old_size, size_t new_size, u_long flags); } 275164 STD { int linux_sys_setresuid(uid_t ruid, uid_t euid, \ 276 uid_t suid); } 277165 STD { int linux_sys_getresuid(uid_t *ruid, uid_t *euid, \ 278 uid_t *suid); } 279166 UNIMPL 280167 UNIMPL query_module 281168 NOARGS { int sys_poll(struct pollfd *fds, u_int nfds, \ 282 int timeout); } 283169 UNIMPL nfsservctl 284170 STD { int linux_sys_setresgid(gid_t rgid, gid_t egid, \ 285 gid_t sgid); } 286171 STD { int linux_sys_getresgid(gid_t *rgid, gid_t *egid, \ 287 gid_t *sgid); } 288172 UNIMPL prctl 289173 UNIMPL rt_sigreturn 290;173 STD { int linux_sys_rt_sigreturn( \ 291; struct linux_rt_sigframe *sfp); } 292174 STD { int linux_sys_rt_sigaction(int signum, \ 293 const struct linux_sigaction *nsa, \ 294 struct linux_sigaction *osa, \ 295 size_t sigsetsize); } 296175 STD { int linux_sys_rt_sigprocmask(int how, \ 297 const linux_sigset_t *set, \ 298 linux_sigset_t *oset, \ 299 size_t sigsetsize); } 300176 STD { int linux_sys_rt_sigpending( \ 301 linux_sigset_t *set, \ 302 size_t sigsetsize); } 303177 UNIMPL rt_sigtimedwait 304; XXX XAX int here? sigset_t here? siginfo_t 305178 STD { int linux_sys_rt_queueinfo(int pid, int signum, \ 306 void *uinfo); } 307179 STD { int linux_sys_rt_sigsuspend(linux_sigset_t *unewset, \ 308 size_t sigsetsize); } 309180 STD { int linux_sys_pread(int fd, char *buf, \ 310 size_t nbyte, linux_off_t offset); } 311181 STD { int linux_sys_pwrite(int fd, char *buf, \ 312 size_t nbyte, linux_off_t offset); } 313182 STD { int linux_sys_chown16(const char *path, int uid, \ 314 int gid); } 315183 NOARGS { int sys___getcwd(char *bufp, size_t length); } 316184 UNIMPL capget 317185 UNIMPL capset 318186 STD { int linux_sys_sigaltstack( \ 319 const struct linux_sigaltstack *ss, \ 320 struct linux_sigaltstack *oss); } 321187 UNIMPL sendfile 322188 UNIMPL getpmsg 323189 UNIMPL putpmsg 324190 NOARGS vfork { int sys___vfork14(void); } 325191 UNIMPL getrlimit 326192 UNIMPL mmap2 327193 STD { int linux_sys_truncate64(const char *path, \ 328 off_t length); } 329194 NOARGS ftruncate64 { int sys_ftruncate(int fd, \ 330 off_t length); } 331195 STD { int linux_sys_stat64(const char *path, \ 332 struct linux_stat64 *sp); } 333196 STD { int linux_sys_lstat64(const char *path, \ 334 struct linux_stat64 *sp); } 335197 STD { int linux_sys_fstat64(int fd, \ 336 struct linux_stat64 *sp); } 337198 STD { int linux_sys_lchown(const char *path, uid_t uid, \ 338 gid_t gid); } 339199 NOARGS getuid32 { uid_t sys_getuid(void); } 340200 NOARGS getgid32 { gid_t sys_getgid(void); } 341201 NOARGS geteuid32 { uid_t sys_geteuid(void); } 342202 NOARGS getegid32 { gid_t sys_getegid(void); } 343203 NOARGS setreuid32 { int sys_setreuid(uid_t ruid, \ 344 uid_t euid); } 345204 NOARGS setregid32 { int sys_setregid(gid_t rgid, \ 346 gid_t egid); } 347205 NOARGS getgroups32 { int sys_getgroups(u_int gidsetsize, \ 348 gid_t *gidset); } 349206 NOARGS setgroups32 { int sys_setgroups(u_int gidsetsize, \ 350 gid_t *gidset); } 351207 NOARGS fchown32 { int sys___posix_fchown(int fd, uid_t uid, \ 352 gid_t gid); } 353208 NOARGS setresuid32 { int linux_sys_setresuid(uid_t ruid, \ 354 uid_t euid, uid_t suid); } 355209 NOARGS getresuid32 { int linux_sys_getresuid(uid_t *ruid, \ 356 uid_t *euid, uid_t *suid); } 357210 NOARGS setresgid32 { int linux_sys_setresgid(gid_t rgid, \ 358 gid_t egid, gid_t sgid); } 359211 NOARGS getresgid32 { int linux_sys_getresgid(gid_t *rgid, \ 360 gid_t *egid, gid_t *sgid); } 361212 STD chown32 { int linux_sys_chown(const char *path, \ 362 uid_t uid, gid_t gid); } 363213 NOARGS setuid32 { int sys_setuid(uid_t uid); } 364214 NOARGS setgid32 { int sys_setgid(gid_t gid); } 365215 NOARGS setfsuid32 { int linux_sys_setfsuid(uid_t uid); } 366216 NOARGS getfsuid32 { int linux_sys_getfsuid(void); } 367217 UNIMPL getdents64 368218 UNIMPL pivot_root 369219 UNIMPL mincore 370220 UNIMPL madvise 371221 UNIMPL fcntl64 372; Fill until 256 373222 UNIMPL 374223 UNIMPL 375224 UNIMPL 376225 UNIMPL 377226 UNIMPL 378227 UNIMPL 379228 UNIMPL 380229 UNIMPL 381230 UNIMPL 382231 UNIMPL 383232 UNIMPL 384233 UNIMPL 385234 UNIMPL 386235 UNIMPL 387236 UNIMPL 388237 UNIMPL 389238 UNIMPL 390239 UNIMPL 391240 UNIMPL 392241 UNIMPL 393242 UNIMPL 394243 UNIMPL 395244 UNIMPL 396245 UNIMPL 397246 UNIMPL 398247 UNIMPL 399248 UNIMPL 400249 UNIMPL 401250 UNIMPL 402251 UNIMPL 403252 UNIMPL 404253 UNIMPL 405254 UNIMPL 406255 UNIMPL 407 408; ARMLinux actually has two ranges of syscalls. Normal syscalls use 409; SWI numbers starting at 0x900000 (__NR_SYSCALL_BASE). Special 410; ARM-specific syscalls use SWI numbers starting at 0x9f00000 411; (__ARM_NR_BASE). linux_syscall() (in arch/arm/arm/linux_syscall.c) 412; remaps these down to 0x900100 so that we can use one linux_sysent 413; array for the whole lot. 414 415256 UNIMPL 416257 STD { int linux_sys_breakpoint(void); } 417258 STD { int linux_sys_cacheflush(uintptr_t from, \ 418 intptr_t to); } 419259 UNIMPL usr26 420260 UNIMPL usr32 421