The rsm_memseg_import_map() and rsm_memseg_import_unmap() functions provide for mapping and unmapping operations on imported segments. The mapping operations are only available for native architecture interconnects such as Dolphin-SCI or Wildcat. Mapping a
segment allows that segment to be accessed by CPU memory operations, saving the overhead of calling the memory access primitives described on the rsm_memseg_import_get(3RSM)
and rsm_memseg_import_put(3RSM) manual pages.
The rsm_memseg_import_map() function maps an import segment into caller's address space for the segment to be accessed by CPU memory operations. The im_memseg argument represents the import segment that is being mapped. The location where the process's
address space is mapped to the segment is pointed to by the address argument. The attr argiment can be one fo the following:
-
RSM_MAP_NONE
- The system will choose available virtual address to map and return its value in the address argument.
-
RSM_MAP_FIXED
- The import segment should be mapped at the requested virtual address specified in the address argument.
The perm argument determines whether read, write or a combination of accesses are permitted to the data being mapped. It can be either RSM_PERM_READ, RSM_PERM_WRITE, or RSM_PERM_RDWR.
The offset argument is the byte offset location from the base of the segment being mapped to address. The length argument indicates the number of bytes from offset to be mapped.
The rsm_memseg_import_unmap() function unmaps a previously mapped import segment.
|