]> git.saurik.com Git - apple/xnu.git/blob - osfmk/man/vm_machine_attribute.html
xnu-7195.60.75.tar.gz
[apple/xnu.git] / osfmk / man / vm_machine_attribute.html
1 <h2>vm_machine_attribute</h2>
2 <hr>
3 <p>
4 <strong>Function</strong> - Get/set the target memory region's special attributes.
5 <h3>SYNOPSIS</h3>
6 <pre>
7 <strong>kern_return_t vm_machine_attribute</strong>
8 <strong>(vm_task_t</strong> <var>target_task</var>,
9 <strong>vm_address_t</strong> <var>address</var>,
10 <strong>vm_size_t</strong> <var>size</var>,
11 <strong>vm_machine_attribute_t</strong> <var>attribute</var>,
12 <strong>vm_machine_attribute_val_t</strong> <var>value</var><strong>);</strong>
13 </pre>
14 <h3>PARAMETERS</h3>
15 <dl>
16 <p>
17 <dt> <var>target_task</var>
18 <dd>
19 [in task send right]
20 The port for the task in whose address space the
21 memory object is to be manipulated.
22 <p>
23 <dt> <var>address</var>
24 <dd>
25 [in scalar]
26 The starting address for the memory region. The granularity
27 of rounding of this value to page boundaries is implementation
28 dependent.
29 <p>
30 <dt> <var>size</var>
31 <dd>
32 [in scalar]
33 The number of bytes in the region. The granularity of
34 rounding of this value to page boundaries is implementation dependent.
35 <p>
36 <dt> <var>attribute</var>
37 <dd>
38 [in scalar]
39 The name of the attribute to be get/set. Possible values are:
40 <dl>
41 <p>
42 <dt> <strong>MATTR_CACHE</strong>
43 <dd>
44 Cachability. Aside from the generic values listed below, the
45 following special values are defined:
46 <dl>
47 <p>
48 <dt> <strong>MATTR_VAL_CACHE_FLUSH</strong>
49 <dd>
50 Flush from all caches
51 <p>
52 <dt> <strong>MATTR_VAL_DCACHE_FLUSH</strong>
53 <dd>
54 Flush from data caches
55 <p>
56 <dt> <strong>MATTR_VAL_ICACHE_FLUSH</strong>
57 <dd>
58 Flush from instruction caches
59 </dl>
60 <p>
61 <dt> <strong>MATTR_MIGRATE</strong>
62 <dd>
63 Migratability.
64 <p>
65 <dt> <strong>MATTR_REPLICATE</strong>
66 <dd>
67 Replicability.
68 </dl>
69 <p>
70 <dt> <var>value</var>
71 <dd>
72 [pointer to in/out scalar]
73 The new value for the attribute. The old value
74 is also returned in this variable. The new value can be a specific value
75 listed above, or one of the following generic values:
76 <dl>
77 <p>
78 <dt> <strong>MATTR_VAL_OFF</strong>
79 <dd>
80 Turn attribute off.
81 <p>
82 <dt> <strong>MATTR_VAL_ON</strong>
83 <dd>
84 Turn attribute on.
85 <p>
86 <dt> <strong>MATTR_VAL_GET</strong>
87 <dd>
88 No change, just return current value.
89 </dl>
90 </dl>
91 <h3>DESCRIPTION</h3>
92 <p>
93 The <strong>vm_machine_attribute</strong> function gets and sets special
94 attributes of the
95 memory region implemented by the underlying <strong>pmap</strong> module. These attributes
96 are properties such as cachability, migratability and replicability.
97 The behavior of this function is machine dependent.
98 <h3>NOTES</h3>
99 <p>
100 This interface is machine word length specific because of the virtual address
101 parameter.
102 <h3>RETURN VALUES</h3>
103 <dl>
104 <p>
105 <dt> <strong>KERN_INVALID_ADDRESS</strong>
106 <dd>
107 The address is illegal or specifies a non-allocated region.
108 </dl>
109 <h3>RELATED INFORMATION</h3>
110 <p>
111 Functions:
112 <a href="vm_wire.html"><strong>vm_wire</strong></a>.