Merge commit '9276b3991ba20d5a5660887ba81b0bc7bed25a0c'
[unleashed.git] / share / man / man9f / ddi_mem_rep_get8.9f
blobddedd0b2c592a9531b6c0baf916bf8a697ef96e6
1 '\" te
2 .\"  Copyright (c) 2005 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 DDI_MEM_REP_GET8 9F "Nov 1, 2005"
7 .SH NAME
8 ddi_mem_rep_get8, ddi_mem_rep_get16, ddi_mem_rep_get32, ddi_mem_rep_get64,
9 ddi_mem_rep_getb, ddi_mem_rep_getl, ddi_mem_rep_getll, ddi_mem_rep_getw \- read
10 multiple data from mapped device in the memory space or allocated DMA memory
11 .SH SYNOPSIS
12 .LP
13 .nf
14 #include <sys/ddi.h>
15 #include <sys/sunddi.h>
19 \fBvoid\fR \fBddi_mem_rep_get8\fR(\fBddi_acc_handle_t\fR \fIhandle\fR,
20      \fBuint8_t *\fR\fIhost_addr\fR, \fBuint8_t *\fR\fIdev_addr\fR, \fBsize_t\fR \fIrepcount\fR,
21      \fBuint_t\fR \fIflags\fR);
22 .fi
24 .LP
25 .nf
26 \fBvoid\fR \fBddi_mem_rep_get16\fR(\fBddi_acc_handle_t\fR \fIhandle\fR,
27      \fBuint16_t *\fR\fIhost_addr\fR, \fBuint16_t *\fR\fIdev_addr\fR, \fBsize_t\fR \fIrepcount\fR,
28      \fBuint_t\fR \fIflags\fR);
29 .fi
31 .LP
32 .nf
33 \fBvoid\fR \fBddi_mem_rep_get32\fR(\fBddi_acc_handle_t\fR \fIhandle\fR,
34      \fBuint32_t *\fR\fIhost_addr\fR, \fBuint32_t *\fR\fIdev_addr\fR, \fBsize_t\fR \fIrepcount\fR,
35      \fBuint_t\fR \fIflags\fR);
36 .fi
38 .LP
39 .nf
40 \fBvoid\fR \fBddi_mem_rep_get64\fR(\fBddi_acc_handle_t\fR \fIhandle\fR,
41      \fBuint64_t *\fR\fIhost_addr\fR, \fBuint64_t *\fR\fIdev_addr\fR, \fBsize_t\fR \fIrepcount\fR,
42      \fBuint_t\fR \fIflags\fR);
43 .fi
45 .SH INTERFACE LEVEL
46 .sp
47 .LP
48 Solaris DDI specific (Solaris DDI). The \fBddi_mem_rep_get8()\fR,
49 \fBddi_mem_rep_get16()\fR, \fBddi_mem_rep_get32()\fR,
50 \fBddi_mem_rep_get64()\fR, \fBddi_mem_rep_getb()\fR, \fBddi_mem_rep_getl()\fR,
51 \fBddi_mem_rep_getll()\fR, and \fBddi_mem_rep_getw()\fR functions are obsolete.
52 The \fBddi_rep_get8\fR(9F) function replaces \fBddi_mem_rep_get8()\fR. The
53 \fBddi_rep_get16\fR(9F) function replaces \fBddi_mem_rep_get16()\fR. The
54 \fBddi_rep_get32\fR(9F) function replaces \fBddi_mem_rep_get32()\fR. The
55 \fBddi_rep_get64\fR(9F) function replaces \fBddi_mem_rep_get64()\fR. The
56 \fBddi_rep_get8\fR(9F) function replaces \fBddi_mem_rep_getb()\fR. The
57 \fBddi_rep_get32\fR(9F) function replaces \fBddi_mem_rep_getl()\fR. The
58 \fBddi_rep_get64\fR(9F) function replaces \fBddi_mem_rep_getll()\fR. The
59 \fBddi_rep_get16\fR(9F) function replaces \fBddi_mem_rep_getw()\fR.
60 .SH PARAMETERS
61 .sp
62 .ne 2
63 .na
64 \fB\fIhandle\fR\fR
65 .ad
66 .RS 13n
67 The data access handle returned from setup calls, such as
68 \fBddi_regs_map_setup\fR(9F).
69 .RE
71 .sp
72 .ne 2
73 .na
74 \fB\fIhost_addr\fR\fR
75 .ad
76 .RS 13n
77 Base host address.
78 .RE
80 .sp
81 .ne 2
82 .na
83 \fB\fIdev_addr\fR\fR
84 .ad
85 .RS 13n
86 Base device address.
87 .RE
89 .sp
90 .ne 2
91 .na
92 \fB\fIrepcount\fR\fR
93 .ad
94 .RS 13n
95 Number of data accesses to perform.
96 .RE
98 .sp
99 .ne 2
101 \fB\fIflags\fR\fR
103 .RS 13n
104 Device address flags:
106 .ne 2
108 \fB\fBDDI_DEV_AUTOINCR\fR\fR
110 .RS 23n
111 Automatically increment the device address,  \fIdev_addr\fR, during data
112 accesses.
116 .ne 2
118 \fB\fBDDI_DEV_NO_AUTOINCR\fR\fR
120 .RS 23n
121 Do not advance the device address,  \fIdev_addr\fR, during data accesses.
126 .SH DESCRIPTION
129 These routines generate multiple reads from memory space or allocated \fBDMA
130 \fRmemory. \fIrepcount\fR data is copied from the device address,
131 \fIdev_addr\fR, in memory space to the host address, \fIhost_addr\fR. For each
132 input datum, the \fBddi_mem_rep_get8()\fR, \fBddi_mem_rep_get16()\fR,
133 \fBddi_mem_rep_get32()\fR, and \fBddi_mem_rep_get64()\fR functions read 8 bits,
134 16 bits, 32 bits and 64 bits of data, respectively, from the device address,
135 \fIdev_addr\fR. \fIdev_addr\fR and \fIhost_addr\fR must be aligned to the datum
136 boundary described by the function.
139 Each individual datum will automatically be translated to maintain a consistent
140 view between the host and the device based on the encoded information in the
141 data access handle. The translation may involve byte-swapping if the host and
142 the device have incompatible endian characteristics.
145 When the  \fIflags\fR argument is set to \fBDDI_DEV_AUTOINCR\fR, these
146 functions will treat the device address, \fIdev_addr\fR, as a memory buffer
147 location on the device and increments its address on the next input datum.
148 However, when the  \fIflags\fR argument is set to \fBDDI_DEV_NO_AUTOINCR\fR,
149 the same device address will be used for every datum access. For example, this
150 flag may be useful when reading from a data register.
151 .SH CONTEXT
154 These functions can be called from user, kernel, or interrupt context.
155 .SH ATTRIBUTES
158 See \fBattributes\fR(5) for descriptions of the following attributes:
163 box;
164 c | c
165 l | l .
166 ATTRIBUTE TYPE  ATTRIBUTE VALUE
168 Interface Stability     Obsolete
171 .SH SEE ALSO
174 \fBddi_mem_get8\fR(9F), \fBddi_mem_put8\fR(9F), \fBddi_mem_rep_put8\fR(9F),
175 \fBddi_regs_map_setup\fR(9F), \fBddi_rep_get8\fR(9F), \fBddi_rep_get16\fR(9F),
176 \fBddi_rep_get32\fR(9F), \fBddi_rep_get64\fR(9F), \fBddi_device_acc_attr\fR(9S)