![Intel IXP2400 User Manual Download Page 308](http://html1.mh-extra.com/html/intel/ixp2400/ixp2400_user-manual_2071795308.webp)
308
Development Tools User’s Guide
Intel
®
IXP2400/IXP2800 Network Processors
PCI Bus Functional Model
It provides a backdoor mechanism to read memory contents
from the device.
Address should fall on 32-bit dword boundaries. Those that
do not will be rounded to the corresponding dword. For
example, for address 2, dword 0 (bytes 0-3) will be
returned.
@param io_space
0 = use I/O space,
1 = use memory space
@param address A 32-bit pci address within the device range.
This is the full PCI address, not the address
relative to the device's base address.
@return The dword containing the specified address. See
the notes above.
*/
DLLIMPEX int pci_slave_read(int device_id,
int io_space,
int address);
/**
The pci_slave_check function reads a slave device's memory,
checks it against the expected data item, and prints an
error
message if the data compare fails.
Addresses should fall on 32-bit dword boundaries. If they
do
not, the dword line will be returned. Ex. for address 5, the
second dword (bytes 4-7) will be returned. The calling
function must use pci_slave_read, and mask the returned
contents accordingly.
@param io_space
0 = use I/O space,
1 = use memory space
@param address The full PCI address, not the address
relative to the device's base address.
@oaram data The expected data to be compared against
@return 1 on succes, 0 on failure
*/
DLLIMPEX int pci_slave_check(int device_id,
int io_space,
int address,