1MTRR_ADD(9) Hardware Interfaces MTRR_ADD(9)
2
3
4
6 mtrr_add - Add a memory type region
7
9 int mtrr_add(unsigned long base, unsigned long size, unsigned int type,
10 bool increment);
11
13 base
14 Physical base address of region
15
16 size
17 Physical size of region
18
19 type
20 Type of MTRR desired
21
22 increment
23 If this is true do usage counting on the region
24
26 Memory type region registers control the caching on newer Intel and non
27 Intel processors. This function allows drivers to request an MTRR is
28 added. The details and hardware specifics of each processorĀ“s
29 implementation are hidden from the caller, but nevertheless the caller
30 should expect to need to provide a power of two size on an equivalent
31 power of two boundary.
32
33 If the region cannot be added either because all regions are in use or
34 the CPU cannot support it a negative value is returned. On success the
35 register number for this entry is returned, but should be treated as a
36 cookie only.
37
38 On a multiprocessor machine the changes are made to all processors.
39 This is required on x86 by the Intel processors.
40
41 The available types are
42
43 MTRR_TYPE_UNCACHABLE - No caching
44
45 MTRR_TYPE_WRBACK - Write data back in bursts whenever
46
47 MTRR_TYPE_WRCOMB - Write data back soon but allow bursts
48
49 MTRR_TYPE_WRTHROUGH - Cache reads but not writes
50
52 Needs a quiet flag for the cases where drivers do not mind failures and
53 do not wish system log messages to be sent.
54
56Kernel Hackers Manual 2.6. June 2019 MTRR_ADD(9)