<!--
{
  "availability" : [
    "DriverKit: -",
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "PCIDriverKit",
  "identifier" : "/documentation/PCIDriverKit/IOPCIDevice",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "PCIDriverKit"
    ],
    "preciseIdentifier" : "c:@S@IOPCIDevice"
  },
  "title" : "IOPCIDevice"
}
-->

# IOPCIDevice

A DriverKit provider object that manages access to your custom PCI hardware.

```
class IOPCIDevice;
```

## Overview

Use an `IOPCIDevice` object to enable or manage the custom features of your PCI hardware. You don’t create instances of this class directly. Instead, the system creates an `IOPCIDevice` object and passes it to the <doc://com.apple.documentation/documentation/DriverKit/IOService> subclass of your custom driver. Use the methods of this object to read and write your hardware’s configuration settings. You can also use it to read and write any custom data in your device’s memory-mapped I/O.

> Note:
> The endpoint driver is responsible for enabling the Memory Space Enable and Bus Master Enable settings each time it configures the PCI device. When a crash occurs, or when the system unloads your driver, the system disables these features.

## Topics

### Running the Service

[`init`](/documentation/PCIDriverKit/IOPCIDevice/init)

Initializes the device.

[`Open`](/documentation/PCIDriverKit/IOPCIDevice/Open)

Opens a session to the PCI device.

[`Close`](/documentation/PCIDriverKit/IOPCIDevice/Close)

Closes the session to the PCI device.

[`free`](/documentation/PCIDriverKit/IOPCIDevice/free)

Performs any final cleanup for the object.

### Reading and Writing Configuration Data

[`ConfigurationRead8`](/documentation/PCIDriverKit/IOPCIDevice/ConfigurationRead8)

Reads an 8-bit data value synchronously from the device’s configuration space.

[`ConfigurationRead16`](/documentation/PCIDriverKit/IOPCIDevice/ConfigurationRead16)

Reads a 16-bit data value synchronously from the device’s configuration space.

[`ConfigurationRead32`](/documentation/PCIDriverKit/IOPCIDevice/ConfigurationRead32)

Reads a 32-bit data value synchronously from the device’s configuration space.

[`ConfigurationWrite8`](/documentation/PCIDriverKit/IOPCIDevice/ConfigurationWrite8)

Writes an 8-bit data value to the device’s configuration space.

[`ConfigurationWrite16`](/documentation/PCIDriverKit/IOPCIDevice/ConfigurationWrite16)

Writes an 16-bit data value to the device’s configuration space.

[`ConfigurationWrite32`](/documentation/PCIDriverKit/IOPCIDevice/ConfigurationWrite32)

Writes an 32-bit data value to the device’s configuration space.

[Configuration Data Offsets](/documentation/PCIDriverKit/configuration-data-offsets-enum)

Constants for the offsets that you use to read and write configuration registers.

[Bridge Header Offsets](/documentation/PCIDriverKit/bridge-header-offsets-enum)

Constants that specify offsets to distinct registers in a memory range.

[Command Register Bits](/documentation/PCIDriverKit/command-register-bits-enum)

Constants that you use to access specific bits of the command register.

[Status Register Bits](/documentation/PCIDriverKit/status-register-bits-enum)

Constants that you use to access specific bits of the status register.

### Reading and Writing Memory Locations

[`MemoryRead8`](/documentation/PCIDriverKit/IOPCIDevice/MemoryRead8-1edw0)

Reads a 8-bit value synchronously from the PCI device’s aperture at the specified memory index.

[`MemoryRead8`](/documentation/PCIDriverKit/IOPCIDevice/MemoryRead8-7b2zp)

Reads a 8-bit value synchronously from the PCI device’s aperture at the specified memory index.

[`MemoryRead16`](/documentation/PCIDriverKit/IOPCIDevice/MemoryRead16-9qkdh)

Reads a 16-bit value synchronously from the PCI device’s aperture at the specified memory index.

[`MemoryRead16`](/documentation/PCIDriverKit/IOPCIDevice/MemoryRead16-50bq8)

Reads a 16-bit value synchronously from the PCI device’s aperture at the specified memory index.

[`MemoryRead32`](/documentation/PCIDriverKit/IOPCIDevice/MemoryRead32-60hg9)

Reads a 32-bit value synchronously from the PCI device’s aperture at the specified memory index.

[`MemoryRead32`](/documentation/PCIDriverKit/IOPCIDevice/MemoryRead32-84jap)

Reads a 32-bit value synchronously from the PCI device’s aperture at the specified memory index.

[`MemoryRead64`](/documentation/PCIDriverKit/IOPCIDevice/MemoryRead64-9ntrf)

Reads a 64-bit value synchronously from the PCI device’s aperture at the specified memory index.

[`MemoryRead64`](/documentation/PCIDriverKit/IOPCIDevice/MemoryRead64-37uob)

Reads a 64-bit value synchronously from the PCI device’s aperture at the specified memory index.

[`MemoryWrite8`](/documentation/PCIDriverKit/IOPCIDevice/MemoryWrite8-1uey6)

Writes an 8-bit value to the PCI device’s aperture at the specified memory index.

[`MemoryWrite8`](/documentation/PCIDriverKit/IOPCIDevice/MemoryWrite8-fzh6)

Writes an 8-bit value to the PCI device’s aperture at the specified memory index.

[`MemoryWrite16`](/documentation/PCIDriverKit/IOPCIDevice/MemoryWrite16-8k6ch)

Writes an 16-bit value to the PCI device’s aperture at the specified memory index.

[`MemoryWrite16`](/documentation/PCIDriverKit/IOPCIDevice/MemoryWrite16-534yk)

Writes an 16-bit value to the PCI device’s aperture at the specified memory index.

[`MemoryWrite32`](/documentation/PCIDriverKit/IOPCIDevice/MemoryWrite32-4pmh)

Writes an 32-bit value to the PCI device’s aperture at the specified memory index.

[`MemoryWrite32`](/documentation/PCIDriverKit/IOPCIDevice/MemoryWrite32-ow7r)

Writes an 32-bit value to the PCI device’s aperture at the specified memory index.

[`MemoryWrite64`](/documentation/PCIDriverKit/IOPCIDevice/MemoryWrite64-8qyob)

Writes an 64-bit value to the PCI device’s aperture at the specified memory index.

[`MemoryWrite64`](/documentation/PCIDriverKit/IOPCIDevice/MemoryWrite64-nvpu)

Writes an 64-bit value to the PCI device’s aperture at the specified memory index.

### Getting Device Information

[`FindPCICapability`](/documentation/PCIDriverKit/IOPCIDevice/FindPCICapability)

Search the configuration space for a PCI capability register.

[`GetBusDeviceFunction`](/documentation/PCIDriverKit/IOPCIDevice/GetBusDeviceFunction)

Returns the device’s bus, device, and function numbers.

[PCI Capabilities](/documentation/PCIDriverKit/pci-capabilities-enum)

Constants that you use to get the capabilities of the PCI device.

[Slot Capabilities](/documentation/PCIDriverKit/slot-capabilities-enum)

Constants that you use to get the slot-related capabilities of the PCI device.

### Managing Interrupts

  <doc://com.apple.documentation/documentation/kernel/1640325-interrupt_types>

### Managing Power

[`HasPCIPowerManagement`](/documentation/PCIDriverKit/IOPCIDevice/HasPCIPowerManagement)

Determines whether the device has the specified PCI bus power management capabilities.

[`EnablePCIPowerManagement`](/documentation/PCIDriverKit/IOPCIDevice/EnablePCIPowerManagement)

Configures the device’s PCI bus power management capabilities.

[Power Management Capabilities](/documentation/PCIDriverKit/power-management-capabilities-enum)

Constants you use to get and set the state of the device’s power management features.

[Power Management Control/Status Register](/documentation/PCIDriverKit/power-management-control-status-register-enum)

Constants you use when checking bits in the power management register.

### Getting Error Codes

[Correctable Error Bits](/documentation/PCIDriverKit/correctable-error-bits-enum)

Constants for the bits in the correctable error status register.

[Uncorrectable Error Bits](/documentation/PCIDriverKit/uncorrectable-error-bits-enum)

Constants for the bits in the uncorrectable error status register.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)