freebsd kernel with SKQ
Go to file
Marcel Moolenaar d87d5bbf82 The ptc.g operation for the Mckinley and Madison processors has the
side-effect of purging more than the requested translation. While
this is not a problem in general, it invalidates the assumption made
during constructing the trapframe on entry into the kernel in SMP
configurations. The assumption is that only the first store to the
stack will possibly cause a TLB miss. Since the ptc.g purges the
translation caches of all CPUs in the coherency domain, a ptc.g
executed on one CPU can cause a purge on another CPU that is
currently running the critical code that saves the state to the
trapframe. This can cause an unexpected TLB miss and with interrupt
collection disabled this means an unexpected data nested TLB fault.

A data nested TLB fault will not save any context, nor provide a
way for software to determine what caused the TLB miss nor where
it occured. Careful construction of the kernel entry and exit code
allows us to handle a TLB miss in precisely orchastrated points
and thereby avoiding the need to wire the kernel stack, but the
unexpected TLB miss caused by the ptc.g instructution resulted in
an unrecoverable condition and resulting in machine checks.

The solution to this problem is to synchronize the kernel entry
on all CPUs with the use of the ptc.g instruction on a single CPU
by implementing a bare-bones readers-writer lock that allows N
readers (= N CPUs entering the kernel) and 1 writer (= execution
of the ptc.g instruction on some CPU). This solution wins over
a rendez-vous approach by not interrupting CPUs with an IPI.

This problem has not been observed on the Montecito.

PR:		ia64/147772
MFC after:	6 days
2010-06-12 01:45:29 +00:00
bin More mdoc nitpicking to improve compatibility to mdocml 2010-06-11 06:04:07 +00:00
cddl In dtrace lexer, do not unput token if it is EOF. 2010-06-11 04:38:14 +00:00
contrib Remove Xcode cmake win32 projects unittests from LLVM and 2010-06-10 19:59:23 +00:00
crypto More commas 2010-06-01 22:46:57 +00:00
etc Hook clang into the build on i386/amd64/powerpc. 2010-06-09 19:57:20 +00:00
games mdoc cleanup 2010-06-02 10:20:23 +00:00
gnu Fix build for O32 systems without a TARGET_CPUTYPE defined. We must default to 2010-06-02 21:15:00 +00:00
include Move realpath(3) prototype to a POSIX section. 2010-04-21 16:38:37 +00:00
kerberos5 Fix a typo. 2010-01-09 18:53:03 +00:00
lib Detect bit endianness through machine/endian.h. This fixes xz on big-endian 2010-06-11 22:29:49 +00:00
libexec Plug possible memory leak. 2010-06-03 00:25:43 +00:00
release Document ZFS upgrade to version 14, support for NFSv4 ACLs, 2010-06-07 06:38:12 +00:00
rescue Enable liblzma support in libarchive 2010-05-10 15:28:44 +00:00
sbin Remove dead variable assignments 2010-06-11 17:03:04 +00:00
secure Regenerate manual pages for OpenSSL 0.9.8n. 2010-04-01 15:37:38 +00:00
share Add myself to the committers graph. 2010-06-11 12:58:29 +00:00
sys The ptc.g operation for the Mckinley and Madison processors has the 2010-06-12 01:45:29 +00:00
tools Fix typo. 2010-06-10 06:20:26 +00:00
usr.bin Use same table markup as in hexdump.1 2010-06-11 06:04:14 +00:00
usr.sbin Clean up code by removing pre-C99 struct hack preprocessor magic. 2010-06-11 21:46:45 +00:00
COPYRIGHT Happy New Year 2010! :-) 2009-12-31 10:00:37 +00:00
LOCKS Update LOCKS syntax. 2008-06-05 19:47:58 +00:00
MAINTAINERS Add a comment to MAINTAINERS indicating that sbin/routed is in fact 2010-04-10 12:29:09 +00:00
Makefile For those of us mere mortals who do not aspire to the lofty heights 2010-03-18 18:58:17 +00:00
Makefile.inc1 Hook clang into the build on i386/amd64/powerpc. 2010-06-09 19:57:20 +00:00
ObsoleteFiles.inc - Add versioned symbols to liblzma 2010-05-14 20:40:37 +00:00
README
UPDATING Note 8.0-RELEASE. 2010-05-12 21:20:04 +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 ``world''
target should only be used in cases where the source tree has not
changed from the currently running version.  See:
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html
for more information, including setting make(1) variables.

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.

rescue		Build system for statically linked /rescue utilities.

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