Intel 253668-032US User Manual

Page of 806
Vol. 3   11-33
MEMORY CACHE CONTROL
11.11.2  Setting Memory Ranges with MTRRs
The memory ranges and the types of memory specified in each range are set by three 
groups of registers: the IA32_MTRR_DEF_TYPE MSR, the fixed-range MTRRs, and 
the variable range MTRRs. These registers can be read and written to using the 
RDMSR and WRMSR instructions, respectively. The IA32_MTRRCAP MSR indicates 
the availability of these registers on the processor (see Section 11.11.1, “MTRR 
Feature Identification”
).
11.11.2.1   IA32_MTRR_DEF_TYPE MSR
The IA32_MTRR_DEF_TYPE MSR (named MTRRdefType MSR for the P6 family 
processors) sets the default properties of the regions of physical memory that are not 
encompassed by MTRRs. The functions of the flags and field in this register are as 
follows:
Type field, bits 0 through 7 — Indicates the default memory type used for 
those physical memory address ranges that do not have a memory type specified 
for them by an MTRR (see Table 11-8 for the encoding of this field). The legal 
values for this field are 0, 1, 4, 5, and 6. All other values result in a general-
protection exception (#GP) being generated. 
Intel recommends the use of the UC (uncached) memory type for all physical 
memory addresses where memory does not exist. To assign the UC type to 
nonexistent memory locations, it can either be specified as the default type in the 
Type field or be explicitly assigned with the fixed and variable MTRRs.
FE (fixed MTRRs enabled) flag, bit 10 — Fixed-range MTRRs are enabled 
when set; fixed-range MTRRs are disabled when clear. When the fixed-range 
MTRRs are enabled, they take priority over the variable-range MTRRs when 
overlaps in ranges occur. If the fixed-range MTRRs are disabled, the variable-
range MTRRs can still be used and can map the range ordinarily covered by the 
fixed-range MTRRs.
E (MTRRs enabled) flag, bit 11 — MTRRs are enabled when set; all MTRRs are 
disabled when clear, and the UC memory type is applied to all of physical 
Figure 11-6.  IA32_MTRR_DEF_TYPE MSR
Type — Default memory type
FE — Fixed-range MTRRs enable/disable
E — MTRR enable/disable
63
0
Reserved
F
E
7
10
11
Type
8
9
12
E
Reserved