DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

pci_read(D3hpci)


pci_read -- read data from PCI configuration space

Synopsis

   #include <sys/types.h>
   #include <sys/hpci.h>
   #include <sys/hpci_bios.h>
   #include <sys/ddi.h>
   

int pci_read_byte(rm_key_t hpci, uchar_t bus, uchar_t devfun, ushort_t offset uchar_t *buf);

int pci_read_word(rm_key_t hpci, uchar_t bus, uchar_t devfun, ushort_t offset ushort_t *buf);

int pci_read_dword(rm_key_t hpci, uchar_t bus, uchar_t devfun, ushort_t offset uint_t *buf);

Description

The pci_read( ) functions read a byte, word, or double word from PCI configuration space for the device on the specified bus with the device/function number as specified in the PCI BIOS specification.

Arguments


hpci
resource manager key for this instance of the hot plug controller.

bus
PCI bus to be queried.

devfun
device/function number as defined in the PCI BIOS specification. This is defined as:
   (device << 3) | (function)

offset
offset into config space from which to read; should be less than 256.

*buf
location to store data that is read.

Return values

This function returns values as per corresponding 2.1 PCI BIOS calls.

Usage

Context and synchronization

Blockable context

Hardware applicability

All

Version applicability

hpci: 1

References

pci(D5)

``Hotplug devices'' in HDK Technical Reference
``PCI'' in HDK Technical Reference


19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - June 2005