freebsd with flexible iflib nic queues
Go to file
Marcel Moolenaar 1d67adffd6 This file contains the code that implements the syscall path based
on the epc instruction. The epc instruction, given the permissions
of the page in which the epc is located, allows the privilege level
to be increased with little or no overhead. The previous privilege
level is recorded in the current frame marker and is restored by
a regular (function) return.
Since the epc instruction has to live in a page with non-standard
properties, we hardwire a "gateway" page in the address space. The
address of the gateway page is exported to userland in ar.k7. This
allows us to rewire the page without breaking the ABI.
The syscall stubs in libc are regular function calls that slightly
differ from the normal runtime. The difference is mostly to simplify
the stubs themselves by by moving some of the logic to the kernel.
The libc stubs call into the gateway page (offset 0), from where the
kernel trampolines to the code that sets up a minimal trapframe and
arranges to execute from the kernel stack.
The way back is basicly the same. The kernel returns to the gateway
page, whereby privilege is dropped, and jumps back to the syscall
stub.
Only the special registers are saved in the trapframe. None of the
scratch registers are preserved and since the kernel follows the
same runtime model, none of the preserved registers are saved.
Future enhancements can include the implementation of lightweight
syscalls, where kernel functions are performed without setting up
a trapframe. Good candidates are the *context syscalls for example.

Now that there's a gateway page from which code can be executed in
a non-privileged context, we also have the ideal place to put the
signal trampolines. By moving the signal trampolines from the user
stack to the gateway page, we open up the doors to unexecutable
stacks. The gateway page contains signal trampolines for both the
"legacy" break-based syscall code and the new and improved epc-
based syscall code.

Approved: re@ (blanket)
2003-05-15 07:51:22 +00:00
bin Note that -n and \c are implementation-defined as per TC1 to POSIX 2001. 2003-05-08 17:47:28 +00:00
contrib Fix up external variables named "debug" that have a horrible habit 2003-05-11 18:17:00 +00:00
crypto Revert unnecessary part of previous commit. 2003-05-13 10:18:49 +00:00
etc Add new directories from the XFree86 4.3.0 update. 2003-05-14 07:23:54 +00:00
games Make the __FBSDID usage consistent 2003-05-05 09:52:25 +00:00
gnu Set the binutils arch for as/nm correctly on the amd64 platform. 2003-05-08 06:39:31 +00:00
include Centralize _PATH_* definitions. 2003-05-05 22:49:23 +00:00
kerberos5 Remove some KRB4 scraps, and allow NOSHARED make worlds to 2003-05-11 18:49:29 +00:00
lib s/procsig/sigacts/ to catch up to procsig and sigacts changes in the kernel. 2003-05-14 15:01:20 +00:00
libexec Allow a NOPIC "make world" to complete. 2003-05-11 18:48:29 +00:00
release Fix typo in rev 1.69. Also clarify a line. 2003-05-15 01:28:39 +00:00
sbin Allow zero or more actions in an action list, rather than requiring 2003-05-15 02:23:32 +00:00
secure Turn MAKE_KERBEROS5 into NO_KERBEROS by negating the logic. Some extra 2003-05-05 07:58:44 +00:00
share According to revision 1.6 of iir.c, the latest import should have resolved 2003-05-14 17:53:40 +00:00
sys This file contains the code that implements the syscall path based 2003-05-15 07:51:22 +00:00
tools Start mailing -CURRENT tinderbox failures to the lists. 2003-05-06 04:04:02 +00:00
usr.bin Bring in NetBSD's version 1.11, which includes documenation for the new 2003-05-11 23:07:07 +00:00
usr.sbin When getting back an NLM DENIED response for a requested lock from the 2003-05-15 03:19:30 +00:00
COPYRIGHT
MAINTAINERS OBE 2003-04-27 05:51:12 +00:00
Makefile
Makefile.inc1 Install symlinks to individual headers instead of symlinks to directories 2003-05-05 12:54:26 +00:00
README
UPDATING Announce the Kerberos5 changes. 2003-05-05 20:05:37 +00:00

This is the top level of the FreeBSD source directory.  This file
was last revised on:
$FreeBSD$

For copyright information, please see the file COPYRIGHT in this
directory (additional copyright information also exists for some
sources in this tree - please see the specific source directories for
more information).

The Makefile in this directory supports a number of targets for
building components (or all) of the FreeBSD source tree, the most
commonly used one being ``world'', which rebuilds and installs
everything in the FreeBSD system from the source tree except the
kernel, the kernel-modules and the contents of /etc.  The
``buildkernel'' and ``installkernel'' targets build and install
the kernel and the modules (see below).  Please see the top of
the Makefile in this directory for more information on the
standard build targets and compile-time flags.

Building a kernel is a somewhat more involved process, documentation
for which can be found at:
   http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig.html
And in the config(8) man page.
Note: If you want to build and install the kernel with the
``buildkernel'' and ``installkernel'' targets, you might need to build
world before.  More information is available in the handbook.

The sample kernel configuration files reside in the sys/<arch>/conf
sub-directory (assuming that you've installed the kernel sources), the
file named GENERIC being the one used to build your initial installation
kernel.  The file NOTES contains entries and documentation for all possible
devices, not just those commonly used.  It is the successor of the ancient
LINT file, but in contrast to LINT, it is not buildable as a kernel but a
pure reference and documentation file.


Source Roadmap:
---------------
bin		System/user commands.

contrib		Packages contributed by 3rd parties.

crypto		Cryptography stuff (see crypto/README).

etc		Template files for /etc.

games		Amusements.

gnu		Various commands and libraries under the GNU Public License.
		Please see gnu/COPYING* for more information.

include		System include files.

kerberos5	Kerberos5 (Heimdal) package.

lib		System libraries.

libexec		System daemons.

release		Release building Makefile & associated tools.

sbin		System commands.

secure		Cryptographic libraries and commands.

share		Shared resources.

sys		Kernel sources.

tools		Utilities for regression testing and miscellaneous tasks.

usr.bin		User commands.

usr.sbin	System administration commands.


For information on synchronizing your source tree with one or more of
the FreeBSD Project's development branches, please see:

  http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/synching.html