freebsd-skq/sys/ia64
marcel b4eb6c7533 Use get_mcontext() to construct the signal context in sendsig() and
use set_mcontext() to restore the context in sigreturn(). Since we
put the syscall number and the syscall arguments in the trapframe
(we don't save the scratch registers for syscalls, which allows us
to reuse the space to our advantage), create a MD specific flag so
that we save the scratch registers even for syscalls. We would not
be able to restart a syscall otherwise.

The signal trampoline does not need to flush the regiters anymore,
because get_mcontext() already handles that. In fact, if we set up
the context correctly, we do not need to have a trampoline at all.
This change however only minimally changes the trampoline code. In
follow-up commits this can be further optimized.

Note that normally we preserve cfm and iip in the trapframe created
by the EPC syscall path when we restore a context in set_mcontext()
because those fields are not normally set for a synchronuous context.
The kernel puts the return address and frame info of the syscall
stub in there. By preserving these fields we hide this detail from
userland which allows us to use setcontext(2) for user created
contexts. However, sigreturn() is commonly called from the trampoline,
which means that if we preserve cfm and iip in all cases, we would
return to the trampoline after the sigreturn(), which means we hit
the safety net: we call exit(2). So, we do not preserve cfm and iip
when we have a synchronous context that also has scratch registers
(the uncommon context created by sendsig() only), under the assumption
that if such a context is created in userland, something special is
going on and the use of cfm and iip is then just another quirk. All
this is invisible in the common case.
2003-11-09 22:17:36 +00:00
..
acpica Move the definitions for ACPI MADT table entries not present in the ACPICA 2003-09-10 06:32:27 +00:00
compile
conf Remove the atkbd, psm, sc and vga devices. Most ia64 boxes out there 2003-11-08 23:19:13 +00:00
disasm Remove two unused fields in the operand structure (o_read & o_write). 2003-10-24 02:05:53 +00:00
ia32 Regen. 2003-11-07 20:30:30 +00:00
ia64 Use get_mcontext() to construct the signal context in sendsig() and 2003-11-09 22:17:36 +00:00
include Use get_mcontext() to construct the signal context in sendsig() and 2003-11-09 22:17:36 +00:00
isa Mega busdma API commit. 2003-07-01 15:52:06 +00:00
pci