1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-16 10:20:30 +00:00
Mirror of the FreeBSD src repository https://git.FreeBSD.org/src.git .
Go to file
David Malone 7376ec0dd7 Make the MTRR code a bit more defensive - this should help people
trying to run X on some Athlon systems where the BIOS does odd things
(mines an ASUS A7A266, but it seems to also help on other systems).

Here's a description of the problem and my fix:

	The problem with the old MTRR code is that it only expects
	to find documented values in the bytes of MTRR registers.
	To convert the MTRR byte into a FreeBSD "Memory Range Type"
	(mrt) it uses the byte value and looks it up in an array.
	If the value is not in range then the mrt value ends up
	containing random junk.

	This isn't an immediate problem. The mrt value is only used
	later when rewriting the MTRR registers. When we finally
	go to write a value back again, the function i686_mtrrtype()
	searches for the junk value and returns -1 when it fails
	to find it. This is converted to a byte (0xff) and written
	back to the register, causing a GPF as 0xff is an illegal
	value for a MTRR byte.

	To work around this problem I've added a new mrt flag
	MDF_UNKNOWN.  We set this when we read a MTRR byte which
	we do not understand.  If we try to convert a MDF_UNKNOWN
	back into a MTRR value, then the new function, i686_mrt2mtrr,
	just returns the old value of the MTRR byte. This leaves
	the memory range type unchanged.

I'd like to merge this before the 4.6 code freeze, so if people
can test this with XFree 4 that would be very useful.

PR:		28418, 25958
Tested by:	jkh, Christopher Masto <chris@netmonger.net>
MFC after:	2 weeks
2002-04-14 20:13:08 +00:00
bin Do not return(f_returning_void());. Spell FALLTHROUGH to make it lint()able. 2002-04-12 20:23:51 +00:00
contrib This commit was generated by cvs2svn to compensate for changes in r94670, 2002-04-14 18:28:22 +00:00
crypto Fix some warnings. Don't record logins twice in USE_PAM case. Strip 2002-04-14 16:24:36 +00:00
etc Fix up submit.cf alternation instructions in light of new SENDMAIL_SUBMIT_MC 2002-04-14 19:24:28 +00:00
games End of comment was missing at FreeBSD Id line. Switch to FBSDID. 2002-04-12 20:16:15 +00:00
gnu Re-add sort spammed in v1.62 2002-04-13 05:49:33 +00:00
include Be more strict about exposing BSD-specific functions when a standard 2002-04-10 10:51:53 +00:00
kerberos5 Fix build when MAKE_KERBEROS4 is not requested. This was broken with 2002-02-21 15:54:20 +00:00
kerberosIV Install script via SCRIPTS. 2001-12-17 16:52:32 +00:00
lib More recent versions of pam_passwdqc (not yet released) build with very 2002-04-14 18:48:57 +00:00
libexec IPv6 support for tftp/tftpd. 2002-04-11 17:14:22 +00:00
release The new Compaq DS20L is a direct derivative of the CS20 so we support 2002-04-14 18:19:27 +00:00
sbin Actually add the UDF files! 2002-04-14 16:52:14 +00:00
secure Switch over to using pam_login_access(8) module in sshd(8). 2002-03-26 12:52:28 +00:00
share Correct two syntax mistakes. 2002-04-14 19:52:42 +00:00
sys Make the MTRR code a bit more defensive - this should help people 2002-04-14 20:13:08 +00:00
tools Add a tool (and the first application of it) that could be used 2002-04-12 19:46:25 +00:00
usr.bin Back out rev 1.17, it breaks dependencies. 2002-04-14 04:15:34 +00:00
usr.sbin Add support for an additional field to the packages/INDEX file. If 2002-04-13 13:00:42 +00:00
COPYRIGHT Update to add the July 22, 1999 addendum. 1999-09-05 21:33:47 +00:00
Makefile Makefile.inc0 is no longer used. 2002-03-03 22:37:35 +00:00
Makefile.inc1 Add libypclnt to the includes target. 2002-04-13 07:24:14 +00:00
Makefile.upgrade Removed "env" commands. "sh" is a real shell, so 2002-03-19 05:58:36 +00:00
README Spell "FreeBSD" correctly. 2002-03-26 12:35:49 +00:00
UPDATING Update to note my dropping the strong lock on this file. 2002-04-11 05:45:17 +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/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.

kerberosIV	KerberosIV (eBones) 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/handbook/synching.html