freebsd-dev/sys/i386
Jung-uk Kim 7dd052c1d9 - Disable caches and flush caches/TLBs when we update PAT as we do for MTRR.
Flushing TLBs is required to ensure cache coherency according to the AMD64
architecture manual.  Flushing caches is only required when changing from a
cacheable memory type (WB, WP, or WT) to an uncacheable type (WC, UC, or
UC-).  Since this function is only used once per processor during startup,
there is no need to take any shortcuts.
- Leave PAT indices 0-3 at the default of WB, WT, UC-, and UC.  Program 5 as
WP (from default WT) and 6 as WC (from default UC-).  Leave 4 and 7 at the
default of WB and UC.  This is to avoid transition from a cacheable memory
type to an uncacheable type to minimize possible cache incoherency.  Since
we perform flushing caches and TLBs now, this change may not be necessary
any more but we do not want to take any chances.
- Remove Apple hardware specific quirks.  With the above changes, it seems
this hack is no longer needed.
- Improve pmap_cache_bits() with an array to map PAT memory type to index.
This array is initialized early from pmap_init_pat(), so that we do not need
to handle special cases in the function any more.  Now this function is
identical on both amd64 and i386.

Reviewed by:	jhb
Tested by:	RM (reuf_m at hotmail dot com)
		Ryszard Czekaj (rychoo at freeshell dot net)
		army.of.root (army dot of dot root at googlemail dot com)
MFC after:	3 days
2010-11-22 19:52:44 +00:00
..
acpica MFamd64: (based on) r209957 2010-11-12 20:55:14 +00:00
bios Add compat shim for apm(4) to translate APM BIOS function numbers from i386 2010-11-11 19:20:33 +00:00
compile
conf Now userland POSIX semaphore is based on umtx. The kernel module 2010-09-24 09:04:16 +00:00
i386 - Disable caches and flush caches/TLBs when we update PAT as we do for MTRR. 2010-11-22 19:52:44 +00:00
ibcs2 Add macro DECLARE_MODULE_TIED to denote a module as requiring the 2010-10-12 09:18:17 +00:00
include Add VTOM(va) macro as xpmap_ptom(VTOP(va)) to convert to machine addresses. 2010-11-20 20:04:29 +00:00
isa Use 'saveintr' instead of 'savecrit' or 'eflags' to hold the state returned 2010-10-25 15:31:13 +00:00
linux Add macro DECLARE_MODULE_TIED to denote a module as requiring the 2010-10-12 09:18:17 +00:00
pci Change the MPTable and $PIR PCI-PCI bridge drivers to inherit from the 2010-08-05 17:48:37 +00:00
svr4 Change some movl's to mov's. Newer GAS no longer accept 'movl' instructions 2009-01-31 11:37:21 +00:00
xbox Update d_mmap() to accept vm_ooffset_t and vm_memattr_t. 2009-12-29 21:51:28 +00:00
xen In xen_get_timecount, return the full ns-precision time rather than 2010-11-22 09:04:29 +00:00
Makefile Update entries for building tags. 2007-05-13 18:21:54 +00:00