Added various header files for initial Linux compatibility on powerpc ports

This commit is contained in:
manu 2001-01-19 01:31:23 +00:00
parent f93a8a97b8
commit 3ec1257260
13 changed files with 2778 additions and 10 deletions

View File

@ -0,0 +1,123 @@
/* $NetBSD: linux_exec.h,v 1.1 2001/01/19 01:31:23 manu Exp $ */
/*-
* Copyright (c) 1998, 2001 The NetBSD Foundation, Inc.
* All rights reserved.
*
* This code is derived from software contributed to The NetBSD Foundation
* by Emmanuel Dreyfus.
*
* 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.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the NetBSD
* Foundation, Inc. and its contributors.
* 4. Neither the name of The NetBSD Foundation nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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.
*/
#ifndef _POWERPC_LINUX_EXEC_H
#define _POWERPC_LINUX_EXEC_H
#include <sys/exec_aout.h>
#include <sys/exec_elf.h>
#include <sys/types.h>
#include <sys/systm.h>
/*
* From Linux's include/asm-ppc/elf.h
*/
#define LINUX_ELF_HWCAP (0)
/*
* From Linux's include/asm-ppc/param.h
*/
# define LINUX_CLOCKS_PER_SEC 100 /* frequency at which times() counts */
/*
* Linux a.out format parameters
*/
#define LINUX_M_POWERPC MID_POWERPC
#define LINUX_MID_MACHINE LINUX_M_POWERPC
/*
* Linux Elf32 format parameters
*/
/*
* LINUX_ATEXIT_SIGNATURE enable the atexit_signature test. See
* sys/compat/linux/common/linux_exec_elf32.c:linux_atexit_signature()
*/
#define LINUX_ATEXIT_SIGNATURE 1
/*
* LINUX_SHIFT enable the 16 bytes shift for arguments and ELF auxilliary
* table. This is needed on the PowerPC
*/
#define LINUX_SHIFT 0x0000000FUL
/*
* LINUX_SP_WRAP enable the stack pointer wrap before Linux's ld.so
* transfers control to the Linux executable. It is set to the size
* of the stack pointer wrap code, which is defined in
* sys/compat/linux/arch/powerpc/linux_sp_wrap.S
*/
#define LINUX_SP_WRAP 0x30 /* Size of the stack pointer wrap code */
/*
* Entries in the ELF auxilliary table. This is counted from
* sys/compat/linux/arc/powerpc/linux_exec_powerpc.c
*/
#define LINUX_ELF_AUX_ENTRIES 14
/*
* Size of the auxiliary ELF table. On the PowerPC we need 16 extra bytes
* in order to force an alignement on a 16 bytes boundary (this is expected
* by PowerPC GNU ld.so). If we use LINUX_SP_WRAP, we also need some extra
* room for the sp_wrap_code.
*/
#ifdef LINUX_SP_WRAP
#define LINUX_ELF_AUX_ARGSIZ \
((howmany(ELF_AUX_ENTRIES * sizeof(LinuxAuxInfo), sizeof(Elf32_Addr))) + 16 \
+ LINUX_SP_WRAP)
#else
#define LINUX_ELF_AUX_ARGSIZ \
((howmany(ELF_AUX_ENTRIES * sizeof(LinuxAuxInfo), sizeof(Elf32_Addr))) + 16)
#endif
/* XXX should use ELFNAME2 */
#define LINUX_COPYARGS_FUNCTION linux_elf32_copyargs
typedef struct {
Elf32_Sword a_type;
Elf32_Word a_v;
} LinuxAux32Info;
#define LinuxAuxInfo LinuxAux32Info
#ifdef _KERNEL
__BEGIN_DECLS
void * linux_elf32_copyargs __P((struct exec_package *, struct ps_strings *, void *, void *));
__END_DECLS
#endif /* _KERNEL */
#endif /* !_POWERPC_LINUX_EXEC_H */

View File

@ -0,0 +1,87 @@
/* $NetBSD: linux_fcntl.h,v 1.1 2001/01/19 01:31:24 manu Exp $ */
/*-
* Copyright (c) 1995, 1998, 2001 The NetBSD Foundation, Inc.
* All rights reserved.
*
* This code is derived from software contributed to The NetBSD Foundation
* by Frank van der Linden, Eric Haszlakiewicz, and Emmanuel Dreyfus.
*
* 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.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the NetBSD
* Foundation, Inc. and its contributors.
* 4. Neither the name of The NetBSD Foundation nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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.
*/
/*
* Various flag values used in Linux for open(2) and fcntl(2).
*/
#ifndef _POWERPC_LINUX_FCNTL_H
#define _POWERPC_LINUX_FCNTL_H
/*
* read/write mode for open(2) are defined in common/linux_fcntl.h
*/
/*
* flags used in open(2)
* From Linux's include/asm-ppc/fcntl.h
*/
#define LINUX_O_CREAT 0x0100
#define LINUX_O_EXCL 0x0200
#define LINUX_O_NOCTTY 0x0400
#define LINUX_O_TRUNC 0x01000
#define LINUX_O_APPEND 0x02000
#define LINUX_O_NONBLOCK 0x04000
#define LINUX_O_NDELAY LINUX_O_NONBLOCK
#define LINUX_O_SYNC 0x010000
#define LINUX_FASYNC 0x020000
/*
* fcntl(2) operations
* From Linux's include/asm-ppc/fcntl.h
*/
#define LINUX_F_DUPFD 0
#define LINUX_F_GETFD 1
#define LINUX_F_SETFD 2
#define LINUX_F_GETFL 3
#define LINUX_F_SETFL 4
#define LINUX_F_GETLK 5
#define LINUX_F_SETLK 6
#define LINUX_F_SETLKW 7
#define LINUX_F_SETOWN 8
#define LINUX_F_GETOWN 9
#define LINUX_F_RDLCK 0
#define LINUX_F_WRLCK 1
#define LINUX_F_UNLCK 2
#define LINUX_LOCK_EX 4 /* F_EXLCK in Linux, and comment "or 3 " */
#define LINUX_LOCK_SH 8 /* F_SHLCK in Linux, and comment "or 4' */
#endif /* !_POWERPC_LINUX_FCNTL_H */

View File

@ -0,0 +1,54 @@
/* $NetBSD: linux_ioctl.h,v 1.1 2001/01/19 01:31:24 manu Exp $
/*-
* Copyright (c) 1995, 1998, 2001 The NetBSD Foundation, Inc.
* All rights reserved.
*
* This code is derived from software contributed to The NetBSD Foundation
* by Frank van der Linden, Eric Haszlakiewicz, and Emmanuel Dreyfus.
*
* 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.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the NetBSD
* Foundation, Inc. and its contributors.
* 4. Neither the name of The NetBSD Foundation nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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.
*/
#ifndef _POWERPC_LINUX_IOCTL_H
#define _POWERPC_LINUX_IOCTL_H
/* From Linux's include/asm-ppc/ioctl.h */
#define _LINUX_IOC_NRBITS 8
#define _LINUX_IOC_TYPEBITS 8
#define _LINUX_IOC_SIZEBITS 13
#define _LINUX_IOC_DIRBITS 3
#define _LINUX_IOC_NRSHIFT 0
#define _LINUX_IOC_NONE 1U
#define _LINUX_IOC_READ 2U
#define _LINUX_IOC_WRITE 4U
#endif /* !_POWERPC_LINUX_IOCTL_H */

View File

@ -0,0 +1,241 @@
/* $NetBSD: linux_machdep.h,v 1.1 2001/01/19 01:31:24 manu Exp $ */
/*-
* Copyright (c) 1995, 2000, 2001 The NetBSD Foundation, Inc.
* All rights reserved.
*
* This code is derived from software contributed to The NetBSD Foundation
* by Frank van der Linden and Emmanuel Dreyfus.
*
* 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.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the NetBSD
* Foundation, Inc. and its contributors.
* 4. Neither the name of The NetBSD Foundation nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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.
*/
#ifndef _POWERPC_LINUX_MACHDEP_H
#define _POWERPC_LINUX_MACHDEP_H
#include <compat/linux/common/linux_signal.h>
/*
* From Linux's include/asm-ppc/ptrace.h
* Needed for sigcontext
*/
struct linux_pt_regs {
unsigned long lgpr[32];
unsigned long lnip;
unsigned long lmsr;
unsigned long lorig_gpr3; /* Used for restarting system calls */
unsigned long lctr;
unsigned long llink;
unsigned long lxer;
unsigned long lccr;
unsigned long lmq; /* 601 only (not used at present) */
/* Used on APUS to hold IPL value. */
unsigned long ltrap; /* Reason for being here */
unsigned long ldar; /* Fault registers */
unsigned long ldsisr;
unsigned long lresult; /* Result of a system call */
};
/*
* From Linux's include/asm-ppc/sigcontext.h
* Linux/ppc calls that struct sigcontect_struct
*/
struct linux_sigcontext {
unsigned long _unused[4];
int lsignal;
unsigned long lhandler;
unsigned long lmask;
struct linux_pt_regs *lregs;
};
/*
* From Linux's include/asm-ppc/elf.h
*/
#define LINUX_ELF_NGREG 48 /* includes nip, msr, lr, etc. */
#define LINUX_ELF_NFPREG 33 /* includes fpscr */
typedef unsigned long linux_elf_greg_t;
typedef linux_elf_greg_t linux_elf_gregset_t[LINUX_ELF_NGREG];
/*
* From Linux's include/asm-ppc/ptrace.h
*/
#define LINUX__SIGNAL_FRAMESIZE 64
/*
* We make the stack look like Linux expects it when calling a signal
* handler, but use the BSD way of calling the handler and sigreturn().
* This means that we need to pass the pointer to the handler too.
* It is appended to the frame to not interfere with the rest of it.
*
* The following is from Linux's arch/ppc/kern/signal.c:
*
* > When we have signals to deliver, we set up on the
* > user stack, going down from the original stack pointer:
* > a sigregs struct
* > one or more sigcontext structs with
* > a gap of LINUX__SIGNAL_FRAMESIZE bytes
* >
* > Each of these things must be a multiple of 16 bytes in size.
*
* linux_sigregs is a linux_sigframe on other Linux ports. Linux/PowerPC
* defines a rt_sigframe struct, but it is only used for RT signals. for
* non RT signals, struct sigregs is used instead.
*
* About the ltramp filed: that trampoline code is not used. Instead, the
* sigcode (7 bytes long) trampoline code, copied by exec() on program startup
* is used. However, Linux binaries might expect it to be here.
*/
struct linux_sigregs {
linux_elf_gregset_t lgp_regs;
double lfp_regs[LINUX_ELF_NFPREG];
unsigned long ltramp[2];
/*
* Programs using the rs6000/xcoff abi can save up to 19 gp regs
* and 18 fp regs below sp before decrementing it.
*/
int labigap[56];
};
/*
* The following is not from Linux, we define it for convenience. It is the
* size of the abigap field of linux_sigregs.
*/
#define LINUX_ABIGAP (56*sizeof(int))
/*
* linux sigframe in a nutshell (however we don't use it):
*
* struct linux_sigframe {
* struct linux_sigregs lsg;
* char _gap[LINUX__SIGNAL_FRAMESIZE];
* struct sigcontext lsc;
* };
*/
/*
* From Linux's include/asm-ppc/ucontext.h
*/
struct linux_ucontext {
unsigned long luc_flags;
struct linux_ucontext *luc_link;
linux_stack_t luc_stack;
struct linux_sigcontext luc_context;
linux_sigset_t luc_sigmask; /* mask last for extensibility */
};
/*
* From Linux's arch/ppc/kernel/signal.c, the real rt_sigframe
*/
struct linux_rt_sigframe
{
unsigned long _unused[2];
struct linux_siginfo *lpinfo;
void *lpuc;
struct linux_siginfo linfo;
struct linux_ucontext luc;
};
#ifdef _KERNEL
__BEGIN_DECLS
void linux_sendsig __P((sig_t, int, sigset_t *, u_long));
dev_t linux_fakedev __P((dev_t));
__END_DECLS
#endif /* _KERNEL */
/*
* Major device numbers of VT device on both Linux and NetBSD. Used in
* ugly patch to fake device numbers.
*
* LINUX_CONS_MAJOR is from Linux's include/linux/major.h
*/
#define LINUX_CONS_MAJOR 4
#define NETBSD_WSCONS_MAJOR 47
/*
* Linux ioctl calls for the keyboard.
*
* From Linux's include/linux/kd.h
*/
#define LINUX_KDGKBMODE 0x4b44
#define LINUX_KDSKBMODE 0x4b45
#define LINUX_KDMKTONE 0x4b30
#define LINUX_KDSETMODE 0x4b3a
#define LINUX_KDENABIO 0x4b36
#define LINUX_KDDISABIO 0x4b37
#define LINUX_KDGETLED 0x4b31
#define LINUX_KDSETLED 0x4b32
#define LINUX_KDGKBTYPE 0x4B33
#define LINUX_KDGKBENT 0x4B46
/*
* Mode for KDSKBMODE which we don't have (we just use plain mode for this)
*
* From Linux's include/linux/kd.h
*/
#define LINUX_K_MEDIUMRAW 2
/*
* VT ioctl calls in Linux (the ones that the pcvt emulation in
* wscons can handle)
*
* From Linux's include/linux/vt.h
*/
#define LINUX_VT_OPENQRY 0x5600
#define LINUX_VT_GETMODE 0x5601
#define LINUX_VT_SETMODE 0x5602
#define LINUX_VT_GETSTATE 0x5603
#define LINUX_VT_RELDISP 0x5605
#define LINUX_VT_ACTIVATE 0x5606
#define LINUX_VT_WAITACTIVE 0x5607
#define LINUX_VT_DISALLOCATE 0x5608
/*
* This range used by VMWare (XXX)
*
* From Linux's include/linux/vt.h
* XXX It's not sure this s needed for powerpc
*/
#define LINUX_VMWARE_NONE 200
#define LINUX_VMWARE_LAST 237
/*
* Range of ioctls to just pass on, so that LKMs (like VMWare) can
* handle them.
*
* From Linux's include/linux/vt.h
*/
#define LINUX_IOCTL_MIN_PASS LINUX_VMWARE_NONE
#define LINUX_IOCTL_MAX_PASS (LINUX_VMWARE_LAST+8)
#ifdef _KERNEL
__BEGIN_DECLS /* XXX from NetBSD/i386. Not arch dependent? */
void linux_syscall_intern __P((struct proc *));
__END_DECLS
#endif /* !_KERNEL */
#endif /* _POWERPC_LINUX_MACHDEP_H */

View File

@ -1,11 +1,11 @@
/* $NetBSD: linux_mmap.h,v 1.1 1998/09/30 21:55:59 erh Exp $ */
/* $NetBSD: linux_mmap.h,v 1.2 2001/01/19 01:31:25 manu Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
* Copyright (c) 1998, 2001 The NetBSD Foundation, Inc.
* All rights reserved.
*
* This code is derived from software contributed to The NetBSD Foundation
* by Eric Haszlakiewicz.
* by Eric Haszlakiewicz and Emmanuel Dreyfus.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@ -36,13 +36,17 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef _PPC_LINUX_MMAP_H
#define _PPC_LINUX_MMAP_H
#ifndef _POWERPC_LINUX_MMAP_H
#define _POWERPC_LINUX_MMAP_H
/* LINUX_PROT_* defined in common/linux_mmap.h */
/* LINUX_MAP_SHARED/PRIVATE defined in common/linux_mmap.h */
/*
* LINUX_PROT_* are defined in common/linux_mmap.h
* LINUX_MAP_SHARED/PRIVATE are defined in common/linux_mmap.h
*/
/*
* From Linux's include/asm-ppc/mman.h
*/
#define LINUX_MAP_FIXED 0x0010
#define LINUX_MAP_ANON 0x0020
@ -52,6 +56,20 @@
#define LINUX_MAP_DENYWRITE 0x0800
#define LINUX_MAP_EXECUTABLE 0x1000
#define LINUX_MAP_IGNMASK 0x1940
/*
* On the PowerPC, we have a problem with the offset argument. It's 32 bit
* long on Linux and 64 bit long on NetBSD. Therefore we use a wrapper
* function linux_sys_powerpc_mmap() to linux_sys_mmap()
*
* Linux's off_t is __kernel_off_t (include/linux/types.h) which in turn
* is a long (include/asm-ppc/posix_types.h)
*/
#define linux_off_t long
#endif /* !_PPC_LINUX_MMAP_H */
#ifdef _KERNEL
__BEGIN_DECLS
int linux_sys_powerpc_mmap(struct proc *, void *, register_t *);
__END_DECLS
#endif /* !_KERNEL */
#endif /* !_POWERPC_LINUX_MMAP_H */

View File

@ -0,0 +1,123 @@
/* $NetBSD: linux_siginfo.h,v 1.1 2001/01/19 01:31:25 manu Exp $ */
/*-
* Copyright (c) 1998, 2001 The NetBSD Foundation, Inc.
* All rights reserved.
*
* This code is derived from software contributed to The NetBSD Foundation
* by Eric Haszlakiewicz and Emmanuel Dreyfus.
*
* 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.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the NetBSD
* Foundation, Inc. and its contributors.
* 4. Neither the name of The NetBSD Foundation nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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.
*/
#ifndef _POWERPC_LINUX_SIGINFO_H
#define _POWERPC_LINUX_SIGINFO_H
/*
* Everything is from Linux's include/asm-ppc/siginfo.h
*/
typedef union linux_sigval {
int sival_int;
void *sival_ptr;
} linux_sigval_t;
#define SI_MAX_SIZE 128
#define SI_PAD_SIZE ((SI_MAX_SIZE/sizeof(int)) - 3)
typedef struct linux_siginfo {
int lsi_signo;
int lsi_errno;
int lsi_code;
union {
int _pad[SI_PAD_SIZE];
/* kill() */
struct {
linux_pid_t _pid;
linux_uid_t _uid;
} _kill;
/* POSIX.1b timers */
struct {
unsigned int _timer1;
unsigned int _timer2;
} _timer;
/* POSIX.1b signals */
struct {
linux_pid_t _pid;
linux_uid_t _uid;
linux_sigval_t _sigval;
} _rt;
/* SIGCHLD */
struct {
linux_pid_t _pid;
linux_uid_t _uid;
int _status;
linux_clock_t _utime;
linux_clock_t _stime;
} _sigchld;
/* SIGILL, SIGFPE, SIGSEGV, SIGBUS */
struct {
void *_addr;
} _sigfault;
/* SIGPOLL */
struct {
int _band;
int _fd;
} _sigpoll;
} _sidata;
} linux_siginfo_t;
#define lsi_pid _sidata._kill._pid
#define lsi_uid _sidata._kill._uid
/*
* si_code values
* Digital reserves positive values for kernel-generated signals.
*/
#define LINUX__SI_CODE(T,N) ((T) << 16 | ((N) & 0xffff))
#define LINUX_SI_USER 0
#define LINUX_SI_KERNEL 0x80
#define LINUX_SI_QUEUE -1
#define LINUX_SI_TIMER LINUX__SI_CODE(__SI_TIMER,-2)
#define LINUX_SI_MESGQ -3
#define LINUX_SI_ASYNCIO -4
#define LINUX_SI_SIGIO -5
#define LINUX_SI_FROMUSER(sp) ((sp)->si_code <= 0)
#define LINUX_SI_FROMKERENL(sp) ((sp)->si_code > 0)
#endif /* !_POWERPC_LINUX_SIGINFO_H */

View File

@ -0,0 +1,141 @@
/* $NetBSD: linux_signal.h,v 1.1 2001/01/19 01:31:25 manu Exp $ */
/*-
* Copyright (c) 1995, 1998, 2001 The NetBSD Foundation, Inc.
* All rights reserved.
*
* This code is derived from software contributed to The NetBSD Foundation
* by Frank van der Linden, Eric Haszlakiewicz and Emmanuel Dreyfus.
*
* 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.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the NetBSD
* Foundation, Inc. and its contributors.
* 4. Neither the name of The NetBSD Foundation nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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.
*/
#ifndef _POWERPC_LINUX_SIGNAL_H
#define _POWERPC_LINUX_SIGNAL_H
/*
* Everything is from Linux's include/asm-ppc/signal.h
*/
#define LINUX_SIGHUP 1
#define LINUX_SIGINT 2
#define LINUX_SIGQUIT 3
#define LINUX_SIGILL 4
#define LINUX_SIGTRAP 5
#define LINUX_SIGABRT 6
#define LINUX_SIGIOT 6
#define LINUX_SIGBUS 7
#define LINUX_SIGFPE 8
#define LINUX_SIGKILL 9
#define LINUX_SIGUSR1 10
#define LINUX_SIGSEGV 11
#define LINUX_SIGUSR2 12
#define LINUX_SIGPIPE 13
#define LINUX_SIGALRM 14
#define LINUX_SIGTERM 15
#define LINUX_SIGSTKFLT 16
#define LINUX_SIGCHLD 17
#define LINUX_SIGCONT 18
#define LINUX_SIGSTOP 19
#define LINUX_SIGTSTP 20
#define LINUX_SIGTTIN 21
#define LINUX_SIGTTOU 22
#define LINUX_SIGURG 23
#define LINUX_SIGXCPU 24
#define LINUX_SIGXFSZ 25
#define LINUX_SIGVTALRM 26
#define LINUX_SIGPROF 27
#define LINUX_SIGWINCH 28
#define LINUX_SIGIO 29
#define LINUX_SIGPOLL LINUX_SIGIO
#define LINUX_SIGLOST 29
#define LINUX_SIGPWR 30
#define LINUX_SIGSYS 31
#define LINUX_SIGUNUSED 31
#define LINUX_SIGRTMIN 32
#define LINUX__NSIG 64
#define LINUX__NSIG_BPW 32
#define LINUX__NSIG_WORDS (LINUX__NSIG / LINUX__NSIG_BPW)
#define LINUX_SIG_BLOCK 0
#define LINUX_SIG_UNBLOCK 1
#define LINUX_SIG_SETMASK 2
/* sa_flags */
#define LINUX_SA_NOCLDSTOP 0x00000001
#define LINUX_SA_SIGINFO 0x00000004
#define LINUX_SA_ONSTACK 0x08000000
#define LINUX_SA_RESTART 0x10000000
#define LINUX_SA_INTERRUPT 0x20000000
#define LINUX_SA_NODEFER 0x40000000
#define LINUX_SA_RESETHAND 0x80000000
#define LINUX_SA_NOMASK LINUX_SA_NODEFER
#define LINUX_SA_ONESHOT LINUX_SA_RESETHAND
#define LINUX_SA_ALLBITS 0xf8000001 /* XXX from i386, not in ppc. */
typedef void (*linux_handler_t) __P((int));
typedef unsigned long linux_old_sigset_t;
typedef struct {
unsigned long sig[LINUX__NSIG_WORDS];
} linux_sigset_t;
struct linux_old_sigaction {
linux_handler_t sa_handler;
linux_old_sigset_t sa_mask;
unsigned long sa_flags;
void (*sa_restorer) __P((void));
};
/* Used in rt_* calls */
struct linux_sigaction {
linux_handler_t sa_handler;
unsigned long sa_flags;
void (*sa_restorer) __P((void));
linux_sigset_t sa_mask;
};
struct linux_k_sigaction {
struct linux_sigaction sa;
};
#define LINUX_SS_ONSTACK 1
#define LINUX_SS_DISABLE 2
#define LINUX_MINSIGSTKSZ 2048
#define LINUX_SIGSTKSZ 8192
struct linux_sigaltstack {
void *ss_sp;
int ss_flags;
size_t ss_size;
};
typedef struct sigaltstack linux_stack_t;
#endif /* !_POWERPC_LINUX_SIGNAL_H */

View File

@ -0,0 +1,90 @@
/* $NetBSD: linux_socket.h,v 1.1 2001/01/19 01:31:25 manu Exp $ */
/*-
* Copyright (c) 1995, 1998, 2001 The NetBSD Foundation, Inc.
* All rights reserved.
*
* This code is derived from software contributed to The NetBSD Foundation
* by Frank van der Linden, Eric Haszlakiewicz and Emmanuel Dreyfus.
*
* 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.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the NetBSD
* Foundation, Inc. and its contributors.
* 4. Neither the name of The NetBSD Foundation nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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.
*/
#ifndef _POWERPC_LINUX_SOCKET_H
#define _POWERPC_LINUX_SOCKET_H
/*
* Everything is from Linux's include/asm-ppc/socket.h
*/
/*
* Option levels for [gs]etsockopt(2). Only SOL_SOCKET is different,
* the rest matches IPPROTO_XXX
*/
#define LINUX_SOL_SOCKET 1
/*
* Options for [gs]etsockopt(2), socket level. For Linux, thay
* are not masks, but just increasing numbers.
*/
#define LINUX_SO_DEBUG 1
#define LINUX_SO_REUSEADDR 2
#define LINUX_SO_TYPE 3
#define LINUX_SO_ERROR 4
#define LINUX_SO_DONTROUTE 5
#define LINUX_SO_BROADCAST 6
#define LINUX_SO_SNDBUF 7
#define LINUX_SO_RCVBUF 8
#define LINUX_SO_KEEPALIVE 9
#define LINUX_SO_OOBINLINE 10
#define LINUX_SO_NO_CHECK 11
#define LINUX_SO_PRIORITY 12
#define LINUX_SO_LINGER 13
#define LINUX_SO_BSDCOMPAT 14
#define LINUX_SO_REUSEPORT 15 /* undef in Linux */
#define LINUX_SO_RCVLOWAT 16
#define LINUX_SO_SNDLOWAT 17
#define LINUX_SO_RCVTIMEO 18
#define LINUX_SO_SNDTIMEO 19
#define LINUX_SO_PASSCRED 20
#define LINUX_SO_PEERCRED 21
#define LINUX_SO_SECURITY_AUTHENTICATION 22
#define LINUX_SO_SECURITY_ENCRYPTION_TRANSPORT 23
#define LINUX_SO_SECURITY_ENCRYPTION_NETWORK 24
#define LINUX_SO_BINDTODEVICE 25
#define LINUX_SO_ATTACH_FILTER 26
#define LINUX_SO_DETACH_FILTER 27
#define LINUX_SO_PEERNAME 28
#define LINUX_SO_TIMESTAMP 29
#define LINUX_SCM_TIMESTAMP SO_TIMESTAMP
#endif /* !_I386_POWERPC_SOCKET_H */

View File

@ -0,0 +1,474 @@
/* $NetBSD: linux_syscall.h,v 1.1 2001/01/19 01:31:25 manu Exp $ */
/*
* System call numbers.
*
* DO NOT EDIT-- this file is automatically generated.
* created from NetBSD
*/
/* syscall: "syscall" ret: "int" args: */
#define LINUX_SYS_syscall 0
/* syscall: "exit" ret: "int" args: "int" */
#define LINUX_SYS_exit 1
/* syscall: "fork" ret: "int" args: */
#define LINUX_SYS_fork 2
/* syscall: "read" ret: "int" args: "int" "char *" "u_int" */
#define LINUX_SYS_read 3
/* syscall: "write" ret: "int" args: "int" "char *" "u_int" */
#define LINUX_SYS_write 4
/* syscall: "open" ret: "int" args: "const char *" "int" "int" */
#define LINUX_SYS_open 5
/* syscall: "close" ret: "int" args: "int" */
#define LINUX_SYS_close 6
/* syscall: "waitpid" ret: "int" args: "int" "int *" "int" */
#define LINUX_SYS_waitpid 7
/* syscall: "creat" ret: "int" args: "const char *" "int" */
#define LINUX_SYS_creat 8
/* syscall: "link" ret: "int" args: "const char *" "const char *" */
#define LINUX_SYS_link 9
/* syscall: "unlink" ret: "int" args: "const char *" */
#define LINUX_SYS_unlink 10
/* syscall: "execve" ret: "int" args: "const char *" "char **" "char **" */
#define LINUX_SYS_execve 11
/* syscall: "chdir" ret: "int" args: "const char *" */
#define LINUX_SYS_chdir 12
/* syscall: "time" ret: "int" args: "linux_time_t *" */
#define LINUX_SYS_time 13
/* syscall: "mknod" ret: "int" args: "const char *" "int" "int" */
#define LINUX_SYS_mknod 14
/* syscall: "chmod" ret: "int" args: "const char *" "int" */
#define LINUX_SYS_chmod 15
/* syscall: "lchown" ret: "int" args: "const char *" "int" "int" */
#define LINUX_SYS_lchown 16
/* 17 is obsolete break */
/* 18 is obsolete ostat */
/* syscall: "lseek" ret: "long" args: "int" "long" "int" */
#define LINUX_SYS_lseek 19
/* syscall: "getpid" ret: "pid_t" args: */
#define LINUX_SYS_getpid 20
/* 22 is obsolete umount */
/* syscall: "setuid" ret: "int" args: "uid_t" */
#define LINUX_SYS_setuid 23
/* syscall: "getuid" ret: "uid_t" args: */
#define LINUX_SYS_getuid 24
/* syscall: "stime" ret: "int" args: "linux_time_t *" */
#define LINUX_SYS_stime 25
/* syscall: "ptrace" ret: "int" args: "int" "int" "int" "int" */
#define LINUX_SYS_ptrace 26
/* syscall: "alarm" ret: "int" args: "unsigned int" */
#define LINUX_SYS_alarm 27
/* 28 is obsolete ofstat */
/* syscall: "pause" ret: "int" args: */
#define LINUX_SYS_pause 29
/* syscall: "utime" ret: "int" args: "const char *" "struct linux_utimbuf *" */
#define LINUX_SYS_utime 30
/* 31 is obsolete stty */
/* 32 is obsolete gtty */
/* syscall: "access" ret: "int" args: "const char *" "int" */
#define LINUX_SYS_access 33
/* syscall: "nice" ret: "int" args: "int" */
#define LINUX_SYS_nice 34
/* 35 is obsolete ftime */
/* syscall: "sync" ret: "int" args: */
#define LINUX_SYS_sync 36
/* syscall: "kill" ret: "int" args: "int" "int" */
#define LINUX_SYS_kill 37
/* syscall: "rename" ret: "int" args: "const char *" "const char *" */
#define LINUX_SYS_rename 38
/* syscall: "mkdir" ret: "int" args: "const char *" "int" */
#define LINUX_SYS_mkdir 39
/* syscall: "rmdir" ret: "int" args: "const char *" */
#define LINUX_SYS_rmdir 40
/* syscall: "dup" ret: "int" args: "u_int" */
#define LINUX_SYS_dup 41
/* syscall: "pipe" ret: "int" args: "int *" */
#define LINUX_SYS_pipe 42
/* syscall: "times" ret: "int" args: "struct times *" */
#define LINUX_SYS_times 43
/* 44 is obsolete prof */
/* syscall: "brk" ret: "int" args: "char *" */
#define LINUX_SYS_brk 45
/* syscall: "setgid" ret: "int" args: "gid_t" */
#define LINUX_SYS_setgid 46
/* syscall: "getgid" ret: "gid_t" args: */
#define LINUX_SYS_getgid 47
/* syscall: "signal" ret: "int" args: "int" "linux_handler_t" */
#define LINUX_SYS_signal 48
/* syscall: "geteuid" ret: "uid_t" args: */
#define LINUX_SYS_geteuid 49
/* syscall: "getegid" ret: "gid_t" args: */
#define LINUX_SYS_getegid 50
/* syscall: "acct" ret: "int" args: "char *" */
#define LINUX_SYS_acct 51
/* 53 is obsolete lock */
/* syscall: "ioctl" ret: "int" args: "int" "u_long" "caddr_t" */
#define LINUX_SYS_ioctl 54
/* syscall: "fcntl" ret: "int" args: "int" "int" "void *" */
#define LINUX_SYS_fcntl 55
/* 56 is obsolete mpx */
/* syscall: "setpgid" ret: "int" args: "int" "int" */
#define LINUX_SYS_setpgid 57
/* 58 is obsolete ulimit */
/* syscall: "olduname" ret: "int" args: "struct linux_old_utsname *" */
#define LINUX_SYS_olduname 59
/* syscall: "umask" ret: "int" args: "int" */
#define LINUX_SYS_umask 60
/* syscall: "chroot" ret: "int" args: "char *" */
#define LINUX_SYS_chroot 61
/* syscall: "dup2" ret: "int" args: "u_int" "u_int" */
#define LINUX_SYS_dup2 63
/* syscall: "getppid" ret: "pid_t" args: */
#define LINUX_SYS_getppid 64
/* syscall: "getpgrp" ret: "int" args: */
#define LINUX_SYS_getpgrp 65
/* syscall: "setsid" ret: "int" args: */
#define LINUX_SYS_setsid 66
/* syscall: "sigaction" ret: "int" args: "int" "const struct linux_old_sigaction *" "struct linux_old_sigaction *" */
#define LINUX_SYS_sigaction 67
/* syscall: "siggetmask" ret: "int" args: */
#define LINUX_SYS_siggetmask 68
/* syscall: "sigsetmask" ret: "int" args: "linux_old_sigset_t" */
#define LINUX_SYS_sigsetmask 69
/* syscall: "setreuid" ret: "int" args: "uid_t" "uid_t" */
#define LINUX_SYS_setreuid 70
/* syscall: "setregid" ret: "int" args: "gid_t" "gid_t" */
#define LINUX_SYS_setregid 71
/* syscall: "sigsuspend" ret: "int" args: "caddr_t" "int" "int" */
#define LINUX_SYS_sigsuspend 72
/* syscall: "sigpending" ret: "int" args: "linux_old_sigset_t *" */
#define LINUX_SYS_sigpending 73
/* syscall: "sethostname" ret: "int" args: "char *" "u_int" */
#define LINUX_SYS_sethostname 74
/* syscall: "setrlimit" ret: "int" args: "u_int" "struct orlimit *" */
#define LINUX_SYS_setrlimit 75
/* syscall: "getrlimit" ret: "int" args: "u_int" "struct orlimit *" */
#define LINUX_SYS_getrlimit 76
/* syscall: "getrusage" ret: "int" args: "int" "struct rusage *" */
#define LINUX_SYS_getrusage 77
/* syscall: "gettimeofday" ret: "int" args: "struct timeval *" "struct timezone *" */
#define LINUX_SYS_gettimeofday 78
/* syscall: "settimeofday" ret: "int" args: "struct timeval *" "struct timezone *" */
#define LINUX_SYS_settimeofday 79
/* syscall: "getgroups" ret: "int" args: "u_int" "gid_t *" */
#define LINUX_SYS_getgroups 80
/* syscall: "setgroups" ret: "int" args: "u_int" "gid_t *" */
#define LINUX_SYS_setgroups 81
/* syscall: "select" ret: "int" args: "int" "fd_set *" "fd_set *" "fd_set *" "struct timeval *" */
#define LINUX_SYS_select 82
/* syscall: "symlink" ret: "int" args: "const char *" "const char *" */
#define LINUX_SYS_symlink 83
/* syscall: "oolstat" ret: "int" args: "const char *" "struct stat43 *" */
#define LINUX_SYS_oolstat 84
/* syscall: "readlink" ret: "int" args: "const char *" "char *" "int" */
#define LINUX_SYS_readlink 85
/* syscall: "uselib" ret: "int" args: "const char *" */
#define LINUX_SYS_uselib 86
/* syscall: "swapon" ret: "int" args: "char *" */
#define LINUX_SYS_swapon 87
/* syscall: "reboot" ret: "int" args: "int" "int" "int" "void *" */
#define LINUX_SYS_reboot 88
/* syscall: "readdir" ret: "int" args: "int" "caddr_t" "unsigned int" */
#define LINUX_SYS_readdir 89
/* syscall: "powerpc_mmap" ret: "int" args: "unsigned long" "size_t" "int" "int" "int" "linux_off_t" */
#define LINUX_SYS_powerpc_mmap 90
/* syscall: "munmap" ret: "int" args: "caddr_t" "int" */
#define LINUX_SYS_munmap 91
/* syscall: "truncate" ret: "int" args: "const char *" "long" */
#define LINUX_SYS_truncate 92
/* syscall: "ftruncate" ret: "int" args: "int" "long" */
#define LINUX_SYS_ftruncate 93
/* syscall: "fchmod" ret: "int" args: "int" "int" */
#define LINUX_SYS_fchmod 94
/* syscall: "__posix_fchown" ret: "int" args: "int" "int" "int" */
#define LINUX_SYS___posix_fchown 95
/* syscall: "getpriority" ret: "int" args: "int" "int" */
#define LINUX_SYS_getpriority 96
/* syscall: "setpriority" ret: "int" args: "int" "int" "int" */
#define LINUX_SYS_setpriority 97
/* syscall: "profil" ret: "int" args: "caddr_t" "u_int" "u_int" "u_int" */
#define LINUX_SYS_profil 98
/* syscall: "statfs" ret: "int" args: "const char *" "struct linux_statfs *" */
#define LINUX_SYS_statfs 99
/* syscall: "fstatfs" ret: "int" args: "int" "struct linux_statfs *" */
#define LINUX_SYS_fstatfs 100
/* syscall: "ioperm" ret: "int" args: "unsigned int" "unsigned int" "int" */
#define LINUX_SYS_ioperm 101
/* syscall: "socketcall" ret: "int" args: "int" "void *" */
#define LINUX_SYS_socketcall 102
/* syscall: "setitimer" ret: "int" args: "u_int" "struct itimerval *" "struct itimerval *" */
#define LINUX_SYS_setitimer 104
/* syscall: "getitimer" ret: "int" args: "u_int" "struct itimerval *" */
#define LINUX_SYS_getitimer 105
/* syscall: "stat" ret: "int" args: "const char *" "struct linux_stat *" */
#define LINUX_SYS_stat 106
/* syscall: "lstat" ret: "int" args: "const char *" "struct linux_stat *" */
#define LINUX_SYS_lstat 107
/* syscall: "fstat" ret: "int" args: "int" "struct linux_stat *" */
#define LINUX_SYS_fstat 108
/* syscall: "uname" ret: "int" args: "struct linux_utsname *" */
#define LINUX_SYS_uname 109
/* syscall: "wait4" ret: "int" args: "int" "int *" "int" "struct rusage *" */
#define LINUX_SYS_wait4 114
/* syscall: "swapoff" ret: "int" args: "const char *" */
#define LINUX_SYS_swapoff 115
/* syscall: "sysinfo" ret: "int" args: "struct linux_sysinfo *" */
#define LINUX_SYS_sysinfo 116
/* syscall: "ipc" ret: "int" args: "int" "int" "int" "int" "caddr_t" */
#define LINUX_SYS_ipc 117
/* syscall: "fsync" ret: "int" args: "int" */
#define LINUX_SYS_fsync 118
/* syscall: "sigreturn" ret: "int" args: "struct linux_sigcontext *" */
#define LINUX_SYS_sigreturn 119
/* syscall: "clone" ret: "int" args: "int" "void *" */
#define LINUX_SYS_clone 120
/* syscall: "setdomainname" ret: "int" args: "char *" "int" */
#define LINUX_SYS_setdomainname 121
/* syscall: "new_uname" ret: "int" args: "struct linux_utsname *" */
#define LINUX_SYS_new_uname 122
/* syscall: "mprotect" ret: "int" args: "caddr_t" "int" "int" */
#define LINUX_SYS_mprotect 125
/* syscall: "sigprocmask" ret: "int" args: "int" "const linux_old_sigset_t *" "linux_old_sigset_t *" */
#define LINUX_SYS_sigprocmask 126
/* syscall: "getpgid" ret: "int" args: "int" */
#define LINUX_SYS_getpgid 132
/* syscall: "fchdir" ret: "int" args: "int" */
#define LINUX_SYS_fchdir 133
/* syscall: "personality" ret: "int" args: "int" */
#define LINUX_SYS_personality 136
/* syscall: "setfsuid" ret: "int" args: "uid_t" */
#define LINUX_SYS_setfsuid 138
/* syscall: "getfsuid" ret: "int" args: */
#define LINUX_SYS_getfsuid 139
/* syscall: "llseek" ret: "int" args: "int" "u_int32_t" "u_int32_t" "caddr_t" "int" */
#define LINUX_SYS_llseek 140
/* syscall: "getdents" ret: "int" args: "int" "struct linux_dirent *" "unsigned int" */
#define LINUX_SYS_getdents 141
/* syscall: "new_select" ret: "int" args: "int" "fd_set *" "fd_set *" "fd_set *" "struct timeval *" */
#define LINUX_SYS_new_select 142
/* syscall: "flock" ret: "int" args: "int" "int" */
#define LINUX_SYS_flock 143
/* syscall: "msync" ret: "int" args: "caddr_t" "int" "int" */
#define LINUX_SYS_msync 144
/* syscall: "readv" ret: "int" args: "int" "struct iovec *" "u_int" */
#define LINUX_SYS_readv 145
/* syscall: "writev" ret: "int" args: "int" "struct iovec *" "u_int" */
#define LINUX_SYS_writev 146
/* syscall: "getsid" ret: "pid_t" args: "pid_t" */
#define LINUX_SYS_getsid 147
/* syscall: "fdatasync" ret: "int" args: "int" */
#define LINUX_SYS_fdatasync 148
/* syscall: "__sysctl" ret: "int" args: "struct linux___sysctl *" */
#define LINUX_SYS___sysctl 149
/* syscall: "mlock" ret: "int" args: "caddr_t" "size_t" */
#define LINUX_SYS_mlock 150
/* syscall: "munlock" ret: "int" args: "caddr_t" "size_t" */
#define LINUX_SYS_munlock 151
/* syscall: "mlockall" ret: "int" args: "int" */
#define LINUX_SYS_mlockall 152
/* syscall: "munlockall" ret: "int" args: */
#define LINUX_SYS_munlockall 153
/* syscall: "sched_setparam" ret: "int" args: "pid_t" "const struct linux_sched_param *" */
#define LINUX_SYS_sched_setparam 154
/* syscall: "sched_getparam" ret: "int" args: "pid_t" "struct linux_sched_param *" */
#define LINUX_SYS_sched_getparam 155
/* syscall: "sched_setscheduler" ret: "int" args: "pid_t" "int" "const struct linux_sched_param *" */
#define LINUX_SYS_sched_setscheduler 156
/* syscall: "sched_getscheduler" ret: "int" args: "pid_t" */
#define LINUX_SYS_sched_getscheduler 157
/* syscall: "sched_yield" ret: "int" args: */
#define LINUX_SYS_sched_yield 158
/* syscall: "sched_get_priority_max" ret: "int" args: "int" */
#define LINUX_SYS_sched_get_priority_max 159
/* syscall: "sched_get_priority_min" ret: "int" args: "int" */
#define LINUX_SYS_sched_get_priority_min 160
/* syscall: "nanosleep" ret: "int" args: "const struct timespec *" "struct timespec *" */
#define LINUX_SYS_nanosleep 162
/* syscall: "mremap" ret: "void *" args: "void *" "size_t" "size_t" "u_long" */
#define LINUX_SYS_mremap 163
/* syscall: "setresuid" ret: "int" args: "uid_t" "uid_t" "uid_t" */
#define LINUX_SYS_setresuid 164
/* syscall: "getresuid" ret: "int" args: "uid_t *" "uid_t *" "uid_t *" */
#define LINUX_SYS_getresuid 165
/* syscall: "poll" ret: "int" args: "struct pollfd *" "u_int" "int" */
#define LINUX_SYS_poll 167
/* syscall: "setresgid" ret: "int" args: "gid_t" "gid_t" "gid_t" */
#define LINUX_SYS_setresgid 169
/* syscall: "getresgid" ret: "int" args: "gid_t *" "gid_t *" "gid_t *" */
#define LINUX_SYS_getresgid 170
/* syscall: "rt_sigreturn" ret: "int" args: "struct linux_rt_sigframe *" */
#define LINUX_SYS_rt_sigreturn 172
/* syscall: "rt_sigaction" ret: "int" args: "int" "const struct linux_sigaction *" "struct linux_sigaction *" "size_t" */
#define LINUX_SYS_rt_sigaction 173
/* syscall: "rt_sigprocmask" ret: "int" args: "int" "const linux_sigset_t *" "linux_sigset_t *" "size_t" */
#define LINUX_SYS_rt_sigprocmask 174
/* syscall: "rt_sigpending" ret: "int" args: "linux_sigset_t *" "size_t" */
#define LINUX_SYS_rt_sigpending 175
/* syscall: "rt_queueinfo" ret: "int" args: "int" "int" "void *" */
#define LINUX_SYS_rt_queueinfo 177
/* syscall: "rt_sigsuspend" ret: "int" args: "linux_sigset_t *" "size_t" */
#define LINUX_SYS_rt_sigsuspend 178
/* syscall: "pread" ret: "int" args: "int" "char *" "size_t" "linux_off_t" */
#define LINUX_SYS_pread 179
/* syscall: "pwrite" ret: "int" args: "int" "char *" "size_t" "linux_off_t" */
#define LINUX_SYS_pwrite 180
/* syscall: "chown" ret: "int" args: "const char *" "int" "int" */
#define LINUX_SYS_chown 181
/* syscall: "__getcwd" ret: "int" args: "char *" "size_t" */
#define LINUX_SYS___getcwd 182
/* syscall: "sigaltstack" ret: "int" args: "const struct linux_sigaltstack *" "struct linux_sigaltstack *" */
#define LINUX_SYS_sigaltstack 185
/* syscall: "__vfork14" ret: "int" args: */
#define LINUX_SYS___vfork14 189
#define LINUX_SYS_MAXSYSCALL 203

View File

@ -0,0 +1,649 @@
/* $NetBSD: linux_syscallargs.h,v 1.1 2001/01/19 01:31:26 manu Exp $ */
/*
* System call argument lists.
*
* DO NOT EDIT-- this file is automatically generated.
* created from NetBSD
*/
#ifndef _LINUX_SYS__SYSCALLARGS_H_
#define _LINUX_SYS__SYSCALLARGS_H_
#ifdef syscallarg
#undef syscallarg
#endif
#define syscallarg(x) \
union { \
register_t pad; \
struct { x datum; } le; \
struct { \
int8_t pad[ (sizeof (register_t) < sizeof (x)) \
? 0 \
: sizeof (register_t) - sizeof (x)]; \
x datum; \
} be; \
}
struct linux_sys_open_args {
syscallarg(const char *) path;
syscallarg(int) flags;
syscallarg(int) mode;
};
struct linux_sys_waitpid_args {
syscallarg(int) pid;
syscallarg(int *) status;
syscallarg(int) options;
};
struct linux_sys_creat_args {
syscallarg(const char *) path;
syscallarg(int) mode;
};
struct linux_sys_link_args {
syscallarg(const char *) path;
syscallarg(const char *) link;
};
struct linux_sys_unlink_args {
syscallarg(const char *) path;
};
struct linux_sys_execve_args {
syscallarg(const char *) path;
syscallarg(char **) argp;
syscallarg(char **) envp;
};
struct linux_sys_chdir_args {
syscallarg(const char *) path;
};
struct linux_sys_time_args {
syscallarg(linux_time_t *) t;
};
struct linux_sys_mknod_args {
syscallarg(const char *) path;
syscallarg(int) mode;
syscallarg(int) dev;
};
struct linux_sys_chmod_args {
syscallarg(const char *) path;
syscallarg(int) mode;
};
struct linux_sys_lchown_args {
syscallarg(const char *) path;
syscallarg(int) uid;
syscallarg(int) gid;
};
struct linux_sys_stime_args {
syscallarg(linux_time_t *) t;
};
struct linux_sys_ptrace_args {
syscallarg(int) request;
syscallarg(int) pid;
syscallarg(int) addr;
syscallarg(int) data;
};
struct linux_sys_alarm_args {
syscallarg(unsigned int) secs;
};
struct linux_sys_utime_args {
syscallarg(const char *) path;
syscallarg(struct linux_utimbuf *) times;
};
struct linux_sys_access_args {
syscallarg(const char *) path;
syscallarg(int) flags;
};
struct linux_sys_nice_args {
syscallarg(int) incr;
};
struct linux_sys_kill_args {
syscallarg(int) pid;
syscallarg(int) signum;
};
struct linux_sys_rename_args {
syscallarg(const char *) from;
syscallarg(const char *) to;
};
struct linux_sys_mkdir_args {
syscallarg(const char *) path;
syscallarg(int) mode;
};
struct linux_sys_rmdir_args {
syscallarg(const char *) path;
};
struct linux_sys_pipe_args {
syscallarg(int *) pfds;
};
struct linux_sys_times_args {
syscallarg(struct times *) tms;
};
struct linux_sys_brk_args {
syscallarg(char *) nsize;
};
struct linux_sys_signal_args {
syscallarg(int) signum;
syscallarg(linux_handler_t) handler;
};
struct linux_sys_ioctl_args {
syscallarg(int) fd;
syscallarg(u_long) com;
syscallarg(caddr_t) data;
};
struct linux_sys_fcntl_args {
syscallarg(int) fd;
syscallarg(int) cmd;
syscallarg(void *) arg;
};
struct linux_sys_olduname_args {
syscallarg(struct linux_old_utsname *) up;
};
struct linux_sys_sigaction_args {
syscallarg(int) signum;
syscallarg(const struct linux_old_sigaction *) nsa;
syscallarg(struct linux_old_sigaction *) osa;
};
struct linux_sys_sigsetmask_args {
syscallarg(linux_old_sigset_t) mask;
};
struct linux_sys_sigsuspend_args {
syscallarg(caddr_t) restart;
syscallarg(int) oldmask;
syscallarg(int) mask;
};
struct linux_sys_sigpending_args {
syscallarg(linux_old_sigset_t *) set;
};
struct linux_sys_select_args {
syscallarg(int) nfds;
syscallarg(fd_set *) readfds;
syscallarg(fd_set *) writefds;
syscallarg(fd_set *) exceptfds;
syscallarg(struct timeval *) timeout;
};
struct linux_sys_symlink_args {
syscallarg(const char *) path;
syscallarg(const char *) to;
};
struct linux_sys_readlink_args {
syscallarg(const char *) name;
syscallarg(char *) buf;
syscallarg(int) count;
};
struct linux_sys_uselib_args {
syscallarg(const char *) path;
};
struct linux_sys_swapon_args {
syscallarg(char *) name;
};
struct linux_sys_reboot_args {
syscallarg(int) magic1;
syscallarg(int) magic2;
syscallarg(int) cmd;
syscallarg(void *) arg;
};
struct linux_sys_readdir_args {
syscallarg(int) fd;
syscallarg(caddr_t) dent;
syscallarg(unsigned int) count;
};
struct linux_sys_powerpc_mmap_args {
syscallarg(unsigned long) addr;
syscallarg(size_t) len;
syscallarg(int) prot;
syscallarg(int) flags;
syscallarg(int) fd;
syscallarg(linux_off_t) offset;
};
struct linux_sys_truncate_args {
syscallarg(const char *) path;
syscallarg(long) length;
};
struct linux_sys_statfs_args {
syscallarg(const char *) path;
syscallarg(struct linux_statfs *) sp;
};
struct linux_sys_fstatfs_args {
syscallarg(int) fd;
syscallarg(struct linux_statfs *) sp;
};
struct linux_sys_ioperm_args {
syscallarg(unsigned int) lo;
syscallarg(unsigned int) hi;
syscallarg(int) val;
};
struct linux_sys_socketcall_args {
syscallarg(int) what;
syscallarg(void *) args;
};
struct linux_sys_stat_args {
syscallarg(const char *) path;
syscallarg(struct linux_stat *) sp;
};
struct linux_sys_lstat_args {
syscallarg(const char *) path;
syscallarg(struct linux_stat *) sp;
};
struct linux_sys_fstat_args {
syscallarg(int) fd;
syscallarg(struct linux_stat *) sp;
};
struct linux_sys_uname_args {
syscallarg(struct linux_utsname *) up;
};
struct linux_sys_wait4_args {
syscallarg(int) pid;
syscallarg(int *) status;
syscallarg(int) options;
syscallarg(struct rusage *) rusage;
};
struct linux_sys_swapoff_args {
syscallarg(const char *) path;
};
struct linux_sys_sysinfo_args {
syscallarg(struct linux_sysinfo *) arg;
};
struct linux_sys_ipc_args {
syscallarg(int) what;
syscallarg(int) a1;
syscallarg(int) a2;
syscallarg(int) a3;
syscallarg(caddr_t) ptr;
};
struct linux_sys_sigreturn_args {
syscallarg(struct linux_sigcontext *) scp;
};
struct linux_sys_clone_args {
syscallarg(int) flags;
syscallarg(void *) stack;
};
struct linux_sys_setdomainname_args {
syscallarg(char *) domainname;
syscallarg(int) len;
};
struct linux_sys_new_uname_args {
syscallarg(struct linux_utsname *) up;
};
struct linux_sys_sigprocmask_args {
syscallarg(int) how;
syscallarg(const linux_old_sigset_t *) set;
syscallarg(linux_old_sigset_t *) oset;
};
struct linux_sys_getpgid_args {
syscallarg(int) pid;
};
struct linux_sys_personality_args {
syscallarg(int) per;
};
struct linux_sys_setfsuid_args {
syscallarg(uid_t) uid;
};
struct linux_sys_llseek_args {
syscallarg(int) fd;
syscallarg(u_int32_t) ohigh;
syscallarg(u_int32_t) olow;
syscallarg(caddr_t) res;
syscallarg(int) whence;
};
struct linux_sys_getdents_args {
syscallarg(int) fd;
syscallarg(struct linux_dirent *) dent;
syscallarg(unsigned int) count;
};
struct linux_sys_new_select_args {
syscallarg(int) nfds;
syscallarg(fd_set *) readfds;
syscallarg(fd_set *) writefds;
syscallarg(fd_set *) exceptfds;
syscallarg(struct timeval *) timeout;
};
struct linux_sys_msync_args {
syscallarg(caddr_t) addr;
syscallarg(int) len;
syscallarg(int) fl;
};
struct linux_sys_fdatasync_args {
syscallarg(int) fd;
};
struct linux_sys___sysctl_args {
syscallarg(struct linux___sysctl *) lsp;
};
struct linux_sys_sched_setparam_args {
syscallarg(pid_t) pid;
syscallarg(const struct linux_sched_param *) sp;
};
struct linux_sys_sched_getparam_args {
syscallarg(pid_t) pid;
syscallarg(struct linux_sched_param *) sp;
};
struct linux_sys_sched_setscheduler_args {
syscallarg(pid_t) pid;
syscallarg(int) policy;
syscallarg(const struct linux_sched_param *) sp;
};
struct linux_sys_sched_getscheduler_args {
syscallarg(pid_t) pid;
};
struct linux_sys_sched_get_priority_max_args {
syscallarg(int) policy;
};
struct linux_sys_sched_get_priority_min_args {
syscallarg(int) policy;
};
struct linux_sys_mremap_args {
syscallarg(void *) old_address;
syscallarg(size_t) old_size;
syscallarg(size_t) new_size;
syscallarg(u_long) flags;
};
struct linux_sys_setresuid_args {
syscallarg(uid_t) ruid;
syscallarg(uid_t) euid;
syscallarg(uid_t) suid;
};
struct linux_sys_getresuid_args {
syscallarg(uid_t *) ruid;
syscallarg(uid_t *) euid;
syscallarg(uid_t *) suid;
};
struct linux_sys_setresgid_args {
syscallarg(gid_t) rgid;
syscallarg(gid_t) egid;
syscallarg(gid_t) sgid;
};
struct linux_sys_getresgid_args {
syscallarg(gid_t *) rgid;
syscallarg(gid_t *) egid;
syscallarg(gid_t *) sgid;
};
struct linux_sys_rt_sigreturn_args {
syscallarg(struct linux_rt_sigframe *) sfp;
};
struct linux_sys_rt_sigaction_args {
syscallarg(int) signum;
syscallarg(const struct linux_sigaction *) nsa;
syscallarg(struct linux_sigaction *) osa;
syscallarg(size_t) sigsetsize;
};
struct linux_sys_rt_sigprocmask_args {
syscallarg(int) how;
syscallarg(const linux_sigset_t *) set;
syscallarg(linux_sigset_t *) oset;
syscallarg(size_t) sigsetsize;
};
struct linux_sys_rt_sigpending_args {
syscallarg(linux_sigset_t *) set;
syscallarg(size_t) sigsetsize;
};
struct linux_sys_rt_queueinfo_args {
syscallarg(int) pid;
syscallarg(int) signum;
syscallarg(void *) uinfo;
};
struct linux_sys_rt_sigsuspend_args {
syscallarg(linux_sigset_t *) unewset;
syscallarg(size_t) sigsetsize;
};
struct linux_sys_pread_args {
syscallarg(int) fd;
syscallarg(char *) buf;
syscallarg(size_t) nbyte;
syscallarg(linux_off_t) offset;
};
struct linux_sys_pwrite_args {
syscallarg(int) fd;
syscallarg(char *) buf;
syscallarg(size_t) nbyte;
syscallarg(linux_off_t) offset;
};
struct linux_sys_chown_args {
syscallarg(const char *) path;
syscallarg(int) uid;
syscallarg(int) gid;
};
struct linux_sys_sigaltstack_args {
syscallarg(const struct linux_sigaltstack *) ss;
syscallarg(struct linux_sigaltstack *) oss;
};
/*
* System call prototypes.
*/
int sys_nosys(struct proc *, void *, register_t *);
int sys_exit(struct proc *, void *, register_t *);
int sys_fork(struct proc *, void *, register_t *);
int sys_read(struct proc *, void *, register_t *);
int sys_write(struct proc *, void *, register_t *);
int linux_sys_open(struct proc *, void *, register_t *);
int sys_close(struct proc *, void *, register_t *);
int linux_sys_waitpid(struct proc *, void *, register_t *);
int linux_sys_creat(struct proc *, void *, register_t *);
int linux_sys_link(struct proc *, void *, register_t *);
int linux_sys_unlink(struct proc *, void *, register_t *);
int linux_sys_execve(struct proc *, void *, register_t *);
int linux_sys_chdir(struct proc *, void *, register_t *);
int linux_sys_time(struct proc *, void *, register_t *);
int linux_sys_mknod(struct proc *, void *, register_t *);
int linux_sys_chmod(struct proc *, void *, register_t *);
int linux_sys_lchown(struct proc *, void *, register_t *);
int compat_43_sys_lseek(struct proc *, void *, register_t *);
int sys_getpid(struct proc *, void *, register_t *);
int sys_setuid(struct proc *, void *, register_t *);
int sys_getuid(struct proc *, void *, register_t *);
int linux_sys_stime(struct proc *, void *, register_t *);
int linux_sys_ptrace(struct proc *, void *, register_t *);
int linux_sys_alarm(struct proc *, void *, register_t *);
int linux_sys_pause(struct proc *, void *, register_t *);
int linux_sys_utime(struct proc *, void *, register_t *);
int linux_sys_access(struct proc *, void *, register_t *);
int linux_sys_nice(struct proc *, void *, register_t *);
int sys_sync(struct proc *, void *, register_t *);
int linux_sys_kill(struct proc *, void *, register_t *);
int linux_sys_rename(struct proc *, void *, register_t *);
int linux_sys_mkdir(struct proc *, void *, register_t *);
int linux_sys_rmdir(struct proc *, void *, register_t *);
int sys_dup(struct proc *, void *, register_t *);
int linux_sys_pipe(struct proc *, void *, register_t *);
int linux_sys_times(struct proc *, void *, register_t *);
int linux_sys_brk(struct proc *, void *, register_t *);
int sys_setgid(struct proc *, void *, register_t *);
int sys_getgid(struct proc *, void *, register_t *);
int linux_sys_signal(struct proc *, void *, register_t *);
int sys_geteuid(struct proc *, void *, register_t *);
int sys_getegid(struct proc *, void *, register_t *);
int sys_acct(struct proc *, void *, register_t *);
int linux_sys_ioctl(struct proc *, void *, register_t *);
int linux_sys_fcntl(struct proc *, void *, register_t *);
int sys_setpgid(struct proc *, void *, register_t *);
int linux_sys_olduname(struct proc *, void *, register_t *);
int sys_umask(struct proc *, void *, register_t *);
int sys_chroot(struct proc *, void *, register_t *);
int sys_dup2(struct proc *, void *, register_t *);
int sys_getppid(struct proc *, void *, register_t *);
int sys_getpgrp(struct proc *, void *, register_t *);
int sys_setsid(struct proc *, void *, register_t *);
int linux_sys_sigaction(struct proc *, void *, register_t *);
int linux_sys_siggetmask(struct proc *, void *, register_t *);
int linux_sys_sigsetmask(struct proc *, void *, register_t *);
int sys_setreuid(struct proc *, void *, register_t *);
int sys_setregid(struct proc *, void *, register_t *);
int linux_sys_sigsuspend(struct proc *, void *, register_t *);
int linux_sys_sigpending(struct proc *, void *, register_t *);
int compat_43_sys_sethostname(struct proc *, void *, register_t *);
int compat_43_sys_setrlimit(struct proc *, void *, register_t *);
int compat_43_sys_getrlimit(struct proc *, void *, register_t *);
int sys_getrusage(struct proc *, void *, register_t *);
int sys_gettimeofday(struct proc *, void *, register_t *);
int sys_settimeofday(struct proc *, void *, register_t *);
int sys_getgroups(struct proc *, void *, register_t *);
int sys_setgroups(struct proc *, void *, register_t *);
int linux_sys_select(struct proc *, void *, register_t *);
int linux_sys_symlink(struct proc *, void *, register_t *);
int compat_43_sys_lstat(struct proc *, void *, register_t *);
int linux_sys_readlink(struct proc *, void *, register_t *);
int linux_sys_uselib(struct proc *, void *, register_t *);
int linux_sys_swapon(struct proc *, void *, register_t *);
int linux_sys_reboot(struct proc *, void *, register_t *);
int linux_sys_readdir(struct proc *, void *, register_t *);
int linux_sys_powerpc_mmap(struct proc *, void *, register_t *);
int sys_munmap(struct proc *, void *, register_t *);
int linux_sys_truncate(struct proc *, void *, register_t *);
int compat_43_sys_ftruncate(struct proc *, void *, register_t *);
int sys_fchmod(struct proc *, void *, register_t *);
int sys___posix_fchown(struct proc *, void *, register_t *);
int sys_getpriority(struct proc *, void *, register_t *);
int sys_setpriority(struct proc *, void *, register_t *);
int sys_profil(struct proc *, void *, register_t *);
int linux_sys_statfs(struct proc *, void *, register_t *);
int linux_sys_fstatfs(struct proc *, void *, register_t *);
int linux_sys_ioperm(struct proc *, void *, register_t *);
int linux_sys_socketcall(struct proc *, void *, register_t *);
int sys_setitimer(struct proc *, void *, register_t *);
int sys_getitimer(struct proc *, void *, register_t *);
int linux_sys_stat(struct proc *, void *, register_t *);
int linux_sys_lstat(struct proc *, void *, register_t *);
int linux_sys_fstat(struct proc *, void *, register_t *);
int linux_sys_uname(struct proc *, void *, register_t *);
int linux_sys_wait4(struct proc *, void *, register_t *);
int linux_sys_swapoff(struct proc *, void *, register_t *);
int linux_sys_sysinfo(struct proc *, void *, register_t *);
int linux_sys_ipc(struct proc *, void *, register_t *);
int sys_fsync(struct proc *, void *, register_t *);
int linux_sys_sigreturn(struct proc *, void *, register_t *);
int linux_sys_clone(struct proc *, void *, register_t *);
int linux_sys_setdomainname(struct proc *, void *, register_t *);
int linux_sys_new_uname(struct proc *, void *, register_t *);
int sys_mprotect(struct proc *, void *, register_t *);
int linux_sys_sigprocmask(struct proc *, void *, register_t *);
int linux_sys_getpgid(struct proc *, void *, register_t *);
int sys_fchdir(struct proc *, void *, register_t *);
int linux_sys_personality(struct proc *, void *, register_t *);
int linux_sys_setfsuid(struct proc *, void *, register_t *);
int linux_sys_getfsuid(struct proc *, void *, register_t *);
int linux_sys_llseek(struct proc *, void *, register_t *);
int linux_sys_getdents(struct proc *, void *, register_t *);
int linux_sys_new_select(struct proc *, void *, register_t *);
int sys_flock(struct proc *, void *, register_t *);
int linux_sys_msync(struct proc *, void *, register_t *);
int sys_readv(struct proc *, void *, register_t *);
int sys_writev(struct proc *, void *, register_t *);
int sys_getsid(struct proc *, void *, register_t *);
int linux_sys_fdatasync(struct proc *, void *, register_t *);
int linux_sys___sysctl(struct proc *, void *, register_t *);
int sys_mlock(struct proc *, void *, register_t *);
int sys_munlock(struct proc *, void *, register_t *);
int sys_mlockall(struct proc *, void *, register_t *);
int sys_munlockall(struct proc *, void *, register_t *);
int linux_sys_sched_setparam(struct proc *, void *, register_t *);
int linux_sys_sched_getparam(struct proc *, void *, register_t *);
int linux_sys_sched_setscheduler(struct proc *, void *, register_t *);
int linux_sys_sched_getscheduler(struct proc *, void *, register_t *);
int linux_sys_sched_yield(struct proc *, void *, register_t *);
int linux_sys_sched_get_priority_max(struct proc *, void *, register_t *);
int linux_sys_sched_get_priority_min(struct proc *, void *, register_t *);
int sys_nanosleep(struct proc *, void *, register_t *);
int linux_sys_mremap(struct proc *, void *, register_t *);
int linux_sys_setresuid(struct proc *, void *, register_t *);
int linux_sys_getresuid(struct proc *, void *, register_t *);
int sys_poll(struct proc *, void *, register_t *);
int linux_sys_setresgid(struct proc *, void *, register_t *);
int linux_sys_getresgid(struct proc *, void *, register_t *);
int linux_sys_rt_sigreturn(struct proc *, void *, register_t *);
int linux_sys_rt_sigaction(struct proc *, void *, register_t *);
int linux_sys_rt_sigprocmask(struct proc *, void *, register_t *);
int linux_sys_rt_sigpending(struct proc *, void *, register_t *);
int linux_sys_rt_queueinfo(struct proc *, void *, register_t *);
int linux_sys_rt_sigsuspend(struct proc *, void *, register_t *);
int linux_sys_pread(struct proc *, void *, register_t *);
int linux_sys_pwrite(struct proc *, void *, register_t *);
int linux_sys_chown(struct proc *, void *, register_t *);
int sys___getcwd(struct proc *, void *, register_t *);
int linux_sys_sigaltstack(struct proc *, void *, register_t *);
int sys___vfork14(struct proc *, void *, register_t *);
#endif /* _LINUX_SYS__SYSCALLARGS_H_ */

View File

@ -0,0 +1,271 @@
/* $NetBSD: linux_termios.h,v 1.1 2001/01/19 01:31:26 manu Exp $ */
/*-
* Copyright (c) 1998, 2001 The NetBSD Foundation, Inc.
* All rights reserved.
*
* This code is derived from software contributed to The NetBSD Foundation
* by Eric Haszlakiewicz and Emmanuel Dreyfus.
*
* 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.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the NetBSD
* Foundation, Inc. and its contributors.
* 4. Neither the name of The NetBSD Foundation nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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.
*/
#ifndef _POWERPC_LINUX_TERMIOS_H
#define _POWERPC_LINUX_TERMIOS_H
/*
* From Linux's include/asm-ppc/termios.h
*/
#define LINUX_TCGETS _LINUX_IO('T', 19)
#define LINUX_TCSETS _LINUX_IO('T', 20)
#define LINUX_TCSETSW _LINUX_IO('T', 21)
#define LINUX_TCSETSF _LINUX_IO('T', 22)
#define LINUX_TCGETA _LINUX_IO('T', 24)
#define LINUX_TCSETA _LINUX_IO('T', 23)
#define LINUX_TCSETAW _LINUX_IO('T', 25)
#define LINUX_TCSETAF _LINUX_IO('T', 28)
#define LINUX_TCSBRK _LINUX_IO('T', 29)
#define LINUX_TCXONC _LINUX_IO('T', 30)
#define LINUX_TCFLSH _LINUX_IO('T', 31)
#define LINUX_TIOCEXCL 0x540c /* _LINUX_IO('T', ) */
#define LINUX_TIOCNXCL 0x540d /* _LINUX_IO('T', ) */
#define LINUX_TIOCSCTTY 0x540e /* _LINUX_IO('T', ) */
#define LINUX_TIOCGPGRP _LINUX_IO('T', 119)
#define LINUX_TIOCSPGRP _LINUX_IO('T', 118)
#define LINUX_TIOCOUTQ _LINUX_IO('T', 115)
#define LINUX_TIOCSTI 0x5412 /* _LINUX_IO('T', ) */
#define LINUX_TIOCGWINSZ _LINUX_IO('T', 104)
#define LINUX_TIOCSWINSZ _LINUX_IO('T', 103)
#define LINUX_TIOCMGET 0x5415 /* _LINUX_IO('T', ) */
#define LINUX_TIOCMBIS 0x5416 /* _LINUX_IO('T', ) */
#define LINUX_TIOCMBIC 0x5417 /* _LINUX_IO('T', ) */
#define LINUX_TIOCMSET 0x5418 /* _LINUX_IO('T', ) */
#define LINUX_TIOCGSOFTCAR 0x5419 /* _LINUX_IO('T', ) */
#define LINUX_TIOCSSOFTCAR 0x541a /* _LINUX_IO('T', ) */
#define LINUX_FIONREAD _LINUX_IO('F', 127)
#define LINUX_TIOCINQ LINUX_FIONREAD
#define LINUX_TIOCLINUX 0x541c /* _LINUX_IO('T', ) */
#define LINUX_TIOCCONS 0x541d /* _LINUX_IO('T', ) */
#define LINUX_TIOCGSERIAL 0x541e /* _LINUX_IO('T', ) */
#define LINUX_TIOCSSERIAL 0x541f /* _LINUX_IO('T', ) */
#define LINUX_TIOCPKT 0x5420 /* _LINUX_IO('T', ) */
#define LINUX_FIONBIO _LINUX_IO('F', 126)
#define LINUX_TIOCNOTTY 0x5422 /* _LINUX_IO('T', ) */
#define LINUX_TIOCSETD 0x5423 /* _LINUX_IO('T', ) */
#define LINUX_TIOCGETD 0x5424 /* _LINUX_IO('T', ) */
#define LINUX_TCSBRKP 0x5435 /* _LINUX_IO('T', ) */
#define LINUX_TIOCTTYGSTRUCT 0x5426 /* _LINUX_IO('T', ) */
#define LINUX_FIONCLEX _LINUX_IO('F', 2)
#define LINUX_FIOCLEX _LINUX_IO('F', 1)
#define LINUX_FIOASYNC _LINUX_IO('F', 125)
#define LINUX_TIOCSERCONFIG 0x5453 /* _LINUX_IO('T', 83) */
#define LINUX_TIOCSERGWILD 0x5454 /* _LINUX_IO('T', 84) */
#define LINUX_TIOCSERSWILD 0x5455 /* _LINUX_IO('T', 85) */
#define LINUX_TIOCGLCKTRMIOS 0x5456 /* _LINUX_IO('T', 86) */
#define LINUX_TIOCSLCKTRMIOS 0x5457 /* _LINUX_IO('T', 87) */
#define LINUX_TIOCSERGSTRUCT 0x5458 /* _LINUX_IO('T', 88) */
#define LINUX_TIOCSERGETLSR 0x5459 /* _LINUX_IO('T', 89) */
/*
* linux_termios c_cc chars:
* From Linux include/asm-ppc/termios.h AND include/asm-ppc/termbits.h
*/
#define LINUX_VINTR 0
#define LINUX_VQUIT 1
#define LINUX_VERASE 2
#define LINUX_VKILL 3
#define LINUX_VEOF 4
#define LINUX_VMIN 5
#define LINUX_VEOL 6
#define LINUX_VTIME 7
#define LINUX_VEOL2 8
#define LINUX_VSWTC 9
/*
* The following is from include/asm-ppc/termbits.h only
*/
#define LINUX_VWERASE 10
#define LINUX_VREPRINT 11
#define LINUX_VSUSP 12
#define LINUX_VSTART 13
#define LINUX_VSTOP 14
#define LINUX_VLNEXT 15
#define LINUX_VDISCARD 16
/*
* Old style linux_termio
* XXX Not found anywhere in Linux
*/
#define LINUX_OLD_VINTR LINUX_VINTR
#define LINUX_OLD_VQUIT LINUX_VQUIT
#define LINUX_OLD_VERASE LINUX_VERASE
#define LINUX_OLD_VKILL LINUX_VKILL
#define LINUX_OLD_VEOF LINUX_VEOF
#define LINUX_OLD_VMIN LINUX_VMIN
#define LINUX_OLD_VEOL LINUX_VEOL
#define LINUX_OLD_VTIME LINUX_VTIME
#define LINUX_OLD_VEOL2 LINUX_VEOL2
#define LINUX_OLD_VSWTC LINUX_VSWTC
/*
* All the remaining stuff is from Linux's include/asm-ppc/termbits.h
* Linux c_iflag masks
*/
#define LINUX_IGNBRK 0x0000001
#define LINUX_BRKINT 0x0000002
#define LINUX_IGNPAR 0x0000004
#define LINUX_PARMRK 0x0000010
#define LINUX_INPCK 0x0000020
#define LINUX_ISTRIP 0x0000040
#define LINUX_INLCR 0x0000100
#define LINUX_IGNCR 0x0000200
#define LINUX_ICRNL 0x0000400
#define LINUX_IXON 0x0001000
#define LINUX_IXOFF 0x0002000
#define LINUX_IXANY 0x0004000
#define LINUX_IUCLC 0x0010000
#define LINUX_IMAXBEL 0x0002000
/*
* Linux c_oflag masks
*/
#define LINUX_OPOST 0x0000001
#define LINUX_ONLCR 0x0000002
#define LINUX_OLCUC 0x0000004
#define LINUX_OCRNL 0x0000010
#define LINUX_ONOCR 0x0000020
#define LINUX_ONLRET 0x0000040
#define LINUX_OFILL 0x00000100
#define LINUX_OFDEL 0x00000200
#define LINUX_NLDLY 0x00001400
#define LINUX_NL0 0x00000000
#define LINUX_NL1 0x00000400
#define LINUX_NL2 0x00001000
#define LINUX_NL3 0x00001400
#define LINUX_TABDLY 0x00006000
#define LINUX_TAB0 0x00000000
#define LINUX_TAB1 0x00002000
#define LINUX_TAB2 0x00004000
#define LINUX_TAB3 0x00006000
#define LINUX_CRDLY 0x00030000
#define LINUX_CR0 0x00000000
#define LINUX_CR1 0x00010000
#define LINUX_CR2 0x00020000
#define LINUX_CR3 0x00030000
#define LINUX_FFDLY 0x00040000
#define LINUX_FF0 0x00000000
#define LINUX_FF1 0x00040000
#define LINUX_BSDLY 0x00100000
#define LINUX_BS0 0x00000000
#define LINUX_BS1 0x00100000
#define LINUX_VTDLY 0x00200000
#define LINUX_VT0 0x00000000
#define LINUX_VT1 0x00200000
/* Hmm.. Linux/i386 considers this part of TABDLY.. */
#define LINUX_XTABS 0x01000000
/*
* Linux c_cflag bit masks
* XXX not found in Linux, but it is needed to build
*/
#define LINUX_NSPEEDS 16
#define LINUX_CBAUD 0x0000377
#define LINUX_B0 0x0000000 /* hang up */
#define LINUX_B50 0x0000001
#define LINUX_B75 0x0000002
#define LINUX_B110 0x0000003
#define LINUX_B134 0x0000004
#define LINUX_B150 0x0000005
#define LINUX_B200 0x0000006
#define LINUX_B300 0x0000007
#define LINUX_B600 0x0000010
#define LINUX_B1200 0x0000011
#define LINUX_B1800 0x0000012
#define LINUX_B2400 0x0000013
#define LINUX_B4800 0x0000014
#define LINUX_B9600 0x0000015
#define LINUX_B19200 0x0000016
#define LINUX_B38400 0x0000017
#define LINUX_EXTA B19200
#define LINUX_EXTB B38400
#define LINUX_CBAUDEX 0x0000000
#define LINUX_B57600 0x00020
#define LINUX_B115200 0x00021
#define LINUX_B230400 0x00022
#define LINUX_B460800 0x00023
#define LINUX_B500000 0x00024
#define LINUX_B576000 0x00025
#define LINUX_B921600 0x00026
#define LINUX_B1000000 0x00027
#define LINUX_B1152000 0x00030
#define LINUX_B1500000 0x00031
#define LINUX_B2000000 0x00032
#define LINUX_B2500000 0x00033
#define LINUX_B3000000 0x00034
#define LINUX_B3500000 0x00035
#define LINUX_B4000000 0x00036
#define LINUX_CSIZE 0x00001400
#define LINUX_CS5 0x00000000
#define LINUX_CS6 0x00000400
#define LINUX_CS7 0x00001000
#define LINUX_CS8 0x00001400
#define LINUX_CSTOPB 0x00002000
#define LINUX_CREAD 0x00004000
#define LINUX_PARENB 0x00010000
#define LINUX_PARODD 0x00020000
#define LINUX_HUPCL 0x00040000
#define LINUX_CLOCAL 0x00100000
#define LINUX_CRTSCTS 0x020000000000 /* flow control */
/*
* Linux c_lflag masks
*/
#define LINUX_ISIG 0x00000080
#define LINUX_ICANON 0x00000100
#define LINUX_XCASE 0x00004000
#define LINUX_ECHO 0x00000008
#define LINUX_ECHOE 0x00000002
#define LINUX_ECHOK 0x00000004
#define LINUX_ECHONL 0x00000010
#define LINUX_NOFLSH 0x80000000
#define LINUX_TOSTOP 0x00400000
#define LINUX_ECHOCTL 0x00000040
#define LINUX_ECHOPRT 0x00000020
#define LINUX_ECHOKE 0x00000001
#define LINUX_FLUSHO 0x00800000
#define LINUX_PENDIN 0x20000000
#define LINUX_IEXTEN 0x00000400
#endif /* !_POWERPC_LINUX_TERMIOS_H */

View File

@ -0,0 +1,135 @@
/* $NetBSD: linux_types.h,v 1.1 2001/01/19 01:31:26 manu Exp $ */
/*-
* Copyright (c) 1995, 1998, 2001 The NetBSD Foundation, Inc.
* All rights reserved.
*
* This code is derived from software contributed to The NetBSD Foundation
* by Frank van der Linden, Eric Haszlakiewicz and Emmanuel Dreyfus.
*
* 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.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the NetBSD
* Foundation, Inc. and its contributors.
* 4. Neither the name of The NetBSD Foundation nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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.
*/
#ifndef _POWERPC_LINUX_TYPES_H
#define _POWERPC_LINUX_TYPES_H
/*
* from Linux's include/asm-ppc/posix-types.h
*/
typedef struct {
int val[2];
} linux_fsid_t;
typedef unsigned int linux_uid_t;
typedef unsigned int linux_gid_t;
typedef unsigned int linux_dev_t;
typedef unsigned int linux_ino_t;
typedef unsigned int linux_mode_t;
typedef unsigned short linux_nlink_t;
typedef long linux_time_t;
typedef long linux_clock_t;
typedef long linux_off_t;
typedef int linux_pid_t;
/*
* From Linux's include/asm-ppc/termbits.h
*/
typedef unsigned char linux_cc_t;
typedef unsigned int linux_speed_t;
typedef unsigned int linux_tcflag_t;
/*
* From Linux's include/asm-ppc/statfs.h
*/
struct linux_statfs {
long l_ftype; /* Linux name -> NetBSD Linux emul name: s/f_/I_f/ */
long l_fbsize;
long l_fblocks;
long l_fbfree;
long l_fbavail;
long l_ffiles;
long l_fffree;
linux_fsid_t l_ffsid;
long l_fnamelen;
long l_fspare[6];
};
/*
* From Linux's include/asm-ppc/stat.h
*/
struct linux_stat { /* warning: there is also a old_kernel_stat in Linux*/
linux_dev_t lst_dev;
linux_ino_t lst_ino; /* expect for unused fileds, of course */
linux_mode_t lst_mode;
linux_nlink_t lst_nlink;
linux_uid_t lst_uid;
linux_gid_t lst_gid;
linux_dev_t lst_rdev;
linux_off_t lst_size;
unsigned long lst_blksize;
unsigned long lst_blocks;
unsigned long lst_atime;
unsigned long unused1;
unsigned long lst_mtime;
unsigned long unused2;
unsigned long lst_ctime;
unsigned long unused3;
unsigned long unused4;
unsigned long unused5;
};
/*
* This matches struct stat64 in glibc2.1, hence the absolutely
* insane amounts of padding around dev_t's.
*
* Still from Linux'sinclude/asm-ppc/stat.h
*/
struct linux_stat64 {
unsigned long long lst_dev;
unsigned long long lst_ino;
unsigned int lst_mode;
unsigned int lst_nlink;
unsigned int lst_uid;
unsigned int lst_gid;
unsigned long long lst_rdev;
unsigned short int __pad2;
long long lst_size;
long lst_blksize;
long long lst_blocks; /* Number 512-byte blocks allocated. */
long lst_atime;
unsigned long int __unused1;
long lst_mtime;
unsigned long int __unused2;
long lst_ctime;
unsigned long int __unused3;
unsigned long int __unused4;
unsigned long int __unused5;
};
#endif /* !_POWERPC_LINUX_TYPES_H */

View File

@ -0,0 +1,362 @@
$NetBSD: syscalls.master,v 1.1 2001/01/19 01:31:27 manu Exp $
; @(#)syscalls.master 8.1 (Berkeley) 7/19/93
; Derived from NetBSD's sys/compat/linux/arch/i386/syscalls.master
; sys/compat/linux/arch/m68k/syscalls.master
; and from Linux's arch/ppc/kernel/misc.S
;
; We have problems for a few syscalls, specially:
; 142 ppc_select -> sys_new_select -> sys_select (Conflicts with 82 ???).
;
; Expect problems with the following, which have an architecture dependent
; implementation in Linux/powerpc:
; 29 pause
; 42 pipe tested. no problem.
; 59 olduname
; 101 ioperm
; 109 uname
; 117 ipc
;
; Most of syscalls after 182 that were introduced in Linux-2.4 are UNIMPL.
;
; The following are UNIMPL here. The Linux kernel implements them but just logs
; a kernel error and returns -ENOSYS.
; 110 iopl
; 113 vm86
; 123 modify_ldt
; 198 sys_pciconfig_read
; 199 sys_pciconfig_write
; 200 sys_pciconfig_iobase
;
; Emmanuel Dreyfus <p99dreyf@criens.u-psud.fr>
; NetBSD powerpc COMPAT_LINUX system call name/number "master" file.
; (See syscalls.conf to see what it is processed into.)
;
; Fields: number type [type-dependent ...]
; number system call number, must be in order
; type one of STD, OBSOL, UNIMPL, NODEF, NOARGS, or one of
; the compatibility options defined in syscalls.conf.
;
; types:
; STD always included
; OBSOL obsolete, not included in system
; UNIMPL unimplemented, not included in system
; NODEF included, but don't define the syscall number
; NOARGS included, but don't define the syscall args structure
; INDIR included, but don't define the syscall args structure
; and allow it to be "really" varargs.
;
; The compat options are defined in the syscalls.conf file, and the
; compat option name is prefixed to the syscall name. Other than
; that, they're like NODEF (for 'compat' options), or STD (for
; 'libcompat' options).
;
; The type-dependent arguments are as follows:
; For STD, NODEF, NOARGS, and compat syscalls:
; { pseudo-proto } [alias]
; For other syscalls:
; [comment]
;
; #ifdef's, etc. may be included, and are copied to the output files.
; #include's are copied to the syscall names and switch definition files only.
#if defined(_KERNEL) && !defined(_LKM)
#include "opt_compat_netbsd.h"
#include "opt_compat_43.h"
#endif
#include <sys/param.h>
#include <sys/poll.h>
#include <sys/systm.h>
#include <sys/signal.h>
#include <sys/mount.h>
#include <sys/syscallargs.h>
#include <compat/linux/common/linux_types.h>
#include <compat/linux/common/linux_signal.h>
#include <compat/linux/common/linux_siginfo.h>
#include <compat/linux/common/linux_machdep.h>
#include <compat/linux/common/linux_mmap.h>
#include <compat/linux/linux_syscallargs.h>
0 NOARGS { int sys_nosys(void); } syscall
1 NOARGS { int sys_exit(int rval); }
2 NOARGS { int sys_fork(void); }
3 NOARGS { int sys_read(int fd, char *buf, u_int nbyte); }
4 NOARGS { int sys_write(int fd, char *buf, u_int nbyte); }
5 STD { int linux_sys_open(const char *path, int flags, \
int mode); }
6 NOARGS { int sys_close(int fd); }
7 STD { int linux_sys_waitpid(int pid, int *status, \
int options);}
8 STD { int linux_sys_creat(const char *path, int mode); }
9 STD { int linux_sys_link(const char *path, const char *link); }
10 STD { int linux_sys_unlink(const char *path); }
11 STD { int linux_sys_execve(const char *path, char **argp, \
char **envp); }
12 STD { int linux_sys_chdir(const char *path); }
13 STD { int linux_sys_time(linux_time_t *t); }
14 STD { int linux_sys_mknod(const char *path, int mode, \
int dev); }
15 STD { int linux_sys_chmod(const char *path, int mode); }
16 STD { int linux_sys_lchown(const char *path, int uid, \
int gid); }
17 OBSOL break
18 OBSOL ostat
19 NOARGS { long compat_43_sys_lseek(int fd, long offset, \
int whence); }
20 NOARGS { pid_t sys_getpid(void); }
21 UNIMPL mount
22 OBSOL umount
23 NOARGS { int sys_setuid(uid_t uid); }
24 NOARGS { uid_t sys_getuid(void); }
25 STD { int linux_sys_stime(linux_time_t *t); }
26 STD { int linux_sys_ptrace(int request, int pid, \
int addr, int data); }
27 STD { int linux_sys_alarm(unsigned int secs); }
28 OBSOL ofstat
29 STD { int linux_sys_pause(void); }
30 STD { int linux_sys_utime(const char *path, \
struct linux_utimbuf *times); }
31 OBSOL stty
32 OBSOL gtty
33 STD { int linux_sys_access(const char *path, int flags); }
34 STD { int linux_sys_nice(int incr); }
35 OBSOL ftime
36 NOARGS { int sys_sync(void); }
37 STD { int linux_sys_kill(int pid, int signum); }
38 STD { int linux_sys_rename(const char *from, \
const char *to); }
39 STD { int linux_sys_mkdir(const char *path, int mode); }
40 STD { int linux_sys_rmdir(const char *path); }
41 NOARGS { int sys_dup(u_int fd); }
42 STD { int linux_sys_pipe(int *pfds); }
43 STD { int linux_sys_times(struct times *tms); }
44 OBSOL prof
45 STD { int linux_sys_brk(char *nsize); }
46 NOARGS { int sys_setgid(gid_t gid); }
47 NOARGS { gid_t sys_getgid(void); }
48 STD { int linux_sys_signal(int signum, \
linux_handler_t handler); }
49 NOARGS { uid_t sys_geteuid(void); }
50 NOARGS { gid_t sys_getegid(void); }
51 NOARGS { int sys_acct(char *path); }
52 UNIMPL umount
53 OBSOL lock
54 STD { int linux_sys_ioctl(int fd, u_long com, \
caddr_t data); }
55 STD { int linux_sys_fcntl(int fd, int cmd, void *arg); }
56 OBSOL mpx
57 NOARGS { int sys_setpgid(int pid, int pgid); }
58 OBSOL ulimit
59 STD { int linux_sys_olduname(struct linux_old_utsname *up); }
60 NOARGS { int sys_umask(int newmask); }
61 NOARGS { int sys_chroot(char *path); }
62 UNIMPL ustat
63 NOARGS { int sys_dup2(u_int from, u_int to); }
64 NOARGS { pid_t sys_getppid(void); }
65 NOARGS { int sys_getpgrp(void); }
66 NOARGS { int sys_setsid(void); }
67 STD { int linux_sys_sigaction(int signum, \
const struct linux_old_sigaction *nsa, \
struct linux_old_sigaction *osa); }
68 STD { int linux_sys_siggetmask(void); }
69 STD { int linux_sys_sigsetmask(linux_old_sigset_t mask); }
70 NOARGS { int sys_setreuid(uid_t ruid, uid_t euid); }
71 NOARGS { int sys_setregid(gid_t rgid, gid_t egid); }
72 STD { int linux_sys_sigsuspend(caddr_t restart, \
int oldmask, int mask); }
73 STD { int linux_sys_sigpending(linux_old_sigset_t *set); }
74 NOARGS { int compat_43_sys_sethostname(char *hostname, \
u_int len);}
75 NOARGS { int compat_43_sys_setrlimit(u_int which, \
struct orlimit *rlp); }
76 NOARGS { int compat_43_sys_getrlimit(u_int which, \
struct orlimit *rlp); }
77 NOARGS { int sys_getrusage(int who, struct rusage *rusage); }
78 NOARGS { int sys_gettimeofday(struct timeval *tp, \
struct timezone *tzp); }
79 NOARGS { int sys_settimeofday(struct timeval *tp, \
struct timezone *tzp); }
80 NOARGS { int sys_getgroups(u_int gidsetsize, gid_t *gidset); }
81 NOARGS { int sys_setgroups(u_int gidsetsize, gid_t *gidset); }
82 STD { int linux_sys_select(int nfds, fd_set* readfds, \
fd_set* writefds, fd_set* exceptfds, \
struct timeval *timeout); }
83 STD { int linux_sys_symlink(const char *path, \
const char *to); }
84 NOARGS { int compat_43_sys_lstat(const char *path, \
struct stat43 *up); } oolstat
85 STD { int linux_sys_readlink(const char *name, char *buf, \
int count); }
86 STD { int linux_sys_uselib(const char *path); }
87 STD { int linux_sys_swapon(char *name); }
88 STD { int linux_sys_reboot(int magic1, int magic2, \
int cmd, void *arg); }
89 STD { int linux_sys_readdir(int fd, caddr_t dent, \
unsigned int count); }
90 STD { int linux_sys_powerpc_mmap(unsigned long addr, size_t len, \
int prot, int flags, int fd, linux_off_t offset); }
91 NOARGS { int sys_munmap(caddr_t addr, int len); }
92 STD { int linux_sys_truncate(const char *path, \
long length); }
93 NOARGS { int compat_43_sys_ftruncate(int fd, long length); }
94 NOARGS { int sys_fchmod(int fd, int mode); }
95 NOARGS { int sys___posix_fchown(int fd, int uid, int gid); }
96 NOARGS { int sys_getpriority(int which, int who); }
97 NOARGS { int sys_setpriority(int which, int who, int prio); }
98 NOARGS { int sys_profil(caddr_t samples, u_int size, \
u_int offset, u_int scale); }
99 STD { int linux_sys_statfs(const char *path, \
struct linux_statfs *sp); }
100 STD { int linux_sys_fstatfs(int fd, \
struct linux_statfs *sp); }
101 STD { int linux_sys_ioperm(unsigned int lo, \
unsigned int hi, int val); }
102 STD { int linux_sys_socketcall(int what, void *args); }
103 UNIMPL syslog
104 NOARGS { int sys_setitimer(u_int which, \
struct itimerval *itv, struct itimerval *oitv); }
105 NOARGS { int sys_getitimer(u_int which, \
struct itimerval *itv); }
106 STD { int linux_sys_stat(const char *path, \
struct linux_stat *sp); }
107 STD { int linux_sys_lstat(const char *path, \
struct linux_stat *sp); }
108 STD { int linux_sys_fstat(int fd, struct linux_stat *sp); }
109 STD { int linux_sys_uname(struct linux_utsname *up); }
110 UNIMPL iopl
111 UNIMPL vhangup
112 UNIMPL idle
113 UNIMPL vm86old
114 STD { int linux_sys_wait4(int pid, int *status, \
int options, struct rusage *rusage); }
115 STD { int linux_sys_swapoff(const char *path); }
116 STD { int linux_sys_sysinfo(struct linux_sysinfo *arg); }
117 STD { int linux_sys_ipc(int what, int a1, int a2, int a3, \
caddr_t ptr); }
118 NOARGS { int sys_fsync(int fd); }
119 STD { int linux_sys_sigreturn(struct linux_sigcontext *scp); }
120 STD { int linux_sys_clone(int flags, void *stack); }
121 STD { int linux_sys_setdomainname(char *domainname, \
int len); }
122 STD { int linux_sys_new_uname(struct linux_utsname *up); }
123 UNIMPL modify_ldt
124 UNIMPL adjtimex
125 NOARGS { int sys_mprotect(caddr_t addr, int len, int prot); }
126 STD { int linux_sys_sigprocmask(int how, \
const linux_old_sigset_t *set, \
linux_old_sigset_t *oset); }
127 UNIMPL create_module
128 UNIMPL init_module
129 UNIMPL delete_module
130 UNIMPL get_kernel_syms
131 UNIMPL quotactl
132 STD { int linux_sys_getpgid(int pid); }
133 NOARGS { int sys_fchdir(int fd); }
134 UNIMPL bdflush
135 UNIMPL sysfs
136 STD { int linux_sys_personality(int per); }
137 UNIMPL afs_syscall
138 STD { int linux_sys_setfsuid(uid_t uid); }
139 NOARGS { int linux_sys_getfsuid(void); }
140 STD { int linux_sys_llseek(int fd, u_int32_t ohigh, \
u_int32_t olow, caddr_t res, int whence); }
141 STD { int linux_sys_getdents(int fd, \
struct linux_dirent *dent, unsigned int count); }
142 STD { int linux_sys_new_select(int nfds, fd_set *readfds, \
fd_set *writefds, fd_set *exceptfds, \
struct timeval *timeout); }
143 NOARGS { int sys_flock(int fd, int how); }
144 STD { int linux_sys_msync(caddr_t addr, int len, int fl); }
145 NOARGS { int sys_readv(int fd, struct iovec *iovp, \
u_int iovcnt); }
146 NOARGS { int sys_writev(int fd, struct iovec *iovp, \
u_int iovcnt); }
147 NOARGS { pid_t sys_getsid(pid_t pid); }
148 STD { int linux_sys_fdatasync(int fd); }
149 STD { int linux_sys___sysctl(struct linux___sysctl *lsp); }
150 NOARGS { int sys_mlock(caddr_t addr, size_t len); }
151 NOARGS { int sys_munlock(caddr_t addr, size_t len); }
152 NOARGS { int sys_mlockall(int flags); }
153 NOARGS { int sys_munlockall(void); }
154 STD { int linux_sys_sched_setparam(pid_t pid, \
const struct linux_sched_param *sp); }
155 STD { int linux_sys_sched_getparam(pid_t pid, \
struct linux_sched_param *sp); }
156 STD { int linux_sys_sched_setscheduler(pid_t pid, \
int policy, const struct linux_sched_param *sp); }
157 STD { int linux_sys_sched_getscheduler(pid_t pid); }
158 STD { int linux_sys_sched_yield(void); }
159 STD { int linux_sys_sched_get_priority_max(int policy); }
160 STD { int linux_sys_sched_get_priority_min(int policy); }
161 UNIMPL sched_rr_get_interval
162 NOARGS { int sys_nanosleep(const struct timespec *rqtp, \
struct timespec *rmtp); }
163 STD { void *linux_sys_mremap(void *old_address, \
size_t old_size, size_t new_size, u_long flags); }
164 STD { int linux_sys_setresuid(uid_t ruid, uid_t euid, \
uid_t suid); }
165 STD { int linux_sys_getresuid(uid_t *ruid, uid_t *euid, \
uid_t *suid); }
166 UNIMPL query_module
167 NOARGS { int sys_poll(struct pollfd *fds, u_int nfds, \
int timeout); }
168 UNIMPL nfsservctl
169 STD { int linux_sys_setresgid(gid_t rgid, gid_t egid, \
gid_t sgid); }
170 STD { int linux_sys_getresgid(gid_t *rgid, gid_t *egid, \
gid_t *sgid); }
171 UNIMPL prctl
172 STD { int linux_sys_rt_sigreturn( \
struct linux_rt_sigframe *sfp); }
173 STD { int linux_sys_rt_sigaction(int signum, \
const struct linux_sigaction *nsa, \
struct linux_sigaction *osa, \
size_t sigsetsize); }
174 STD { int linux_sys_rt_sigprocmask(int how, \
const linux_sigset_t *set, \
linux_sigset_t *oset, \
size_t sigsetsize); }
175 STD { int linux_sys_rt_sigpending( \
linux_sigset_t *set, \
size_t sigsetsize); }
176 UNIMPL rt_sigtimedwait
; XXX XAX int here? sigset_t here? siginfo_t
177 STD { int linux_sys_rt_queueinfo(int pid, int signum, \
void *uinfo); }
178 STD { int linux_sys_rt_sigsuspend(linux_sigset_t *unewset, \
size_t sigsetsize); }
179 STD { int linux_sys_pread(int fd, char *buf, \
size_t nbyte, linux_off_t offset); }
180 STD { int linux_sys_pwrite(int fd, char *buf, \
size_t nbyte, linux_off_t offset); }
181 STD { int linux_sys_chown(const char *path, \
int uid, int gid); }
182 NOARGS { int sys___getcwd(char *bufp, size_t length); }
183 UNIMPL capget
184 UNIMPL capset
185 STD { int linux_sys_sigaltstack( \
const struct linux_sigaltstack *ss, \
struct linux_sigaltstack *oss); }
186 UNIMPL sendfile
187 UNIMPL getpmsg
188 UNIMPL putpmsg
189 NOARGS { int sys___vfork14(void); }
190 UNIMPL sys_getrlimit
191 UNIMPL /* unused */
192 UNIMPL mmap2
193 UNIMPL truncate64
194 UNIMPL ftruncate64
195 UNIMPL stat64
196 UNIMPL lstat64
197 UNIMPL fstat64
198 UNIMPL sys_pciconfig_read
199 UNIMPL sys_pciconfig_write
200 UNIMPL sys_pciconfig_iobase
201 UNIMPL /* Unused (MacOnLinux project) */
202 UNIMPL sys_getdents64