diff options
author | jkim <jkim@FreeBSD.org> | 2010-11-22 19:52:44 +0000 |
---|---|---|
committer | jkim <jkim@FreeBSD.org> | 2010-11-22 19:52:44 +0000 |
commit | 31be61effab180d09c8e91e953af32e1e7aea5e3 (patch) | |
tree | 93846e3185d960e68c051176e8750b1cd5aaab8a /sbin/mknod | |
parent | a709caaae77f5abfcef4916c6b23c8aff56adc5c (diff) | |
download | FreeBSD-src-31be61effab180d09c8e91e953af32e1e7aea5e3.zip FreeBSD-src-31be61effab180d09c8e91e953af32e1e7aea5e3.tar.gz |
- 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
Diffstat (limited to 'sbin/mknod')
0 files changed, 0 insertions, 0 deletions