freebsd-skq/sys/powerpc/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
altivec.h Add Altivec support for supported CPUs. This is derived from the FPU support 2009-02-20 17:48:40 +00:00
asm.h Align functions to 16-byte boundaries due to profiling granularity. 2008-04-03 17:40:20 +00:00
atomic.h Unbreak previous commit. 2008-11-22 22:15:34 +00:00
bat.h
bootinfo.h Obtain TSEC h/w address from the parent bus (OCP) and not rely blindly on what 2008-03-12 16:32:08 +00:00
bus_dma.h
bus.h
clock.h The "free-lance" timer in the i8254 is only used for the speaker 2008-03-26 20:09:21 +00:00
cpu.h Add a CPU features framework on PowerPC and simplify CPU setup a little 2009-11-28 17:33:19 +00:00
cpufunc.h Improve style(9) 2009-05-14 16:56:56 +00:00
db_machdep.h
dbdma.h Expand the DBDMA API to allow setting device-dependent control bits. While 2008-09-27 15:41:16 +00:00
elf.h Define architectural load bases for PIE binaries. Addresses were selected 2009-10-10 15:31:24 +00:00
endian.h Add support for little-endian compilations to this file. 2008-10-30 03:31:33 +00:00
exec.h
float.h Define LDBL_EPSILON, LDBL_MAX and LDBL_MIN as long double constants. 2008-11-16 19:20:29 +00:00
floatingpoint.h
fpu.h
frame.h Make Book-E debug register state part of the PCB context. 2009-02-27 12:08:24 +00:00
gdb_machdep.h Make remote GDB work for AIM processors. For BookE, the kernel 2008-03-17 00:46:52 +00:00
hid.h Turn on NAP mode on G5 systems, and refactor the HID0 setup code a little. 2009-10-24 18:33:01 +00:00
ieee.h
ieeefp.h
in_cksum.h
intr_machdep.h Add support for the U4 PCI-Express bridge chipset used in late-generation 2010-05-16 15:18:25 +00:00
intr.h The NetBSD Foundation has granted permission to remove clause 3 and 4 from 2010-03-03 17:07:02 +00:00
kdb.h
limits.h
md_var.h Add a CPU features framework on PowerPC and simplify CPU setup a little 2009-11-28 17:33:19 +00:00
memdev.h Remove the unused M_MEMDEV from the kernel. 2008-06-25 07:52:10 +00:00
metadata.h
mmuvar.h
mutex.h Initial support for SMP on PowerPC MPC85xx. 2009-05-21 11:43:37 +00:00
ocpbus.h Initial version of the sec(4) driver for the integrated security engine found 2009-06-06 09:37:55 +00:00
ofw_machdep.h Factor out platform dependent things unrelated to device drivers into a 2009-05-14 00:34:26 +00:00
openpicreg.h
openpicvar.h Add support for the BUS_CONFIG_INTR() method to the platform and to 2008-03-07 22:08:43 +00:00
param.h Add a new sysctl for reporting all of the supported page sizes. 2009-09-18 17:04:57 +00:00
pcb.h Make Book-E debug register state part of the PCB context. 2009-02-27 12:08:24 +00:00
pcpu.h Add SMP support on U3-based G5 systems. This does not yet work perfectly: 2009-10-23 03:17:02 +00:00
pio.h Provide 64-bit big endian bus space operations for PowerPC. They are required 2009-06-06 09:33:32 +00:00
platform.h Factor out platform dependent things unrelated to device drivers into a 2009-05-14 00:34:26 +00:00
platformvar.h Factor out platform dependent things unrelated to device drivers into a 2009-05-14 00:34:26 +00:00
pmap.h Provide missing members for Book-E pmap (and fix build). 2010-05-18 21:23:51 +00:00
pmc_mdep.h
proc.h Reorganize syscall entry and leave handling. 2010-05-23 18:32:02 +00:00
profile.h Add support for kernel profiling for both AIM and BookE. 2008-10-27 02:36:03 +00:00
psl.h
pte.h Close a race involving the OEA64 scratchpage. When the scratch page's 2010-02-24 00:54:37 +00:00
ptrace.h
reg.h
reloc.h
resource.h
runq.h
sc_machdep.h
setjmp.h
sf_buf.h Add support for 64-bit PowerPC CPUs operating in the 64-bit bridge mode 2009-04-04 00:22:44 +00:00
sigframe.h
signal.h
smp.h Add SMP support on U3-based G5 systems. This does not yet work perfectly: 2009-10-23 03:17:02 +00:00
spr.h The NetBSD Foundation has granted permission to remove clause 3 and 4 from 2010-03-03 17:07:02 +00:00
sr.h Reduce KVA pressure on OEA64 systems running in bridge mode by mapping 2010-02-20 16:23:29 +00:00
stack.h
stdarg.h
sysarch.h Add sysarch.h. It's included by drm(4). 2009-04-04 22:05:36 +00:00
tlb.h Rework BookE pmap towards multi-core support. 2009-01-13 15:41:58 +00:00
trap_aim.h Fix a typo in the SRR1 comparison for program exceptions. While here, 2009-04-19 06:30:00 +00:00
trap_booke.h
trap.h
ucontext.h
varargs.h
vm.h Add support to the virtual memory system for configuring machine- 2009-07-12 23:31:20 +00:00
vmparam.h Reduce KVA pressure on OEA64 systems running in bridge mode by mapping 2010-02-20 16:23:29 +00:00