Terminology
The following list defines new terms used in the rest of this book:
-
Application programming interface (API):
The API is the rich set of Mac OS services available to application-level software, including the Macintosh Toolbox routines. Drivers do not have access to this set of services.
-
Code Fragment Manager (CFM):
The CFM is the part of Mac OS that loads code fragments into RAM and prepares them for execution. The CFM is described in
Inside Macintosh: PowerPC System Software.
-
Disk-based driver:
Disk-based drivers are drivers that are stored in the Mac OS file system, in the Extensions folder. Disk-based drivers are CFM fragments in files of type
'ndrv'
with an unknown creator. A disk-based driver may replace a ROM-based driver if it is a newer version. Disk-based drivers are not available during system startup, before the file system is working.
-
Expert:
The code that connects a class or family of devices to the operating system is called an
expert.
Low-level experts
and
family experts
are defined below.
-
Family:
A device family is a collection of devices that provide the same kind of I/O functionality. One example of a family is the set of Open Transport devices with their corresponding Open Transport Data Link Provider Interface (DLPI) drivers. Another example is the family of display devices.
-
Family expert:
A
family expert, or
high-level expert,
is the code responsible for locating, initializing, and monitoring all entries in the Name Registry that are associated with devices in its family or service type. Hence, a family expert is the device administrator for a family. Family experts run when devices are connected to the system (usually at system startup time), but they are not part of the primary data paths to the devices.
-
Family programming interface
(FPI):
An FPI is a set of services used between a family expert and the devices in the expert's family. For example, Open Transport exports the routine
freemsg
as part of its FPI. This routine returns a STREAMS buffer to the general memory pool maintained by the Open Transport subsystem. The
freemsg
call is not accessible to software outside the Open Transport family. Each FPI is supported by routines in a
family library.
-
Low-level expert:
Low-level experts are software utilities that install entries in the Name Registry for specific devices. Low-level experts may reside in system firmware, PCI card firmware, or Mac OS and may run at any time. A low-level expert's task is to install enough information in each Name Registry entry to permit device control and driver matching. The information must be presented to Registry clients in a generalized form, independent of hardware configuration. Primary clients of the Registry at present are run-time device drivers and family experts (defined below).
-
Name Registry:
The Name Registry is a high-level Mac OS service that stores the names and relations of hardware and software components in the system that is currently running. In the second generation of Power Macintosh, the Name Registry is used only for I/O device and driver information, serving as a rendezvous point between low-level or hardware-specific experts and family experts. The Registry supports both name entry management and information retrieval.
-
Physical device:
A physical device is a piece of hardware that performs an I/O function and is controlled by a device driver. An example of a physical device is a video graphics card.
-
Property:
Each piece of information associated with an entry in the Name Registry is called a
property. For example, a
driver-descriptor
property is associated in the Registry with each device that has a unique associated driver. It contains the driver description data structure described in
Native Driver Package.
-
ROM-based driver:
ROM-based drivers are FCode drivers that are stored in an expansion ROM. They are the only kind of drivers that are usable when the system is starting up and the file system is not yet available, as described in
PCI Open Firmware Drivers
Expansion ROMs may in addition to a basic FCode driver contain a native run-time driver for Mac OS, stored as a CFM fragment; run-time drivers are described in
Writing Native Drivers.
-
Scanning:
Scanning is the process of matching a device with its corresponding driver. Scanning to determine device location and driver selection is one of the topics discussed in this chapter.
-
Driver services:
The driver services are a set of services that Mac OS provides for drivers or other pieces of software that are installed and run in the operating system. For example,
QueueSecondaryInterruptHandler
is a driver services routine in Mac OS that defers interrupt processing. Application-level software does not generally have access to the driver services. For more information about the Macintosh driver services for PCI cards, see
Driver Services Library.
-
Virtual device:
A
virtual device is a piece of code that provides an I/O capability independently of specific hardware. An example of a virtual device is a RAM disk. A RAM disk performs disk drive functions but is actually just code that reads and writes data in the system's physical memory.
© 1999 Apple Computer, Inc. (Last Updated 26 March 99)