Function - Establish the specified device's memory manager.
#include< device/device.h> kern_return_t device_map (mach_port_t device, vm_prot_t prot, vm_offset_t offset, vm_size_t size, mach_port_t mem_obj_t, boolean_t unmap);
The device_map function establishes a memory manager that presents a memory object representing a device. The resulting port is suitable for use as the memory manager port in a vm_map call. This call is device dependent.
Port rights are maintained as follows:
Regardless of how the object is created, the control port is created by the kernel and passed through the memory management interface.
If the device port used is restricted to use by a single identity, the generated representative port will be likewise restricted.
The device memory manager assumes that access to its memory objects will not be propagated to more that one host, and therefore provides no consistency guarantees beyond those made by the kernel.
In the event that more than one host attempts to use a device memory object, the device memory manager will only record the last set of port names. Currently, the device memory manager assumes that its clients adhere to the initialization and termination protocols in the memory management interface; otherwise, port rights or out-of-line memory from erroneous messages may be allowed to accumulate.
Functions: vm_map.