freebsd-dev/sys/sparc64/include
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
..
_align.h Get rid of the _NO_NAMESPACE_POLLUTION kludge by creating an 2009-09-08 20:45:40 +00:00
_bus.h
_inttypes.h The NetBSD Foundation has granted permission to remove clause 3 and 4 from 2010-03-03 17:55:51 +00:00
_limits.h
_stdint.h
_types.h
asi.h Add support for SPARC64 V (and where it already makes sense for other 2010-05-02 19:38:17 +00:00
asm.h
asmacros.h Predict KASSERTs to be true. 2010-02-13 19:17:06 +00:00
atomic.h - bump __FreeBSD version to reflect added buf_ring, memory barriers, 2008-11-22 05:55:56 +00:00
bus_common.h - Add macros for the states of the interrupt clear registers. 2009-12-22 21:48:18 +00:00
bus_dma.h
bus_private.h Improve r185008 so the streaming cache is only flushed when 2009-02-10 21:51:33 +00:00
bus.h
cache.h Add support for SPARC64 V (and where it already makes sense for other 2010-05-02 19:38:17 +00:00
ccr.h
clock.h
cmt.h - Assert that HEAPSZ is a multiple of PAGE_SIZE as at least the firmware 2010-02-13 14:13:39 +00:00
cpu.h Some machines can not only consist of CPUs running at different speeds 2010-02-20 23:24:19 +00:00
cpufunc.h
db_machdep.h
dcr.h Correct the DCR_IPE macro to refer to the right bit. Also improve the 2010-04-10 11:13:51 +00:00
elf.h Change the load base to below 2GB so PIE binaries work including when 2009-10-18 13:08:15 +00:00
endian.h
exec.h
fireplane.h - Assert that HEAPSZ is a multiple of PAGE_SIZE as at least the firmware 2010-02-13 14:13:39 +00:00
float.h
floatingpoint.h
fp.h
frame.h
fsr.h
gdb_machdep.h
idprom.h
ieee.h
ieeefp.h
in_cksum.h Sync with the other archs and wrapper the prototype of in_cksum_skip(9) 2009-10-26 22:00:26 +00:00
instr.h
intr_machdep.h Merge from amd64/i386: 2009-12-24 15:43:37 +00:00
iommureg.h - Add support for the IOMMUs of Fire JBus to PCIe and Oberon Uranus 2009-12-23 22:02:34 +00:00
iommuvar.h - Add support for the IOMMUs of Fire JBus to PCIe and Oberon Uranus 2009-12-23 22:02:34 +00:00
jbus.h - Assert that HEAPSZ is a multiple of PAGE_SIZE as at least the firmware 2010-02-13 14:13:39 +00:00
kdb.h
kerneldump.h
ktr.h - Search the whole OFW device tree instead of only the children of the 2010-02-13 16:52:33 +00:00
limits.h
lsu.h Update for UltraSPARC-IV{,+} and SPARC64 V, VI, VII and VIIIfx CPUs. 2010-04-11 15:35:17 +00:00
mcntl.h Add support for SPARC64 V (and where it already makes sense for other 2010-05-02 19:38:17 +00:00
md_var.h Change ad_firmware_geom_adjust() to operate on a struct disk * only and 2010-05-20 12:46:19 +00:00
memdev.h
metadata.h
mutex.h
nexusvar.h - Add the 'cmp' and 'core' pseudo-busses which are used to group CPU cores 2010-02-13 18:51:49 +00:00
ofw_machdep.h Add OF_getscsinitid(), a helper similar to OF_getetheraddr() but for 2010-04-26 19:13:10 +00:00
ofw_mem.h
ofw_nexus.h
param.h Add a new sysctl for reporting all of the supported page sizes. 2009-09-18 17:04:57 +00:00
pcb.h Extract the code that records syscall results in the frame into MD 2009-11-10 11:43:07 +00:00
pcpu.h Some machines can not only consist of CPUs running at different speeds 2010-02-20 23:24:19 +00:00
pmap.h On Alan's advice, rather than do a wholesale conversion on a single 2010-04-30 00:46:43 +00:00
pmc_mdep.h
proc.h Reorganize syscall entry and leave handling. 2010-05-23 18:32:02 +00:00
profile.h
pstate.h
ptrace.h
reg.h
reloc.h
resource.h
runq.h
sc_machdep.h
setjmp.h
sf_buf.h
sigframe.h
signal.h
smp.h Some machines can not only consist of CPUs running at different speeds 2010-02-20 23:24:19 +00:00
stack.h
stdarg.h
sysarch.h
tick.h Some machines can not only consist of CPUs running at different speeds 2010-02-21 09:25:53 +00:00
tlb.h - Add TTE and context register bits for the additional page sizes supported 2010-03-17 20:23:14 +00:00
trap.h - There's no need to wrap kdb_active and kdb_trap() in #ifdef KDB as 2009-03-19 20:46:51 +00:00
tsb.h
tstate.h
tte.h - Add TTE and context register bits for the additional page sizes supported 2010-03-17 20:23:14 +00:00
ucontext.h
upa.h - Search the whole OFW device tree instead of only the children of the 2010-02-13 16:52:33 +00:00
utrap.h
varargs.h
ver.h Add macros for the VER.impl of SPARC64 II to VIIIfx. 2010-03-17 21:00:39 +00:00
vm.h Add support to the virtual memory system for configuring machine- 2009-07-12 23:31:20 +00:00
vmparam.h - Use the generally more appropriate PROM base rather than the 2009-02-10 21:48:42 +00:00
watch.h
wstate.h - The firmware of Sun Fire V1280 has a misfeature of setting %wstate to 2010-03-21 13:09:54 +00:00