Skip to content

Subsystem · The driver framework

IOKit

A C++ object model that turns hardware into a tree of nodes, matched at boot and unloaded on demand.

IORegistry treeThe IORegistry is a parent/child tree of IOService instances rooted at the platform expert. Userspace attaches via IOUserClient.IORegistryEntryrootIOPlatformExperthardware bring-upIOPCIBridgeiokit / pciIOACPIPlatformExpertiokit / acpiAppleARMPMUiokit / armIOPlatformBatteryManagementiokit / batteryIOPCIDevicevendor 0x14e4IOPCIDevicevendor 0x8086AppleBCM43xxWi-Fi drivermatchesuserspace appIOServiceOpenIOConnectCallMethodIOUserClientiokit/Kernelmach_msgEvery node here is reachable from ioreg -l. Live tree, queried by anything (debugger, power manager, fan controller).
IOKit: structure at a glance.

Articles in this series

Embedded C++, an object tree, and matching dictionaries — IOKit is how every driver on macOS gets loaded, paired with hardware, and called.
Same IOKit object model, userland process. Why kexts are dying, what DriverKit gives you, and how a USB driver actually crosses the boundary.
How XNU tells every driver to drop power when idle and bring it back when needed — the IORegistry-walked power graph, IOPMrootDomain, and the sleep/wake choreography.
The full path of an interrupt from the device asserting a line, through the AIC, through XNU's exception handler, to the driver's IOInterruptDispatchSource callback running on a workloop.
From plug-in to working app — IOUSBHost enumeration, IOKit matching, the DriverKit dext load, the user-space SDK. A complete trace of one device's journey through the stack.
The IOKit object that lets CPU, GPU, ANE, ISP, and media engines share the same physical pages. The unifying primitive behind unified memory's performance story.