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