#include <IOKit/IODeviceTreeSupport.h>
IOKit/IODeviceTreeSupport.h
variablegIODTPlane
extern const IORegistryPlane * gIODTPlane
variablegIODTPHandleKey
extern const OSSymbol * gIODTPHandleKey
variablegIODTCompatibleKey
extern const OSSymbol * gIODTCompatibleKey
variablegIODTTypeKey
extern const OSSymbol * gIODTTypeKey
variablegIODTModelKey
extern const OSSymbol * gIODTModelKey
variablegIODTBridgeModelKey
extern const OSSymbol * gIODTBridgeModelKey
variablegIODTTargetTypeKey
extern const OSSymbol * gIODTTargetTypeKey
variablegIODTAAPLInterruptsKey
extern const OSSymbol * gIODTAAPLInterruptsKey
variablegIODTDefaultInterruptController
extern const OSSymbol * gIODTDefaultInterruptController
variablegIODTNWInterruptMappingKey
extern const OSSymbol * gIODTNWInterruptMappingKey
variablegIODTAssociatedServiceKey
extern const OSData * gIODTAssociatedServiceKey
macrokIODTAssociatedServiceKey
#define kIODTAssociatedServiceKey "associated-service"
functionIODeviceTreeAlloc
LIBKERN_RETURNS_NOT_RETAINED IORegistryEntry * IODeviceTreeAlloc(void * dtTop)
▾
claude-fable-5, 2026-08-24 · not from Apple sources · verified against xnu iokit/Kernel/IODeviceTreeSupport.cpp
Builds the IODeviceTree registry plane from the flattened device tree passed in from the booter; dtTop is the root DTEntry. Creates the kIODeviceTreePlane plane and the global device tree symbols, makes an IORegistryEntry for each device tree node with its properties, records AAPL,phandle values for interrupt-parent lookups, maps each entry's interrupts (as IODTMapInterrupts does), and attaches the result under the registry root. If the original device tree is not locked down, its memory is returned to the VM system and property storage is copied. Sets the IONWInterrupts key on the root when new-world interrupt mapping was found. Called once during IOKit initialization; returns the root entry of the created plane, retained only by the registry.
functionIODTMatchNubWithKeys
bool IODTMatchNubWithKeys(IORegistryEntry * nub, const char * keys)
▾
claude-fable-5, 2026-08-24 · not from Apple sources · verified against xnu iokit/Kernel/IODeviceTreeSupport.cpp
Matches a device tree nub against one or more names. keys is text in OSUnserialize format, either a single string or an array of strings; each is compared with the entry's compareNames method, which for device tree nubs checks the name, compatible, device_type and model properties, a trailing * acting as a wildcard. Returns true if any key matches.
functionIODTCompareNubName
bool IODTCompareNubName( const IORegistryEntry * regEntry, OSString * name, LIBKERN_RETURNS_RETAINED_ON_NONZERO OSString ** matchingName )
▾
claude-fable-5, 2026-08-24 · not from Apple sources · verified against xnu iokit/Kernel/IODeviceTreeSupport.cpp
Compares name against the device tree nub's name, compatible, device_type and model properties, in that order. A trailing * in name matches any value with the preceding characters as a prefix. Returns true if a match is found; when matchingName is non-NULL (or in the OSSharedPtr overload), also returns the property string that matched, created with OSString::withCString and owned by the caller.
functionIODTCompareNubName
bool IODTCompareNubName( const IORegistryEntry * regEntry, OSString * name, OSSharedPtr<OSString>& matchingName )
▾
claude-fable-5, 2026-08-24 · not from Apple sources · verified against xnu iokit/Kernel/IODeviceTreeSupport.cpp
Compares name against the device tree nub's name, compatible, device_type and model properties, in that order. A trailing * in name matches any value with the preceding characters as a prefix. Returns true if a match is found; when matchingName is non-NULL (or in the OSSharedPtr overload), also returns the property string that matched, created with OSString::withCString and owned by the caller.
enum(anonymous)
| kIODTRecursive | 1 | |
| kIODTExclusive | 2 |
functionIODTFindMatchingEntries
LIBKERN_RETURNS_RETAINED OSCollectionIterator * IODTFindMatchingEntries( IORegistryEntry * from, IOOptionBits options, const char * keys )
▾
claude-fable-5, 2026-08-24 · not from Apple sources · verified against xnu iokit/Kernel/IODeviceTreeSupport.cpp
Searches the device tree plane beginning at from for entries matching keys, in the manner of IODTMatchNubWithKeys. options may include kIODTRecursive to descend through the plane and kIODTExclusive to collect entries that do not match. Entries carrying an AAPL,ignore property are skipped; passing NULL keys collects all entries. Returns a retained OSCollectionIterator over the matching set, or NULL on resource failure; the caller releases the iterator.
typedefIODTCompareAddressCellFunc
typedef SInt64 (*)(UInt32, UInt32 *, UInt32 *) IODTCompareAddressCellFunc;
typedefIODTNVLocationFunc
typedef void (*)(IORegistryEntry *, UInt8 *, UInt8 *, UInt8 *) IODTNVLocationFunc;
functionIODTSetResolving
void IODTSetResolving( IORegistryEntry * regEntry, IODTCompareAddressCellFunc compareFunc, IODTNVLocationFunc locationFunc )
▾
claude-fable-5, 2026-08-24 · not from Apple sources · verified against xnu iokit/Kernel/IODeviceTreeSupport.cpp
Registers an address comparison function for the bus represented by regEntry, used by IODTResolveAddressCell when translating child addresses through the entry's ranges property. compareFunc compares two addresses of a given cell count; buses whose address cells are not simple integers (e.g. PCI) supply their own. The resolver is recorded in a global table and its index stored as the entry's IODTPersist property. locationFunc is ignored (formerly used to generate NVRAM locations).
functionIODTGetCellCounts
void IODTGetCellCounts( IORegistryEntry * regEntry, UInt32 * sizeCount, UInt32 * addressCount )
▾
claude-fable-5, 2026-08-24 · not from Apple sources · verified against xnu iokit/Kernel/IODeviceTreeSupport.cpp
Returns the values of the #size-cells and #address-cells properties of regEntry, which describe the format of addresses of its children. *sizeCount defaults to 1 and *addressCount to 2 when the properties are absent.
functionIODTResolveAddressCell
bool IODTResolveAddressCell( IORegistryEntry * regEntry, UInt32 cellsIn[], IOPhysicalAddress * phys, IOPhysicalLength * len )
▾
claude-fable-5, 2026-08-24 · not from Apple sources · verified against xnu iokit/Kernel/IODeviceTreeSupport.cpp
Translates a bus address to a physical address and length. cellsIn contains address and size cells in the format a child of regEntry uses in its reg property (per regEntry's #address-cells and #size-cells). The address is looked up in the ranges property of each entry walking toward the root, using the comparison function registered with IODTSetResolving for that bus, or a default integer comparison when the cell formats agree; an entry with no ranges property ends the walk. Returns true on success with *phys and *len set; panics on a malformed device tree.
functionIODTResolveAddressing
LIBKERN_RETURNS_NOT_RETAINED OSArray * IODTResolveAddressing( IORegistryEntry * regEntry, const char * addressPropertyName, IODeviceMemory * parent )
▾
claude-fable-5, 2026-08-24 · not from Apple sources · verified against xnu iokit/Kernel/IODeviceTreeSupport.cpp
Creates IODeviceMemory objects for each address range in the entry's addressPropertyName property (typically reg), resolving each with IODTResolveAddressCell. If parent is non-NULL the objects are created as subranges of that IODeviceMemory where possible. The resulting OSArray is stored as the entry's IODeviceMemory property and returned without an extra retain for the caller; returns NULL if the property or parent entry is missing or the parent has no #size-cells.
structIONVRAMDescriptor
| unsigned int:4 | format | |
| unsigned int:1 | marker | |
| unsigned int:3 | bridgeCount | |
| unsigned int:2 | busNum | |
| unsigned int:30 | bridgeDevices | |
| unsigned int:3 | functionNum | |
| unsigned int:5 | deviceNum |
functionIODTMakeNVDescriptor
IOReturn IODTMakeNVDescriptor(IORegistryEntry * regEntry, IONVRAMDescriptor * hdr)
▾
claude-fable-5, 2026-08-24 · not from Apple sources · verified against xnu iokit/IOKit/IODeviceTreeSupport.h (no implementation in xnu)
Not implemented in current xnu; declared for legacy Open Firmware NVRAM support. From the signature and the IONVRAMDescriptor definition, it filled in a packed descriptor recording the PCI location of regEntry - bus number, device and function numbers, and the device numbers of up to five intervening bridges - suitable for storing a device reference in NVRAM.
functionIODTFindSlotName
LIBKERN_RETURNS_NOT_RETAINED OSData * IODTFindSlotName( IORegistryEntry * regEntry, UInt32 deviceNumber )
▾
claude-fable-5, 2026-08-24 · not from Apple sources · verified against xnu iokit/Kernel/IODeviceTreeSupport.cpp
Returns the slot name for a PCI device entry. If the entry already has an AAPL,slot-name property that data is returned; otherwise the parent's slot-names property (a 32-bit device mask followed by packed C strings) is searched for deviceNumber, and the matching name is stored on the entry as AAPL,slot-name and returned. Returns NULL if no slot name exists for the device. The returned OSData is not additionally retained for the caller.
functionIODTInterruptControllerName
const OSSymbol * IODTInterruptControllerName(IORegistryEntry * regEntry)
▾
claude-fable-5, 2026-08-24 · not from Apple sources · verified against xnu iokit/Kernel/IODeviceTreeSupport.cpp
Returns the symbol naming the interrupt controller represented by regEntry, formed as IOInterruptController%08X from the entry's AAPL,phandle property; interrupt controller drivers register under this name and IODTMapInterrupts records it in nubs' IOInterruptControllers property. Returns NULL if the entry has no phandle. The returned OSSymbol is retained for the caller.
functionIODTMapInterrupts
bool IODTMapInterrupts(IORegistryEntry * regEntry)
▾
claude-fable-5, 2026-08-24 · not from Apple sources · verified against xnu iokit/Kernel/IODeviceTreeSupport.cpp
Parses the interrupt properties of a device tree entry and stores the result in IOKit form. Each specifier in the interrupts property (or AAPL,interrupts on old-world trees) is mapped through interrupt-parent references and interrupt-map translations to its interrupt controller. The resolved specifiers and controller names are set as the entry's IOInterruptSpecifiers and IOInterruptControllers properties, which IOService interrupt registration uses. Returns true if all interrupts were mapped.
enum(anonymous)
| kIODTInterruptShared | 1 |
functionIODTGetInterruptOptions
IOReturn IODTGetInterruptOptions( IORegistryEntry * regEntry, int source, IOOptionBits * options )
▾
claude-fable-5, 2026-08-24 · not from Apple sources · verified against xnu iokit/Kernel/IODeviceTreeSupport.cpp
Returns option bits for interrupt index source of a device tree nub. *options is set to kIODTInterruptShared if the interrupt specifier is shared with another entry, otherwise zero. Returns kIOReturnNoInterrupt if the entry has no mapped IOInterruptControllers/IOInterruptSpecifiers properties or no specifier at that index, else kIOReturnSuccess.
functionIONDRVLibrariesInitialize
IOReturn IONDRVLibrariesInitialize(IOService * provider)
▾
claude-fable-5, 2026-08-24 · not from Apple sources · verified against xnu iokit/Kernel/IODeviceTreeSupport.cpp
Obsolete; stub that returns kIOReturnUnsupported. Formerly initialized the library support (interrupt services, name registry) for Mac OS Classic NDRV video drivers.