Texas Instruments TNETE211 Network Card User Manual


 
PCI Configuration Space
2-6
Normally, access to the configuration space is limited to the operating system.
On power-up, the vendor ID, device ID, revision, subclass, Min_Gnt, and
Max_Lat registers are loaded with default values. Vendor-specific data is
loaded into these registers by placing the data into the EEPROM, which is read
at the end of reset if autoload is enabled with a pullup resistor on the EDIO pin.
If the data read from the EEPROM has a checksum error, values are fetched
from the default PCI parameter registers, which are located at addresses
0x08h to 0x0Fh in the internal/DIO registers space.
Some fields in the configuration space like the bits in the memory base address
register and the I/O base address register, which indicate the space size al-
location required to access the host registers, are hardwired in the Thunder-
LAN controllers. Some of the allowed PCI configuration space values like base
registers beyond the basic I/O and memory base registers are not implement-
ed because no other entities are supported by this PCI interface other than the
network function.
To find register information, you must first identify the PCI function ID:
//––––––––––––––––––––––––––––––––––––––––––––––––––––––––
// PCIFindDevice – Find PCI device
//
// Parameters:
// DeviceID WORD The device ID
// VendorID WORD The vendor ID
// Index WORD index (normally 0, use when more than
1 device)
// pDev WORD* Where to put the device id
//
// Return val:
// int 0 if successful. see std return codes in
header
//––––––––––––––––––––––––––––––––––––––––––––––––––––––––
WORD PciFindDevice(
WORD deviceID,
WORD vendorID,
WORD Index,
WORD *pDev)
{
union REGS r;