An IOService class representing a PCI device.
- macOS 10.0+
The discovery of a 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.
The kIOPCIMatchKey property matches the vendor and device ID (0x00) register, or the subsystem register (0x2c).
The kIOPCIPrimaryMatchKey property matches the vendor and device ID (0x00) register.
The kIOPCISecondaryMatchKey property matches the subsystem register (0x2c).
The kIOPCIClassMatchKey property matches the class code register (0x08). The default mask for this register is 0xffffff00.
Matches a device whose vendor ID is 0x1011, and device ID is 0x0026, including subsystem IDs.
Matches with any device with a vendor ID of 0x9004, and a device ID of 0xzz78 or 0x78zz, where 'z' is don't care.
Matches a device whose class code is 0x0200zz, an ethernet device.