read a double word from the configuration space of a device
#include <sys/pci.h>
int _CA_PCI_Read_Config_DWord (
unsigned busnum,
unsigned devfuncname,
unsigned offset,
unsigned cnt,
char *bufptr);
This function reads the specified number of double words from the configuration
space of the given device or function.
The arguments are as follows:
- busnum
- the bus number
- devfuncname
- the name of the device or function
- offset
- the register offset into the configuration space. This offset
must be aligned to a double-word boundary (that is, 0, 4, 8, ..., 252)
- cnt
- the number of double words to read
- bufptr
- a pointer to a buffer where the requested double words are placed
- PCI_SUCCESS
- the device or function was found
- PCI_BAD_REGISTER_NUMBER
- an invalid register offset was given
See _CA_PCI_Find_Device().
Intel
Safety: | |
Interrupt handler |
No |
Signal handler |
No |
Thread |
No |
When you use the _CA_PCI_... functions:
- Your program must be linked for
privity level 1, and the process must be run by the superuser
(root) or a
setuid program that's owned by the superuser but started by a
regular user.
For more information on privity, see
the cc
-T option or the Linker
PRIVILEGE
option.
- The stack size must be less than 64K.
_CA_PCI_BIOS_Present(),
_CA_PCI_Find_Class(),
_CA_PCI_Find_Device(),
_CA_PCI_GenerateSpecialCycle(),
_CA_PCI_Read_Config_Byte(),
_CA_PCI_Read_Config_Word(),
_CA_PCI_Write_Config_Byte(),
_CA_PCI_Write_Config_DWord(),
_CA_PCI_Write_Config_Word()