Even though the IOService class inherits directly from IORegistryEntry and, by extension, from OSObject, you can think of IOService as the root class of nearly every object in the I/O Registry and, at least indirectly, of every driver. The methods of the IOService API are numerous and wide-ranging, providing services for most aspects of device management, from driver matching and loading to device interrupts and power management.
The majority of these methods are for internal (IOService) and I/O Kit family use. Many IOService methods are helper methods that IOService uses to implement other methods. Many more are meant for the I/O Kit families to implement. As a driver developer for a family-supported device, you will implement or call only a small fraction of the methods in IOService. If you are developing a driver for a familyless device, such as a PCI device, you may need to implement some of the IOService methods that families typically implement.
This chapter explores the public IOService methods that are available for external use in each of the following categories:
Driver life cycle, including matching
Notifications and messaging
Accessing objects
Power management
Memory mapping
Interrupt handling
Driver Life-Cycle and Matching Functionality
Notifications and Driver Messaging
Access Methods
Power Management
Memory Mapping and Interrupt Handling
Miscellaneous IOService Methods
Last updated: 2007-03-06