freebsd-dev/sys/i386/ibcs2
Konstantin Belousov afe1a68827 Reorganize syscall entry and leave handling.
Extend struct sysvec with three new elements:
sv_fetch_syscall_args - the method to fetch syscall arguments from
  usermode into struct syscall_args. The structure is machine-depended
  (this might be reconsidered after all architectures are converted).
sv_set_syscall_retval - the method to set a return value for usermode
  from the syscall. It is a generalization of
  cpu_set_syscall_retval(9) to allow ABIs to override the way to set a
  return value.
sv_syscallnames - the table of syscall names.

Use sv_set_syscall_retval in kern_sigsuspend() instead of hardcoding
the call to cpu_set_syscall_retval().

The new functions syscallenter(9) and syscallret(9) are provided that
use sv_*syscall* pointers and contain the common repeated code from
the syscall() implementations for the architecture-specific syscall
trap handlers.

Syscallenter() fetches arguments, calls syscall implementation from
ABI sysent table, and set up return frame. The end of syscall
bookkeeping is done by syscallret().

Take advantage of single place for MI syscall handling code and
implement ptrace_lwpinfo pl_flags PL_FLAG_SCE, PL_FLAG_SCX and
PL_FLAG_EXEC. The SCE and SCX flags notify the debugger that the
thread is stopped at syscall entry or return point respectively.  The
EXEC flag augments SCX and notifies debugger that the process address
space was changed by one of exec(2)-family syscalls.

The i386, amd64, sparc64, sun4v, powerpc and ia64 syscall()s are
changed to use syscallenter()/syscallret(). MIPS and arm are not
converted and use the mostly unchanged syscall() implementation.

Reviewed by:	jhb, marcel, marius, nwhitehorn, stas
Tested by:	marcel (ia64), marius (sparc64), nwhitehorn (powerpc),
	stas (mips)
MFC after:	1 month
2010-05-23 18:32:02 +00:00
..
coff.h
ibcs2_dirent.h
ibcs2_errno.c
ibcs2_errno.h
ibcs2_fcntl.c Add the new kernel-mode NFS Lock Manager. To use it instead of the 2008-03-26 15:23:12 +00:00
ibcs2_fcntl.h
ibcs2_ioctl.c Burn TTY ioctl bridges in compat layers. 2009-05-08 20:06:37 +00:00
ibcs2_ioctl.h
ibcs2_ipc.c Fix ibcs2_ipc.c build by adding missing limits.h include. 2009-06-25 07:25:39 +00:00
ibcs2_ipc.h
ibcs2_isc_syscall.h Regenerate system call tables to use SVN ids. 2009-05-08 20:16:04 +00:00
ibcs2_isc_sysent.c Regen for added flags field. 2009-06-17 19:53:20 +00:00
ibcs2_isc.c
ibcs2_misc.c Only allocate the space we need before calling kern_getgroups instead 2010-01-15 07:18:46 +00:00
ibcs2_mount.h
ibcs2_msg.c
ibcs2_other.c
ibcs2_proto.h As jhb@ pointed out to me, r197057 was incorrect, not least because these 2009-09-10 13:20:27 +00:00
ibcs2_signal.c
ibcs2_signal.h
ibcs2_socksys.c Place hostnames and similar information fully under the prison system. 2009-05-29 21:27:12 +00:00
ibcs2_socksys.h
ibcs2_stat.c Rename st_*timespec fields to st_*tim for POSIX 2008 compliance. 2010-03-28 13:13:22 +00:00
ibcs2_stat.h
ibcs2_statfs.h
ibcs2_stropts.h
ibcs2_syscall.h Regenerate ibcs2 system call table. 2009-05-08 20:08:43 +00:00
ibcs2_sysent.c Regenerate generated syscall files following changes to struct sysent in 2009-06-01 16:14:38 +00:00
ibcs2_sysi86.c FreeBSD/i386 doesn't include a software FPU emulator anymore, so adjust 2009-02-23 15:38:35 +00:00
ibcs2_sysvec.c Reorganize syscall entry and leave handling. 2010-05-23 18:32:02 +00:00
ibcs2_termios.h
ibcs2_time.h
ibcs2_types.h
ibcs2_unistd.h
ibcs2_ustat.h
ibcs2_util.c Implement the linux syscalls 2008-04-08 09:45:49 +00:00
ibcs2_util.h
ibcs2_utime.h
ibcs2_utsname.h
ibcs2_xenix_syscall.h Regenerate system call tables to use SVN ids. 2009-05-08 20:16:04 +00:00
ibcs2_xenix_sysent.c Regen for added flags field. 2009-06-17 19:53:20 +00:00
ibcs2_xenix.c Remove pad argument from ftruncate wrapper. Oops. 2007-07-05 05:32:44 +00:00
ibcs2_xenix.h Regenerate system call tables to use SVN ids. 2009-05-08 20:16:04 +00:00
imgact_coff.c Decontextualize the couplet VOP_GETATTR / VOP_SETATTR as the passed thread 2008-08-28 15:23:18 +00:00
Makefile
syscalls.conf
syscalls.isc
syscalls.isc.conf
syscalls.master Remove unused LIBCOMPAT keyword from syscalls.master. 2010-02-08 10:02:01 +00:00
syscalls.xenix
syscalls.xenix.conf