'\" 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 "1 Nov 2005" "SunOS 5.11" "Kernel Functions for Drivers" .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 #include \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 .mk .na \fB\fIhandle\fR\fR .ad .RS 10n .rt The data access handle returned from \fBpci_config_setup\fR(9F). .RE .sp .ne 2 .mk .na \fB\fIoffset\fR\fR .ad .RS 10n .rt Byte offset from the beginning of the \fBPCI \fRConfiguration space. .RE .sp .ne 2 .mk .na \fB\fIvalue\fR\fR .ad .RS 10n .rt 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 tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) . ATTRIBUTE TYPEATTRIBUTE VALUE _ Interface StabilityT{ \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)