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"
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
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);
26 \fBuint16_t\fR \fBpci_config_get16\fR(\fBddi_acc_handle_t\fR \fIhandle\fR, \fBoff_t\fR \fIoffset\fR);
31 \fBuint32_t\fR \fBpci_config_get32\fR(\fBddi_acc_handle_t\fR \fIhandle\fR, \fBoff_t\fR \fIoffset\fR);
36 \fBuint64_t\fR \fBpci_config_get64\fR(\fBddi_acc_handle_t\fR \fIhandle\fR, \fBoff_t\fR \fIoffset\fR);
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);
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);
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);
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);
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.
85 The data access handle returned from \fBpci_config_setup\fR(9F).
94 Byte offset from the beginning of the \fBPCI \fRConfiguration space.
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.
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.
134 These routines can be called from user, kernel, or interrupt context.
138 See \fBattributes\fR(5) for descriptions of the following attributes:
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
156 \fBattributes\fR(5), \fBpci_config_setup\fR(9F), \fBpci_config_teardown\fR(9F)