Introduction to I/O Kit Fundamentals

This document explains the terminology, concepts, architecture, and basic mechanisms of the I/O Kit, Apple’s object-oriented framework for developing device drivers for OS X. It contains essential background information for anyone wanting to create device drivers for this platform.

Who Should Read This Document?

There are two general types of I/O Kit developers, and this document tries to be useful to both. The first type is the developer creating a device driver that is to be resident in the kernel; the second type is the application developer who is using an I/O Kit device interface to communicate with hardware. Some chapters contain information useful to both types of developers, and others contain information that is of interest only to writers of kernel-resident drivers.

Obviously there are things I/O Kit Fundamentals does not cover. It does not, for example, describe the use of the development tools or the use of specific driver programming interfaces. But it does help you to understand the hows and whys of the I/O Kit, enabling you to obtain the most value from the more specific documentation and examples.

Organization of This Document

I/O Kit Fundamentals gives a broad, conceptual description of the I/O Kit and device-driver development on OS X. It contains the following chapters:

See Also

Once you’ve absorbed the information in I/O Kit Fundamentals, you should be able to forge ahead and actually create a device driver. Apple provides several documents and other sources of information to help you with your efforts:

Of course, you can always browse the header files shipped with the I/O Kit, which are installed in Kernel.framework/Headers/iokit (kernel-resident) and IOKit.framework/Headers (device interface).)

You can also view developer documentation in Xcode. To do this, select Help from the Xcode menu and then click Show Documentation Window.

You can browse the BSD man pages for more information on BSD and POSIX APIs in two ways: You can type manfunction_name in a Terminal window (for example, man gdb) or you can view an HTML version at OS X Man Pages.

If you're ready to develop a universal binary version of a device driver to run in an Intel-based Macintosh, first read Universal Binary Programming Guidelines, Second Edition. Then, see IOKit Device Driver Design Guidelines for an overview of issues of particular interest to device driver developers. Related information that is specific to a particular device type is available in the documents listed at Hardware & Drivers Documentation.

Apple maintains several websites where developers can go for general and technical information on OS X.