diff options
author | jhb <jhb@FreeBSD.org> | 2006-05-01 22:07:00 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2006-05-01 22:07:00 +0000 |
commit | 00bb13261b47adc1a0e5064c6711bdf4e41739c6 (patch) | |
tree | a5a5b98ceebb1c0cb55bb29fb1a21eedcde521c5 /sys/amd64/include/specialreg.h | |
parent | 517c01ed07a72ed13f0bb2fb42f28481a270baa1 (diff) | |
download | FreeBSD-src-00bb13261b47adc1a0e5064c6711bdf4e41739c6.zip FreeBSD-src-00bb13261b47adc1a0e5064c6711bdf4e41739c6.tar.gz |
Add various constants for the PAT MSR and the PAT PTE and PDE flags.
Initialize the PAT MSR during boot to map PAT type 2 to Write-Combining
(WC) instead of Uncached (UC-).
MFC after: 1 month
Diffstat (limited to 'sys/amd64/include/specialreg.h')
-rw-r--r-- | sys/amd64/include/specialreg.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sys/amd64/include/specialreg.h b/sys/amd64/include/specialreg.h index e78bc17..24db7da 100644 --- a/sys/amd64/include/specialreg.h +++ b/sys/amd64/include/specialreg.h @@ -230,6 +230,18 @@ #define APICBASE_ADDRESS 0xfffff000 /* + * PAT modes. + */ +#define PAT_UNCACHEABLE 0x00 +#define PAT_WRITE_COMBINING 0x01 +#define PAT_WRITE_THROUGH 0x04 +#define PAT_WRITE_PROTECTED 0x05 +#define PAT_WRITE_BACK 0x06 +#define PAT_UNCACHED 0x07 +#define PAT_VALUE(i, m) ((long)(m) << (8 * (i))) +#define PAT_MASK(i) PAT_VALUE(i, 0xff) + +/* * Constants related to MTRRs */ #define MTRR_N64K 8 /* numbers of fixed-size entries */ |