freebsd-skq/sys/sun4v/sun4v
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
..
bus_machdep.c Merge r177565 from sparc64: 2010-02-01 10:18:00 +00:00
clock.c MFsparc64: r177642 2008-09-02 21:35:57 +00:00
db_hwwatch.c
db_interface.c
db_trace.c - In GCC 4.2 __builtin_frame_address() was fixed to include the 2008-10-27 21:31:14 +00:00
dump_machdep.c Place hostnames and similar information fully under the prison system. 2009-05-29 21:27:12 +00:00
exception.S
hcall.S
hv_pci.c Remove the MD isa_irq_pending() and the underlying PCI-specific 2008-04-26 11:01:38 +00:00
hvcons.c Last minute TTY API change: remove mutex argument from tty_alloc(). 2009-05-29 06:41:23 +00:00
hviommu.c
interrupt.S
intr_machdep.c
locore.S
machdep.c Change the arguments of exec_setregs() so that it receives a pointer 2010-03-25 14:24:00 +00:00
mp_exception.S
mp_locore.S
mp_machdep.c Implement a facility for dynamic per-cpu variables. 2009-06-23 22:42:39 +00:00
nexus.c Remove an header which is unused for sun4v. 2008-05-02 17:44:18 +00:00
pmap.c On entry to pmap_enter(), assert that the page is busy. While I'm 2010-05-16 23:45:10 +00:00
rtc.c
simdisk.c
stack_machdep.c Add additional checks of the kernel stack addresses in order to 2009-12-08 20:18:54 +00:00
support.S Modularize the Open Firmware client interface to allow run-time switching 2008-12-20 00:33:10 +00:00
swtch.S
tick.c
trap_trace.S
trap.c Reorganize syscall entry and leave handling. 2010-05-23 18:32:02 +00:00
tsb.c
tte_hash.c
tte.c
uio_machdep.c
vm_machdep.c Extract the code that records syscall results in the frame into MD 2009-11-10 11:43:07 +00:00
vnex.c Remove an header which is unused for sun4v. 2008-05-02 17:44:18 +00:00
wbuf.S