]> git.saurik.com Git - apple/xnu.git/blob - osfmk/man/vm_machine_attribute.html
xnu-344.tar.gz
[apple/xnu.git] / osfmk / man / vm_machine_attribute.html
1 <h2>vm_machine_attribute</h2> <hr> <p> <strong>Function</strong> - Get/set the target memory region's special attributes. <h3>SYNOPSIS</h3> <pre> <strong>kern_return_t vm_machine_attribute</strong> <strong>(vm_task_t</strong> <var>target_task</var>, <strong>vm_address_t</strong> <var>address</var>, <strong>vm_size_t</strong> <var>size</var>, <strong>vm_machine_attribute_t</strong> <var>attribute</var>, <strong>vm_machine_attribute_val_t</strong> <var>value</var><strong>);</strong> </pre> <h3>PARAMETERS</h3> <dl> <p> <dt> <var>target_task</var> <dd> [in task send right] The port for the task in whose address space the memory object is to be manipulated. <p> <dt> <var>address</var> <dd> [in scalar] The starting address for the memory region. The granularity of rounding of this value to page boundaries is implementation dependent. <p> <dt> <var>size</var> <dd> [in scalar] The number of bytes in the region. The granularity of rounding of this value to page boundaries is implementation dependent. <p> <dt> <var>attribute</var> <dd> [in scalar] The name of the attribute to be get/set. Possible values are: <dl> <p> <dt> <strong>MATTR_CACHE</strong> <dd> Cachability. Aside from the generic values listed below, the following special values are defined: <dl> <p> <dt> <strong>MATTR_VAL_CACHE_FLUSH</strong> <dd> Flush from all caches <p> <dt> <strong>MATTR_VAL_DCACHE_FLUSH</strong> <dd> Flush from data caches <p> <dt> <strong>MATTR_VAL_ICACHE_FLUSH</strong> <dd> Flush from instruction caches </dl> <p> <dt> <strong>MATTR_MIGRATE</strong> <dd> Migratability. <p> <dt> <strong>MATTR_REPLICATE</strong> <dd> Replicability. </dl> <p> <dt> <var>value</var> <dd> [pointer to in/out scalar] The new value for the attribute. The old value is also returned in this variable. The new value can be a specific value listed above, or one of the following generic values: <dl> <p> <dt> <strong>MATTR_VAL_OFF</strong> <dd> Turn attribute off. <p> <dt> <strong>MATTR_VAL_ON</strong> <dd> Turn attribute on. <p> <dt> <strong>MATTR_VAL_GET</strong> <dd> No change, just return current value. </dl> </dl> <h3>DESCRIPTION</h3> <p> The <strong>vm_machine_attribute</strong> function gets and sets special attributes of the memory region implemented by the underlying <strong>pmap</strong> module. These attributes are properties such as cachability, migratability and replicability. The behavior of this function is machine dependent. <h3>NOTES</h3> <p> This interface is machine word length specific because of the virtual address parameter. <h3>RETURN VALUES</h3> <dl> <p> <dt> <strong>KERN_INVALID_ADDRESS</strong> <dd> The address is illegal or specifies a non-allocated region. </dl> <h3>RELATED INFORMATION</h3> <p> Functions: <a href="vm_wire.html"><strong>vm_wire</strong></a>.