Merge commit 'b31320a79e2054c6739b5229259dbf98f3afc547' into merges
[unleashed.git] / share / man / man9f / ddi_rep_get8.9f
blob40607c5667b1ee7e3e389e54564ced997e48a4f0
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_REP_GET8 9F "Nov 1, 2005"
7 .SH NAME
8 ddi_rep_get8, ddi_rep_get16, ddi_rep_get32, ddi_rep_get64, ddi_rep_getw,
9 ddi_rep_getl, ddi_rep_getll, ddi_rep_getb \- read data from the mapped memory
10 address, device register or allocated DMA memory address
11 .SH SYNOPSIS
12 .LP
13 .nf
14 #include <sys/ddi.h>
15 #include <sys/sunddi.h>
19 \fBvoid\fR \fBddi_rep_get8\fR(\fBddi_acc_handle_t\fR \fIhandle\fR, \fBuint8_t\fR \fI*host_addr\fR,
20      \fBuint8_t\fR \fI*dev_addr\fR, \fBsize_t\fR \fIrepcount\fR, \fBuint_t\fR \fIflags\fR);
21 .fi
23 .LP
24 .nf
25 \fBvoid\fR \fBddi_rep_get16\fR(\fBddi_acc_handle_t\fR \fIhandle\fR, \fBuint16_t\fR \fI*host_addr\fR,
26      \fBuint16_t\fR \fI*dev_addr\fR, \fBsize_t\fR \fIrepcount\fR, \fBuint_t\fR \fIflags\fR);
27 .fi
29 .LP
30 .nf
31 \fBvoid\fR \fBddi_rep_get32\fR(\fBddi_acc_handle_t\fR \fIhandle\fR, \fBuint32_t\fR \fI*host_addr\fR,
32      \fBuint32_t\fR \fI*dev_addr\fR, \fBsize_t\fR \fIrepcount\fR, \fBuint_t\fR \fIflags\fR);
33 .fi
35 .LP
36 .nf
37 \fBvoid\fR \fBddi_rep_get64\fR(\fBddi_acc_handle_t\fR \fIhandle\fR, \fBuint64_t\fR \fI*host_addr\fR,
38      \fBuint64_t\fR \fI*dev_addr\fR, \fBsize_t\fR \fIrepcount\fR, \fBuint_t\fR \fIflags\fR);
39 .fi
41 .SH INTERFACE LEVEL
42 .sp
43 .LP
44 Solaris DDI specific (Solaris DDI). The \fBddi_rep_getb()\fR,
45 \fBddi_rep_getl()\fR, \fBddi_rep_getll()\fR, and \fBddi_rep_getw()\fR functions
46 are obsolete. The \fBddi_rep_get8()\fR function replaces \fBddi_rep_getb()\fR.
47 The \fBddi_rep_get32()\fR function replaces \fBddi_rep_getl()\fR. The
48 \fBddi_rep_get64()\fR function replaces \fBddi_rep_getll()\fR. The
49 \fBddi_rep_get16()\fR function replaces \fBddi_rep_getw()\fR.
50 .SH PARAMETERS
51 .sp
52 .ne 2
53 .na
54 \fB\fIhandle\fR\fR
55 .ad
56 .RS 13n
57 The data access handle returned from setup calls, such as
58 \fBddi_regs_map_setup\fR(9F).
59 .RE
61 .sp
62 .ne 2
63 .na
64 \fB\fIhost_addr\fR\fR
65 .ad
66 .RS 13n
67 Base host address.
68 .RE
70 .sp
71 .ne 2
72 .na
73 \fB\fIdev_addr\fR\fR
74 .ad
75 .RS 13n
76 Base device address.
77 .RE
79 .sp
80 .ne 2
81 .na
82 \fB\fIrepcount\fR\fR
83 .ad
84 .RS 13n
85 Number of data accesses to perform.
86 .RE
88 .sp
89 .ne 2
90 .na
91 \fB\fIflags\fR\fR
92 .ad
93 .RS 13n
94 Device address flags:
95 .sp
96 .ne 2
97 .na
98 \fB\fBDDI_DEV_AUTOINCR\fR\fR
99 .ad
100 .RS 23n
101 Automatically increment the device address, \fIdev_addr\fR, during data
102 accesses.
106 .ne 2
108 \fB\fBDDI_DEV_NO_AUTOINCR\fR\fR
110 .RS 23n
111 Do not advance the device address, \fIdev_addr\fR, during data accesses.
116 .SH DESCRIPTION
119 These routines generate multiple reads from the mapped memory or device
120 register. \fIrepcount\fR data is copied from the device address,
121 \fIdev_addr\fR, to the host address, \fIhost_addr\fR. For each input datum, the
122 \fBddi_rep_get8()\fR, \fBddi_rep_get16()\fR, \fBddi_rep_get32()\fR, and
123 \fBddi_rep_get64()\fR functions read 8 bits, 16 bits, 32 bits, and 64 bits of
124 data, respectively, from the device address, \fIdev_addr\fR. \fIdev_addr\fR and
125 \fIhost_addr\fR must be aligned to the datum boundary described by the
126 function.
129 Each individual datum will automatically be translated to maintain a consistent
130 view between the host and the device based on the encoded information in the
131 data access handle. The translation may involve byte-swapping if the host and
132 the device have incompatible endian characteristics.
135 When the  \fIflags\fR argument is set to \fBDDI_DEV_AUTOINCR\fR, these function
136 treat the device address, \fIdev_addr\fR, as a memory buffer location on the
137 device and increment its address on the next input datum. However, when the
138 \fIflags\fR argument is to \fBDDI_DEV_NO_AUTOINCR\fR, the same device address
139 will be used for every datum access. For example, this flag may be useful when
140 reading from a data register.
141 .SH RETURN VALUES
144 These functions return the value read from the mapped address.
145 .SH CONTEXT
148 These functions can be called from user, kernel, or interrupt context.
149 .SH ATTRIBUTES
152 See \fBattributes\fR(5) for descriptions of the following attributes:
157 box;
158 c | c
159 l | l .
160 ATTRIBUTE TYPE  ATTRIBUTE VALUE
162 Interface Stability     T{
163 \fBddi_rep_getb()\fR, \fBddi_rep_getl()\fR, \fBddi_rep_getll()\fR, and \fBddi_rep_getw()\fR are Obsolete \fBddi_rep_get8()\fR, \fBddi_rep_get16()\fR, \fBddi_rep_get32()\fR, \fBddi_rep_get64()\fR are Committed
167 .SH SEE ALSO
170 \fBddi_get8\fR(9F), \fBddi_put8\fR(9F), \fBddi_regs_map_free\fR(9F),
171 \fBddi_regs_map_setup\fR(9F), \fBddi_rep_put8\fR(9F)