freebsd-skq/sys
Marcel Moolenaar f2c49dd248 Revamp of the syscall path, exception and context handling. The
prime objectives are:
o  Implement a syscall path based on the epc inststruction (see
   sys/ia64/ia64/syscall.s).
o  Revisit the places were we need to save and restore registers
   and define those contexts in terms of the register sets (see
   sys/ia64/include/_regset.h).

Secundairy objectives:
o  Remove the requirement to use contigmalloc for kernel stacks.
o  Better handling of the high FP registers for SMP systems.
o  Switch to the new cpu_switch() and cpu_throw() semantics.
o  Add a good unwinder to reconstruct contexts for the rare
   cases we need to (see sys/contrib/ia64/libuwx)

Many files are affected by this change. Functionally it boils
down to:
o  The EPC syscall doesn't preserve registers it does not need
   to preserve and places the arguments differently on the stack.
   This affects libc and truss.
o  The address of the kernel page directory (kptdir) had to
   be unstaticized for use by the nested TLB fault handler.
   The name has been changed to ia64_kptdir to avoid conflicts.
   The renaming affects libkvm.
o  The trapframe only contains the special registers and the
   scratch registers. For syscalls using the EPC syscall path
   no scratch registers are saved. This affects all places where
   the trapframe is accessed. Most notably the unaligned access
   handler, the signal delivery code and the debugger.
o  Context switching only partly saves the special registers
   and the preserved registers. This affects cpu_switch() and
   triggered the move to the new semantics, which additionally
   affects cpu_throw().
o  The high FP registers are either in the PCB or on some
   CPU. context switching for them is done lazily. This affects
   trap().
o  The mcontext has room for all registers, but not all of them
   have to be defined in all cases. This mostly affects signal
   delivery code now. The *context syscalls are as of yet still
   unimplemented.

Many details went into the removal of the requirement to use
contigmalloc for kernel stacks. The details are mostly CPU
specific and limited to exception_save() and exception_restore().
The few places where we create, destroy or switch stacks were
mostly simplified by not having to construct physical addresses
and additionally saving the virtual addresses for later use.

Besides more efficient context saving and restoring, which of
course yields a noticable speedup, this also fixes the dreaded
SMP bootup problem as a side-effect. The details of which are
still not fully understood.

This change includes all the necessary backward compatibility
code to have it handle older userland binaries that use the
break instruction for syscalls. Support for break-based syscalls
has been pessimized in favor of a clean implementation. Due to
the overall better performance of the kernel, this will still
be notived as an improvement if it's noticed at all.

Approved by: re@ (jhb)
2003-05-16 21:26:42 +00:00
..
alpha - Merge struct procsig with struct sigacts. 2003-05-13 20:36:02 +00:00
amd64 Initialize logical_cpus_mask when the logical CPUs are enumerated in 2003-05-15 05:12:24 +00:00
arm Style fixes. 2003-05-04 22:13:04 +00:00
boot Add variables for missing network drivers. 2003-05-16 04:31:00 +00:00
cam Add a quirk for OTi USB flash key. 2003-05-15 17:35:35 +00:00
coda - Move p->p_sigmask to td->td_sigmask. Signal masks will be per thread with 2003-03-31 22:49:17 +00:00
compat Collect the nastiness for preserving the kernel MSR_GSBASE around the 2003-05-15 00:23:40 +00:00
conf Revamp of the syscall path, exception and context handling. The 2003-05-16 21:26:42 +00:00
contrib This commit was generated by cvs2svn to compensate for changes in r115013, 2003-05-15 05:04:44 +00:00
crypto Assembly files put thru the C preprocessor need to have C style comments. 2003-04-21 16:30:12 +00:00
ddb Move the _oncpu entry from the KSE to the thread. 2003-04-10 17:35:44 +00:00
dev Use vm_object_deallocate(), not vm_pager_deallocate(), to destroy a 2003-05-16 07:28:27 +00:00
fs Clean up proc locking in procfs: make sure the proc lock is held before 2003-05-05 15:12:51 +00:00
geom When a disk disappears, destroy the class from the event thread 2003-05-12 20:15:28 +00:00
gnu This commit was generated by cvs2svn to compensate for changes in r113778, 2003-04-21 02:27:52 +00:00
i4b - Add vm_paddr_t, a physical address type. This is required for systems 2003-03-25 00:07:06 +00:00
i386 In cpu_fork(), initialize pcb_psl for the new process to PSL_KERNEL, 2003-05-16 01:10:33 +00:00
ia64 Revamp of the syscall path, exception and context handling. The 2003-05-16 21:26:42 +00:00
isa Only use the pc bios stuff on i386's. I think this might even be unused 2003-05-01 04:23:15 +00:00
isofs/cd9660 Rename vfs_stdsync function to vfs_stdnosync which matches more 2003-03-11 22:15:10 +00:00
kern Revamp of the syscall path, exception and context handling. The 2003-05-16 21:26:42 +00:00
libkern Deprecate machine/limits.h in favor of new sys/limits.h. 2003-04-29 13:36:06 +00:00
modules Move the ips driver from ${MACHINE_ARCH} == "i386" to ${MACHINE} == "i386". 2003-05-13 11:26:08 +00:00
net Define a link layer MIB for ATM. Most fields of this MIB are needed by 2003-05-05 16:35:52 +00:00
netatalk - Use if_broadcastaddr from struct ifnet rather than relying on 2003-03-21 17:53:16 +00:00
netatm Use __FBSDID rather than rcsid[]. 2003-04-03 21:36:33 +00:00
netgraph fix a cut-n-paste error. 2003-05-15 18:51:28 +00:00
netinet Correct a bug introduced with reduced TCP state handling; make 2003-05-07 05:26:27 +00:00
netinet6 Add definitions for IN6ADDR_LINKLOCAL_ALLMDNS_INIT and INADDR_ALLMDNS_GROUP. 2003-04-29 22:03:46 +00:00
netipsec Introduce an M_ASSERTPKTHDR() macro which performs the very common task 2003-04-08 14:25:47 +00:00
netipx Remove unimplemented IP-in-IPX encapsulation support (options IPTUNNEL). 2003-03-08 06:58:22 +00:00
netkey Introduce an M_ASSERTPKTHDR() macro which performs the very common task 2003-04-08 14:25:47 +00:00
netnatm Introduce an M_ASSERTPKTHDR() macro which performs the very common task 2003-04-08 14:25:47 +00:00
netncp - Merge struct procsig with struct sigacts. 2003-05-13 20:36:02 +00:00
netsmb - Merge struct procsig with struct sigacts. 2003-05-13 20:36:02 +00:00
nfs
nfsclient This change grabs the vnode lock for NFS client vnodes when calling 2003-05-15 21:12:08 +00:00
nfsserver - Acquire the vm_object's lock when performing vm_object_page_clean(). 2003-04-24 04:31:25 +00:00
opencrypto Gigacommit to improve device-driver source compatibility between 2003-03-03 12:15:54 +00:00
pc98 Clear up that COMPAT_43 may not do the same thing on every architecture 2003-05-15 02:10:30 +00:00
pccard 1. Allow drivers to query CIS strings from OLDCARD. 2003-04-23 23:39:21 +00:00
pci Only use a SIA/SYM media info block if no MII block is detected. 2003-05-15 16:53:29 +00:00
posix4
powerpc - Merge struct procsig with struct sigacts. 2003-05-13 20:36:02 +00:00
rpc
security Rename MAC_MAX_POLICIES to MAC_MAX_SLOTS, since the variables and 2003-05-08 19:49:42 +00:00
sparc64 - Merge struct procsig with struct sigacts. 2003-05-13 20:36:02 +00:00
sys Revamp of the syscall path, exception and context handling. The 2003-05-16 21:26:42 +00:00
tools MFp4: 2003-03-28 06:43:50 +00:00
ufs Jeff added locking assertions that the VV_ flags on vnodes were modified 2003-05-15 21:07:33 +00:00
vm - Merge struct procsig with struct sigacts. 2003-05-13 20:36:02 +00:00
Makefile Exclude sys/boot for amd64. There are still toolchain issues to deal 2003-05-08 06:35:39 +00:00