Interrupts and the Name Registry
Once the IST is constructed and initialized, drivers need a mechanism to find the IST member that represents the
interrupt source the driver is controlling. This is done through the Name Registry discussed in Chapter
10. As explained in
Initialization and Finalization Routines, a driver's initialization call contains a
RegEntryID
value that refers to the set of Name Registry properties for the device the driver controls. Besides the standard set of PCI properties, a number of Apple-specific properties are included, as shown in
Table 10-1. The Apple property used for interrupts is
driver-ist, which contains an array of interrupt sources logically associated with a device.
Each
driver-ist
property is stored as type
ISTProperty, which is an array of three
InterruptSetMember
values (see
Basic Data Types
), and conforms to the following rules:
-
The first
InterruptSetMember
value contains the interrupt member for the device's controller chip or hardware interrupt source--for example, a serial controller chip or a card in an expansion slot. This interrupt member must always be defined for hardware that is capable of requesting hardware interrupts.
-
If the device is capable of generating direct memory access (DMA) output interrupts, the second
InterruptSetMember
value contains the interrupt member for the interrupt source of the device's DMA output interrupts. Otherwise, it contains null values.
-
If the device is capable of generating DMA input interrupts, the third
InterruptSetMember
value contains the interrupt member for the interrupt source of the device's DMA input interrupts. Otherwise, it contains null values.
-
If the device generates both DMA input and output interrupts with the same interrupt source, the second
InterruptSetMember
value contains the interrupt member for both DMA input and output interrupts. In this case, the third
InterruptSetMember
contains null values.
Note that grouping these interrupt members in one
driver-ist
property is purely a logically grouping. Any one of the three interrupt members can be located anywhere within the IST hierarchy.
© 1999 Apple Computer, Inc. (Last Updated 26 March 99)