getconf: don't include xpg4 bits, gcc7 includes xpg6 bits for us
[unleashed.git] / share / man / man9f / ddi_get8.9f
blob4c979e66129389afadd9bc0d06fbc20eb112edcd
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_GET8 9F "Nov 1, 2005"
7 .SH NAME
8 ddi_get8, ddi_get16, ddi_get32, ddi_get64, ddi_getb, ddi_getw, ddi_getl,
9 ddi_getll \- read data from the mapped memory address, device register or
10 allocated DMA memory address
11 .SH SYNOPSIS
12 .LP
13 .nf
14 #include <sys/ddi.h>
15 #include <sys/sunddi.h>
19 \fBuint8_t\fR \fBddi_get8\fR(\fBddi_acc_handle_t\fR \fIhandle\fR, \fBuint8_t *\fR\fIdev_addr\fR);
20 .fi
22 .LP
23 .nf
24 \fBuint16_t\fR \fBddi_get16\fR(\fBddi_acc_handle_t\fR \fIhandle\fR, \fBuint16_t *\fR\fIdev_addr\fR);
25 .fi
27 .LP
28 .nf
29 \fBuint32_t\fR \fBddi_get32\fR(\fBddi_acc_handle_t\fR \fIhandle\fR, \fBuint32_t *\fR\fIdev_addr\fR);
30 .fi
32 .LP
33 .nf
34 \fBuint64_t\fR \fBddi_get64\fR(\fBddi_acc_handle_t\fR \fIhandle\fR, \fBuint64_t *\fR\fIdev_addr\fR);
35 .fi
37 .SH INTERFACE LEVEL
38 .sp
39 .LP
40 Solaris DDI specific (Solaris DDI). The \fBddi_getb()\fR, \fBddi_getl()\fR,
41 \fBddi_getll()\fR, and \fBddi_getw()\fR functions are obsolete. The
42 \fBddi_get8()\fR function replaces \fBddi_getb()\fR. The \fBddi_get32()\fR
43 function replaces \fBddi_getl()\fR. The \fBddi_get64()\fR function replaces
44 \fBddi_getll()\fR. The \fBddi_get16()\fR function replaces \fBddi_getw()\fR.
45 .SH PARAMETERS
46 .sp
47 .ne 2
48 .na
49 \fB\fIhandle\fR\fR
50 .ad
51 .RS 12n
52 The data access handle returned from setup calls, such as
53 \fBddi_regs_map_setup\fR(9F).
54 .RE
56 .sp
57 .ne 2
58 .na
59 \fB\fIdev_addr\fR\fR
60 .ad
61 .RS 12n
62 Base device address.
63 .RE
65 .SH DESCRIPTION
66 .sp
67 .LP
68 The \fBddi_get8()\fR, \fBddi_get16()\fR, \fBddi_get32()\fR, and
69 \fBddi_get64()\fR functions read 8 bits, 16 bits, 32 bits and 64 bits of data,
70 respectively, from the device address, \fIdev_addr\fR.
71 .sp
72 .LP
73 Each individual datum will automatically be translated to maintain a consistent
74 view between the host and the device based on the encoded information in the
75 data access handle.  The translation may involve byte-swapping if the host and
76 the device have incompatible endian characteristics.
77 .sp
78 .LP
79 For certain bus types, you can call these \fBDDI\fR functions from a
80 high-interrupt context. These types include \fBISA\fR and SBus buses. See
81 \fBsysbus\fR(4), \fBisa\fR(4), and \fBsbus\fR(4) for details. For the PCI bus,
82 you can, under certain conditions, call these \fBDDI\fR functions from a
83 high-interrupt context. See \fBpci\fR(4).
84 .SH RETURN VALUES
85 .sp
86 .LP
87 These functions return the value read from the mapped address.
88 .SH CONTEXT
89 .sp
90 .LP
91 These functions can be called from user, kernel, or interrupt context.
92 .SH ATTRIBUTES
93 .sp
94 .LP
95 See \fBattributes\fR(5) for descriptions of the following attributes:
96 .sp
98 .sp
99 .TS
100 box;
101 c | c
102 l | l .
103 ATTRIBUTE TYPE  ATTRIBUTE VALUE
105 Interface Stability     T{
106 \fBddi_getb()\fR, \fBddi_getl()\fR, \fBddi_getll()\fR, and \fBddi_getw()\fR are Obsolete; \fBddi_get8()\fR, \fBddi_get16()\fR, \fBddi_get32()\fR, \fBddi_get64()\fR are Committed
110 .SH SEE ALSO
113 \fBddi_put8\fR(9F), \fBddi_regs_map_free\fR(9F), \fBddi_regs_map_setup\fR(9F),
114 \fBddi_rep_get8\fR(9F), \fBddi_rep_put8\fR(9F)