PATH 
ADC Home > Documentation > Hardware > Device Managers and Drivers > PCI Card Services > Designing PCI Cards and Drivers for Power Macintosh Computers


  

Driver Package

The native driver model defines a new driver packaging format. This package may contain generic drivers or family drivers, as explained in Generic and Family Drivers earlier in this chapter.

The native driver package is a CFM code fragment that may reside in the Macintosh ROM, in an expansion ROM, or in the data fork of a Preferred Execution Format (PEF)file. File-based generic and family driver fragments do not need a resource fork, have a file type of 'ndrv', and have an unspecified file creator. ROM-based PCI drivers may be replaced by disk-based versions of the driver located in the Extensions folder. PEF and the CFM are described in Inside Macintosh: PowerPC System Software.

A native driver package must define and export at least one data symbol through the CFM's export mechanism. This symbol must be named TheDriverDescription ; it is a data structure that describes the drivers type, functionality, and characteristics. This data structure is described in Driver Description Structure.

Depending on the type of driver, additional symbols may need to be exported. The generic 'ndrv' driver type requires that the CFM package export a single code entry point called DoDriverIO, which passes all driver I/O requests. DoDriverIO must respond to the k OpenCommand, k CloseCommand, k ReadCommand, k WriteCommand, k ControlCommand, k StatusCommand, k KillIOCommand, k InitializeCommand, and k FinalizeCommand commands. Other driver types for device families export and import symbols and entry points defined by the device family or device expert.


© 1999 Apple Computer, Inc. – (Last Updated 26 March 99)