freebsd-nq/lib
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
..
compat Add libgmp.so.3 from 4.7-RELEASE CDs. 2003-02-17 17:26:03 +00:00
csu This is now Gcc 3.3 WARNS 6 clean. 2003-05-04 18:34:00 +00:00
libalias style.Makefile(5) 2003-04-20 18:38:59 +00:00
libatm fix __FBSDID 2003-04-20 18:41:16 +00:00
libbind Removed now unused INTERNALSTATICLIB. 2002-05-13 11:09:07 +00:00
libbz2 Zap now-unused SHLIB_MINOR 2002-09-28 00:25:32 +00:00
libc Revamp of the syscall path, exception and context handling. The 2003-05-16 21:26:42 +00:00
libc_r Add stub implementations of pthread_[gs]etconcurrency to libc_r and 2003-04-20 01:53:13 +00:00
libcalendar
libcam english(4) police. 2002-12-27 12:15:40 +00:00
libcom_err
libcompat The .Fn function 2003-03-24 16:02:05 +00:00
libcrypt english(4) police. 2002-12-27 12:15:40 +00:00
libdevinfo Expand length of pnpinfo and length fields since pccard pnpinfo can 2003-02-17 18:56:00 +00:00
libdevstat Add prototype for compute_stats() so that libdevstat is WARNS=4 clean. 2003-04-19 07:42:13 +00:00
libdisk Teach libdisk that AMD64 works just like i386 2003-04-30 21:03:16 +00:00
libedit The .Fn function 2003-02-06 11:25:03 +00:00
libexpat english(4) police. 2002-12-27 12:15:40 +00:00
libfetch Mark libfetch as c99-clean. Always build at WARNS level 2 rather than 2003-05-01 14:39:43 +00:00
libform Make this a little easier to build standalone. (same change as libpanel) 2002-05-21 07:08:30 +00:00
libftpio english(4) police. 2002-12-27 12:15:40 +00:00
libgeom Collapse the meta arguments into normal arguments, trying to distinguish 2003-04-22 19:31:00 +00:00
libio
libipsec Buffer size is not enough in the previous commit. Use 128. 2003-04-17 07:20:00 +00:00
libipx Replace various spelling with FALLTHROUGH which is lint()able 2002-08-25 13:10:45 +00:00
libisc Zap now-unused SHLIB_MINOR 2002-09-28 00:25:32 +00:00
libkse Add a method of yielding the current thread with the scheduler 2003-05-16 19:58:30 +00:00
libkvm Revamp of the syscall path, exception and context handling. The 2003-05-16 21:26:42 +00:00
libmd The .Fn function 2003-03-24 16:02:05 +00:00
libmenu Make this a little easier to build standalone. (same change as libpanel) 2002-05-21 07:08:30 +00:00
libmilter Added new bsd.incs.mk which handles installing of header files 2002-05-12 16:01:00 +00:00
libmp Adjust for OpenSSL 0.9.7. 2003-01-28 23:03:15 +00:00
libncp No need to have ifdef < FreeBSD 4.0-current in here. Remove it to 2003-04-04 04:16:06 +00:00
libncurses Symlink with -f. 2003-04-30 15:49:40 +00:00
libnetgraph Correct typos, mostly s/ a / an / where appropriate. Some whitespace cleanup, 2003-01-01 18:49:04 +00:00
libopie Drop login.c and logwtmp.c from the library build. None of the apps 2002-10-04 00:24:31 +00:00
libpam OpenPAM is WANRS6-clean. 2003-05-05 21:15:35 +00:00
libpanel Initial update of bmake glue for ncurses-5.2-20020518 2002-05-21 05:41:07 +00:00
libpcap Zap now-unused SHLIB_MINOR 2002-09-28 00:25:32 +00:00
libpthread Add a method of yielding the current thread with the scheduler 2003-05-16 19:58:30 +00:00
libradius Zap now-unused SHLIB_MINOR 2002-09-28 00:25:32 +00:00
librpcsvc make rstat(3) return an 'enum clnt_stat' rather than an 'int' to match 2002-10-01 22:02:06 +00:00
libsbuf Enable WARNS?=2. 2002-01-06 08:47:19 +00:00
libsm Removed now unused INTERNALSTATICLIB. 2002-05-13 11:09:07 +00:00
libsmb Zap now-unused SHLIB_MINOR 2002-09-28 00:25:32 +00:00
libsmdb Removed now unused INTERNALSTATICLIB. 2002-05-13 11:09:07 +00:00
libsmutil Removed now unused INTERNALSTATICLIB. 2002-05-13 11:09:07 +00:00
libstand Restore bzip2(1) support in loader(8) after Peter's renames of 2003-04-25 06:44:56 +00:00
libtacplus mdoc(7) police: formatting nits. 2002-11-29 15:57:50 +00:00
libtelnet Removed now unused INTERNALSTATICLIB. 2002-05-13 11:09:07 +00:00
libthr Do some cleanup with respect to condition variables. The implementation 2003-05-15 18:17:13 +00:00
libufs MFp4: Fix copy&paste English error. 2003-03-30 18:00:24 +00:00
libugidfw Correct a couple small typos. 2003-01-07 13:18:21 +00:00
libusbhid Sync with NetBSD. 2003-04-09 01:52:49 +00:00
libutil Backout last commit. It is redundant in -CURRENT. 2003-05-05 06:25:03 +00:00
libvgl Correct typos, mostly s/ a / an / where appropriate. Some whitespace cleanup, 2003-01-01 18:49:04 +00:00
libwrap Following MLINKS added, which point to host_access(3): 2003-05-12 21:59:16 +00:00
libxpg4 Zap now-unused SHLIB_MINOR 2002-09-28 00:25:32 +00:00
liby Zap now-unused SHLIB_MINOR 2002-09-28 00:25:32 +00:00
libypclnt style.Makefile(5) police. 2003-03-09 19:56:21 +00:00
libz In src/lib/libz/gzio.c the function gzprintf does not check if the 2003-03-14 01:47:01 +00:00
msun AMD64 support (another IEEEFP platform) 2003-04-30 21:06:30 +00:00
ncurses Symlink with -f. 2003-04-30 15:49:40 +00:00
Makefile Turn MAKE_KERBEROS5 into NO_KERBEROS by negating the logic. Some extra 2003-05-05 07:58:44 +00:00
Makefile.inc Zap now-unused SHLIB_MINOR 2002-09-28 00:25:32 +00:00