2 .\" Copyright (c) 2002 by Sun Microsystems, Inc. All rights reserved.
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH RSM_MEMSEG_IMPORT_MAP 3RSM "Nov 13, 2002"
8 rsm_memseg_import_map, rsm_memseg_import_unmap \- map or unmap imported segment
12 cc [ \fIflag\fR... ] \fIfile\fR... -lrsm [ \fIlibrary\fR... ]
15 \fBint\fR \fBrsm_memseg_import_map\fR(\fBrsm_memseg_import_handle_t\fR \fIim_memseg\fR,
16 \fBvoid **\fR\fIaddress\fR, \fBrsm_attribute_t\fR \fIattr\fR,
17 \fBrsm_permission_t\fR \fIperm\fR, \fBoff_t\fR \fIoffset\fR, \fBsize_t\fR \fIlength\fR);
22 \fBint\fR \fBrsm_memseg_import_unmap\fR(\fBrsm_memseg_import_handle_t\fR \fIim_memseg\fR);
28 The \fBrsm_memseg_import_map()\fR and \fBrsm_memseg_import_unmap()\fR functions
29 provide for mapping and unmapping operations on imported segments. The mapping
30 operations are only available for native architecture interconnects such as
31 Dolphin-SCI or Sun Fire Link. Mapping a segment allows that segment to be
32 accessed by CPU memory operations, saving the overhead of calling the memory
33 access primitives described on the \fBrsm_memseg_import_get\fR(3RSM) and
34 \fBrsm_memseg_import_put\fR(3RSM) manual pages.
37 The \fBrsm_memseg_import_map()\fR function maps an import segment into caller's
38 address space for the segment to be accessed by CPU memory operations. The
39 \fIim_memseg\fR argument represents the import segment that is being mapped.
40 The location where the process's address space is mapped to the segment is
41 pointed to by the \fIaddress\fR argument. The \fIattr\fR argiment can be one
46 \fB\fBRSM_MAP_NONE\fR \fR
49 The system will choose available virtual address to map and return its value in
50 the \fIaddress\fR argument.
56 \fB\fBRSM_MAP_FIXED\fR \fR
59 The import segment should be mapped at the requested virtual address specified
60 in the \fIaddress\fR argument.
65 The \fIperm\fR argument determines whether read, write or a combination of
66 accesses are permitted to the data being mapped. It can be either
67 \fBRSM_PERM_READ\fR, \fBRSM_PERM_WRITE\fR, or \fBRSM_PERM_RDWR\fR.
70 The \fIoffset\fR argument is the byte offset location from the base of the
71 segment being mapped to \fIaddress\fR. The \fIlength\fR argument indicates the
72 number of bytes from offset to be mapped.
75 The \fBrsm_memseg_import_unmap()\fR function unmaps a previously mapped import
80 Upon successful completion, these functions return 0. Otherwise, an error value
81 is returned to indicate the error.
85 The \fBrsm_memseg_import_map()\fR and \fBrsm_memseg_import_unmap()\fR functions
86 can return the following errors:
90 \fB\fBRSMERR_BAD_SEG_HNDL\fR \fR
93 Invalid segment handle.
98 The \fBrsm_memseg_import_map()\fR function can return the following errors:
102 \fB\fBRSMERR_BAD_ADDR\fR \fR
111 \fB\fBRSMERR_BAD_LENGTH\fR \fR
120 \fB\fBRSMERR_BAD_MEM_ALIGNMENT\fR\fR
123 The address is not aligned on a page boundary.
129 \fB\fBRSMERR_BAD_OFFSET\fR \fR
138 \fB\fBRSMERR_BAD_PERMS\fR \fR
147 \fB\fBRSMERR_CONN_ABORTED\fR \fR
156 \fB\fBRSMERR_MAP_FAILED\fR \fR
165 \fB\fBRSMERR_SEG_ALREADY_MAPPED\fR \fR
168 Segment already mapped.
174 \fB\fBRSMERR_SEG_NOT_CONNECTED\fR \fR
177 Segment not connected.
183 See \fBattributes\fR(5) for descriptions of the following attributes:
191 ATTRIBUTE TYPE ATTRIBUTE VALUE
193 Interface Stability Evolving
201 \fBrsm_memseg_import_connect\fR(3RSM), \fBrsm_memseg_import_get\fR(3RSM),
202 \fBrsm_memseg_import_put\fR(3RSM), \fBrsm_memseg_get_pollfd\fR(3RSM),