Back to Darwin Xnu

Vm Machine Attribute

osfmk/man/vm_machine_attribute.html

latest2.1 KB
Original Source

vm_machine_attribute


Function - Get/set the target memory region's special attributes.

SYNOPSIS

**kern\_return\_t vm\_machine\_attribute**** (vm\_task\_t **target\_task,** vm\_address\_t **address,** vm\_size\_t **size,** vm\_machine\_attribute\_t **attribute,** vm\_machine\_attribute\_val\_t **value** );**

PARAMETERS

target_task[in task send right] The port for the task in whose address space the memory object is to be manipulated.

address[in scalar] The starting address for the memory region. The granularity of rounding of this value to page boundaries is implementation dependent.

size[in scalar] The number of bytes in the region. The granularity of rounding of this value to page boundaries is implementation dependent.

attribute[in scalar] The name of the attribute to be get/set. Possible values are:

MATTR_CACHE Cachability. Aside from the generic values listed below, the following special values are defined:

MATTR_VAL_CACHE_FLUSH Flush from all caches

MATTR_VAL_DCACHE_FLUSH Flush from data caches

MATTR_VAL_ICACHE_FLUSH Flush from instruction caches

MATTR_MIGRATE Migratability.

MATTR_REPLICATE Replicability.

value[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:

MATTR_VAL_OFF Turn attribute off.

MATTR_VAL_ON Turn attribute on.

MATTR_VAL_GET No change, just return current value.

DESCRIPTION

The vm_machine_attribute function gets and sets special attributes of the memory region implemented by the underlying pmap module. These attributes are properties such as cachability, migratability and replicability. The behavior of this function is machine dependent.

NOTES

This interface is machine word length specific because of the virtual address parameter.

RETURN VALUES

KERN_INVALID_ADDRESS The address is illegal or specifies a non-allocated region.

Functions: vm_wire.