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_IO_GET8 9F "Nov 1, 2005"
8 ddi_io_get8, ddi_io_get16, ddi_io_get32, ddi_io_getb, ddi_io_getl, ddi_io_getw
9 \- read data from the mapped device register in I/O space
14 #include <sys/sunddi.h>
18 \fBuint8_t\fR \fBddi_io_get8\fR(\fBddi_acc_handle_t\fR \fIhandle\fR, \fBuint8_t *\fR\fIdev_addr\fR);
23 \fBuint16_t\fR \fBddi_io_get16\fR(\fBddi_acc_handle_t\fR \fIhandle\fR, \fBuint16_t *\fR\fIdev_addr\fR);
28 \fBuint32_t\fR \fBddi_io_get32\fR(\fBddi_acc_handle_t\fR \fIhandle\fR, \fBuint32_t *\fR\fIdev_addr\fR);
34 Solaris DDI specific (Solaris DDI). The \fBddi_io_get8()\fR,
35 \fBddi_io_get16()\fR, \fBddi_io_get32()\fR, \fBddi_io_getb()\fR,
36 \fBddi_io_getl()\fR, and \fBddi_io_getw()\fR functions are obsolete. The
37 \fBddi_get8\fR(9F) function replaces \fBddi_io_get8()\fR. The
38 \fBddi_get16\fR(9F) function replaces \fBddi_io_get16()\fR. The
39 \fBddi_get32\fR(9F) function replaces \fBddi_io_get32()\fR. The
40 \fBddi_get8\fR(9F) function replaces \fBddi_io_getb()\fR. The
41 \fBddi_get32\fR(9F) function replaces \fBddi_io_getl()\fR. The
42 \fBddi_get16\fR(9F) function replaces \fBddi_io_getw()\fR.
50 Data access handle returned from setup calls, such as
51 \fBddi_regs_map_setup\fR(9F).
66 These routines generate a read of various sizes from the device address,
67 \fIdev_addr\fR, in I/O space. The \fBddi_io_get8()\fR, \fBddi_io_get16()\fR,
68 and \fBddi_io_get32()\fR functions read 8 bits, 16 bits, and 32 bits of data,
69 respectively, from the device address, \fIdev_addr\fR.
72 Each individual datum will automatically be translated to maintain a consistent
73 view between the host and the device based on the encoded information in the
74 data access handle. The translation may involve byte-swapping if the host and
75 the device have incompatible endian characteristics.
79 These functions can be called from user, kernel, or interrupt context.
83 See \fBattributes\fR(5) for descriptions of the following attributes:
91 ATTRIBUTE TYPE ATTRIBUTE VALUE
93 Interface Stability Obsolete
99 \fBisa\fR(4), \fBddi_get8\fR(9F), \fBddi_get16\fR(9F), \fBddi_get32\fR(9F),
100 \fBddi_io_put8\fR(9F), \fBddi_io_rep_get8\fR(9F), \fBddi_io_rep_put8\fR(9F),
101 \fBddi_regs_map_free\fR(9F), \fBddi_regs_map_setup\fR(9F),
102 \fBddi_device_acc_attr\fR(9S)