2 .\" Copyright (c) 2001 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_GET 3RSM "Jun 8, 2001"
8 rsm_memseg_import_get, rsm_memseg_import_get8, rsm_memseg_import_get16,
9 rsm_memseg_import_get32, rsm_memseg_import_get64 \- read from a segment
13 cc [ \fIflag\fR... ] \fIfile\fR... -lrsm [ \fIlibrary\fR... ]
16 \fBint\fR \fBrsm_memseg_import_get\fR(\fBrsm_memseg_import_handle_t\fR \fIim_memseg\fR,
17 \fBoff_t\fR \fIoffset\fR, \fBvoid *\fR\fIdest_addr\fR, \fBsize_t\fR \fIlength\fR);
22 \fBint\fR \fBrsm_memseg_import_get8\fR(\fBrsm_memseg_import_handle_t\fR \fIim_memseg\fR,
23 \fBoff_t\fR \fIoffset\fR, \fBuint8_t *\fR\fIdatap\fR, \fBulong_t\fR \fIrep_cnt\fR);
28 \fBint\fR \fBrsm_memseg_import_get16\fR(\fBrsm_memseg_import_handle_t\fR \fIim_memseg\fR,
29 \fBoff_t\fR \fIoffset\fR, \fBuint16_t *\fR\fIdatap\fR, \fBulong_t\fR \fIrep_cnt\fR);
34 \fBint\fR \fBrsm_memseg_import_get32\fR(\fBrsm_memseg_import_handle_t\fR \fIim_memseg\fR,
35 \fBoff_t\fR \fIoffset\fR, \fBuint32_t *\fR\fIdatap\fR, \fBulong_t\fR \fIrep_cnt\fR);
40 \fBint\fR \fBrsm_memseg_import_get64\fR(\fBrsm_memseg_import_handle_t\fR \fIim_memseg\fR,
41 \fBoff_t\fR \fIoffset\fR, \fBuint64_t *\fR\fIdatap\fR, \fBulong_t\fR \fIrep_cnt\fR);
47 When using interconnects that allow memory mapping (see
48 \fBrsm_memseg_import_map\fR(3RSM)), standard CPU memory operations may be used
49 for accessing memory of a segment. If a mapping is not provided, then
50 explicitly calling these functions facilitates reading from a segment.
51 Depending on the attributes of the extension library of the specific
52 interconnect, these functions may involve performing an implicit mapping before
53 performing the data transfer. Applications can be made interconnect-independent
54 with respect to segment reads by using these functions. The data access error
55 detection is performed through the use of barriers (see
56 \fBrsm_memseg_import_open_barrier\fR(3RSM)). The default barrier operation mode
57 is \fBRSM_BARRIER_MODE_IMPLICIT\fR, meaning that around every get operation
58 open and close barrier are performed automatically. Alternatively, explicit
59 error handling may be set up for these functions (see
60 \fBrsm_memseg_import_set_mode\fR(3RSM)). In either case the barrier should be
61 initialized prior to using these functions using
62 \fBrsm_memseg_import_init_barrier\fR(3RSM).
65 The \fBrsm_memseg_import_get()\fR function copies \fIlength\fR bytes from the
66 imported segment \fIim_memseg\fR beginning at location \fIoffset\fR from the
67 start of the segment to a local memory buffer pointed to by \fIdest_addr\fR.
70 The \fBrsm_memseg_import_get8()\fR function copies \fIrep_cnt\fR number of
71 8-bit quantities from successive locations starting from \fIoffset\fR in the
72 imported segment to successive local memory locations pointed to by
76 The \fBrsm_memseg_import_get16()\fR functions copies \fIrep_cnt\fR number of
77 16-bit quantities from successive locations starting from \fIoffset\fR in the
78 imported segment to successive local memory locations pointed to by
79 \fIdatap\fR. The offset must be aligned at half-word address boundary.
82 The \fBrsm_memseg_import_get32()\fR function copies \fIrep_cnt\fR number of
83 32-bit quantities from successive locations starting from \fIoffset\fR in the
84 imported segment to successive local memory locations pointed to by
85 \fIdatap\fR. The offset must be aligned at word address boundary.
88 The \fBrsm_memseg_import_get64()\fR function copies \fIrep_cnt\fR number of
89 -bit quantities from successive locations starting from \fIoffset\fR in the
90 imported segment to successive local memory locations pointed to by
91 \fIdatap\fR. The offset must be aligned at double-word address boundary.
94 The data transfer functions that transfer small quantities of data (that is,
95 8-, 16-, 32-, and 64-bit quantities) perform byte swapping prior to the data
96 transfer, in the event that the source and destination have incompatible endian
101 Upon successful completion, these functions return 0. Otherwise, an error value
102 is returned to indicate the error.
106 These functions can return the following errors:
110 \fB\fBRSMERR_BAD_SEG_HNDL\fR \fR
114 Invalid segment handle.
120 \fB\fBRSMERR_BAD_ADDR\fR \fR
130 \fB\fBRSMERR_BAD_MEM_ALIGNMENT\fR \fR
134 Invalid memory alignment for pointer.
140 \fB\fBRSMERR_BAD_OFFSET\fR \fR
150 \fB\fBRSMERR_BAD_LENGTH\fR \fR
160 \fB\fBRSMERR_PERM_DENIED\fR \fR
170 \fB\fBRSMERR_INSUFFICIENT_RESOURCES\fR \fR
174 Insufficient resources.
180 \fB\fBRSMERR_BARRIER_UNINITIALIZED\fR \fR
184 Barrier not initialized.
190 \fB\fBRSMERR_BARRIER_FAILURE\fR \fR
194 I/O completion error.
200 \fB\fBRSMERR_CONN_ABORTED\fR \fR
210 See \fBattributes\fR(5) for descriptions of the following attributes:
218 ATTRIBUTE TYPE ATTRIBUTE VALUE
220 Interface Stability Evolving
228 \fBrsm_memseg_import_init_barrier\fR(3RSM),
229 \fBrsm_memseg_import_open_barrier\fR(3RSM),
230 \fBrsm_memseg_import_set_mode\fR(3RSM), \fBattributes\fR(5)