About This Book

This document assumes some basic familiarity with programming the OS X kernel. See Kernel Programming Guide for a broad overview.

Introduction to Writing PCI Drivers

Writing PCI Drivers is intended for anyone who wants to develop PCI drivers for OS X. This book assumes a basic understanding of PCI (Peripheral Component Interface), as well as a basic understanding of the I/O Kit (Apple’s object-oriented framework for developing device drivers in OS X).

This book covers the issues specific to PCI driver development on OS X. It does not cover the PCI architecture itself except as it pertains to the I/O Kit PCI framework. It also does not discuss general driver writing or porting. For books on these subjects, see Other Apple Publications.

This book only covers communication between your driver and PCI-based hardware. It does not cover the code you need to write to allow your driver to be accessed by the rest of the system. For information on writing a specific category of device driver, such as a network or video driver, see the documentation for the appropriate I/O Kit family.

Organization of this Document

Chapter 2, PCI Family Architecture, describes the basic I/O Kit classes in OS X that are relevant if you are developing a PCI driver.

Chapter 3, Writing a Driver for a PCI Bridge, explains the basic types of PCI bridges and provides information on how to develop drivers for them.

Chapter 4, Writing a Driver for a PCI Device, covers matching and device setup for all PCI devices.

Chapter 5, Writing a Driver for an AGP Device, adds information specific to AGP devices.

Chapter 6, Taking Primary Interrupts, gives additional information about handling interrupts in a PCI device driver.

Chapter 7, Endianness and Addressing, explains the difference between byte-invariant addressing and register endianness and their importance to PCI driver developers.

See Also

Other Apple Publications

Apple has a series of documents on OS X software development. You can obtain other books in this series from Apple’s Developer Documentation website, http://developer.apple.com/Documentation.

Other documents that are of interest to device driver developers are Kernel Programming Guide and IOKit Fundamentals.

In addition, the book Designing PCI Cards and Drivers for Power Macintosh Computers, while not specific to OS X, may be helpful in understanding PCI concepts and in understanding how Open Firmware and declaration ROMs interact with PCI devices. You can find this document in the hardware section of Apple’s Developer Documentation website.

Information on the Web

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