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''
``PCI''
© 2000 The Santa Cruz Operation, Inc. All rights reserved.
HDK 7.1.0b - 15 March 2000