IOPCIDevice
Abstract: An IOService class representing a PCI device.
The discovery of an PCI device by the PCI bus family results in an instance of the IOPCIDevice being created and published. It provides services for looking up and mapping memory mapped hardware, and access to the PCI configuration and I/O spaces.
Matching Supported by IOPCIDevice
Two types of matching are available, OpenFirmware name matching and PCI register matching. Currently, only one of these two matching schemes can be used in the same property table.
OpenFirmware Name Matching
IOService performs matching based on the IONameMatch property (see IOService). IOPCIDevices created with OpenFirmware device tree entries will name match based on the standard OpenFirmware name matching properties.
PCI Register Matching
A PCI device driver can also match on the values of certain config space registers.
In each case, several matching values can be specified, and an optional mask for the value of the config space register may follow the value, preceded by an '&' character.
kIOPCIMatchKey, "IOPCIMatch"
The kIOPCIMatchKey property matches the vendor and device ID (0x00) register, or the subsystem register (0x2c).
kIOPCIPrimaryMatchKey, "IOPCIPrimaryMatch"
The kIOPCIPrimaryMatchKey property matches the vendor and device ID (0x00) register.
kIOPCISecondaryMatchKey, "IOPCISecondaryMatch"
The kIOPCISecondaryMatchKey property matches the subsystem register (0x2c).
kIOPCIClassMatchKey, "IOPCIClassMatch"
The kIOPCIClassMatchKey property matches the class code register (0x08). The default mask for this register is 0xffffff00.
Examples:
<key>IOPCIMatch</key>
<string>0x00261011</string>
Matches a device whose vendor ID is 0x1011, and device ID is 0x0026, including subsystem IDs.
<key>IOPCIMatch</key>
<string>0x00789004&0x00ffffff 0x78009004&0x0xff00ffff</string>
Matches with any device with a vendor ID of 0x9004, and a device ID of 0xzz78 or 0x78zz, where 'z' is don't care.
<key>IOPCIClassMatch</key>
<string>0x02000000&0xffff0000</string>
Matches a device whose class code is 0x0200zz, an ethernet device.
© 2000 Apple Computer, Inc. (Last Updated 2/23/2000)