9022 loader.efi: module placement must check memory map
[unleashed.git] / share / man / man9f / pci_config_get8.9f
blobf315bf6713d8dde3cca53799a31e518115276ccb
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 PCI_CONFIG_GET8 9F "Nov 1, 2005"
7 .SH NAME
8 pci_config_get8, pci_config_get16, pci_config_get32, pci_config_get64,
9 pci_config_put8, pci_config_put16, pci_config_put32, pci_config_put64,
10 pci_config_getb, pci_config_getl, pci_config_getll, pci_config_getw,
11 pci_config_putb, pci_config_putl, pci_config_putll, pci_config_putw \- read or
12 write single datum of various sizes to the PCI Local Bus Configuration space
13 .SH SYNOPSIS
14 .LP
15 .nf
16 #include <sys/ddi.h>
17 #include <sys/sunddi.h>
21 \fBuint8_t\fR \fBpci_config_get8\fR(\fBddi_acc_handle_t\fR \fIhandle\fR, \fBoff_t\fR \fIoffset\fR);
22 .fi
24 .LP
25 .nf
26 \fBuint16_t\fR \fBpci_config_get16\fR(\fBddi_acc_handle_t\fR \fIhandle\fR, \fBoff_t\fR \fIoffset\fR);
27 .fi
29 .LP
30 .nf
31 \fBuint32_t\fR \fBpci_config_get32\fR(\fBddi_acc_handle_t\fR \fIhandle\fR, \fBoff_t\fR \fIoffset\fR);
32 .fi
34 .LP
35 .nf
36 \fBuint64_t\fR \fBpci_config_get64\fR(\fBddi_acc_handle_t\fR \fIhandle\fR, \fBoff_t\fR \fIoffset\fR);
37 .fi
39 .LP
40 .nf
41 \fBvoid\fR \fBpci_config_put8\fR(\fBddi_acc_handle_t\fR \fIhandle\fR, \fBoff_t\fR \fIoffset\fR,
42      \fBuint8_t\fR \fIvalue\fR);
43 .fi
45 .LP
46 .nf
47 \fBvoid\fR \fBpci_config_put16\fR(\fBddi_acc_handle_t\fR \fIhandle\fR, \fBoff_t\fR \fIoffset\fR,
48      \fBuint16_t\fR \fIvalue\fR);
49 .fi
51 .LP
52 .nf
53 \fBvoid\fR \fBpci_config_put32\fR(\fBddi_acc_handle_t\fR \fIhandle\fR, \fBoff_t\fR \fIoffset\fR,
54      \fBuint32_t\fR \fIvalue\fR);
55 .fi
57 .LP
58 .nf
59 \fBvoid\fR \fBpci_config_put64\fR(\fBddi_acc_handle_t\fR \fIhandle\fR, \fBoff_t\fR \fIoffset\fR,
60      \fBuint64_t\fR \fIvalue\fR);
61 .fi
63 .SH INTERFACE LEVEL
64 .sp
65 .LP
66 Solaris DDI specific (Solaris DDI). The \fBpci_config_getb()\fR,
67 \fBpci_config_getl()\fR, \fBpci_config_getll()\fR, \fBpci_config_getw()\fR,
68 \fBpci_config_putb()\fR, \fBpci_config_putl()\fR, \fBpci_config_putll()\fR, and
69 \fBpci_config_putw()\fR functions are obsolete. The \fBpci_config_get8()\fR
70 function replaces \fBpci_config_getb()\fR. The \fBpci_config_get32()\fR
71 function replaces \fBpci_config_getl()\fR. The \fBpci_config_get64()\fR
72 function replaces \fBpci_config_getll()\fR. The \fBpci_config_get16()\fR
73 function replaces \fBpci_config_getw()\fR. The \fBpci_config_put8()\fR function
74 replaces \fBpci_config_putb()\fR. The \fBpci_config_put32()\fR function
75 replaces \fBpci_config_putl()\fR. The \fBpci_config_put64()\fR function
76 replaces \fBpci_config_putll()\fR. The \fBpci_config_put16()\fR function
77 replaces \fBpci_config_putw()\fR.
78 .SH PARAMETERS
79 .sp
80 .ne 2
81 .na
82 \fB\fIhandle\fR\fR
83 .ad
84 .RS 10n
85 The data access handle returned from \fBpci_config_setup\fR(9F).
86 .RE
88 .sp
89 .ne 2
90 .na
91 \fB\fIoffset\fR\fR
92 .ad
93 .RS 10n
94 Byte offset from the beginning of the \fBPCI \fRConfiguration space.
95 .RE
97 .sp
98 .ne 2
99 .na
100 \fB\fIvalue\fR\fR
102 .RS 10n
103 Output data.
106 .SH DESCRIPTION
109 These routines read or write a single datum of various sizes from or to the
110 \fBPCI \fRLocal Bus Configuration space. The \fBpci_config_get8()\fR,
111 \fBpci_config_get16()\fR, \fBpci_config_get32()\fR, and
112 \fBpci_config_get64()\fR functions read 8 bits, 16 bits, 32 bits, and 64 bits
113 of data, respectively. The \fBpci_config_put8()\fR, \fBpci_config_put16()\fR,
114 \fBpci_config_put32()\fR, and \fBpci_config_put64()\fR functions write 8 bits,
115 16 bits, 32 bits, and 64 bits of data, respectively. The \fIoffset\fR argument
116 must be a multiple of the datum size.
119 Since th  \fBPCI \fRLocal Bus Configuration space is represented in little
120 endian data format, these functions translate the data from or to native host
121 format to or from little endian format.
124 \fBpci_config_setup\fR(9F) must be called before invoking these functions.
125 .SH RETURN VALUES
128 \fBpci_config_get8()\fR, \fBpci_config_get16()\fR, \fBpci_config_get32()\fR,
129 and \fBpci_config_get64()\fR return the value read from the  \fBPCI \fRLocal
130 Bus Configuration space.
131 .SH CONTEXT
134 These routines can be called from user, kernel, or interrupt context.
135 .SH ATTRIBUTES
138 See \fBattributes\fR(5) for descriptions of the following attributes:
143 box;
144 c | c
145 l | l .
146 ATTRIBUTE TYPE  ATTRIBUTE VALUE
148 Interface Stability     T{
149 \fBpci_config_getb()\fR, \fBpci_config_getl()\fR, \fBpci_config_getll()\fR, \fBpci_config_getw()\fR, \fBpci_config_putb()\fR, \fBpci_config_putl()\fR, \fBpci_config_putll()\fR, \fBpci_config_putw()\fR are Obsolete \fBpci_config_get8()\fR, \fBpci_config_get16()\fR, \fBpci_config_get32()\fR, \fBpci_config_get64()\fR, \fBpci_config_put8()\fR, \fBpci_config_put16()\fR, \fBpci_config_put32()\fR, \fBpci_config_put64()\fR are Committed
153 .SH SEE ALSO
156 \fBattributes\fR(5), \fBpci_config_setup\fR(9F), \fBpci_config_teardown\fR(9F)