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