Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Devices /
Chapter 2 - Slot Manager


About the Slot Manager

The Slot Manager provides three basic services:

There are two variations of the System 7 Slot Manager: version 1 and version 2. Version 1 of the Slot Manager is RAM based and is installed by the user with the System 7 upgrade kit. Version 2 is included in the ROM of newer Macintosh computers.

At startup, the version of the Slot Manager in ROM searches each slot for a declaration ROM and creates a slot information record for each slot. See "Slot Information Record" on page 2-24 for the definition of the SInfoRecord data type.

As the Slot Manager searches the slots, it identifies all of the sResources in each declaration ROM and creates a table--the slot resource table (SRT)--that lists all of the sResources currently available to the system. The slot resource table is a private data structure maintained by the Slot Manager. Applications and device drivers use Slot Manager routines to get information from the slot resource table.

After building the slot resource table, the Slot Manager initializes the 6 bytes reserved for each slot in parameter RAM. If the slot has an expansion card with a PRAMInitData entry in its board sResource, the Slot Manager uses the values in that entry to initialize the parameter RAM; otherwise, it clears those bytes in parameter RAM.

Next, the Slot Manager disables interrupts and executes the code in the PrimaryInit entry of the board sResource for each card. Note that at this point in the startup, the keyboard and the mouse are not initialized and that a card's PrimaryInit code has only limited control over the functionality of the card itself.

If certain values (defined by the Start Manager) are set in a card's parameter RAM, a card with an sRsrcBootRec entry may take over the system startup process. The Start Manager passes control to the code in the sRsrcBootRec early in the startup sequence, before system patches are installed. Refer to the chapter "Start Manager" in Inside Macintosh: Operating System Utilities for more information about the startup process.

Designing Cards and Drivers for the Macintosh Family, third edition, describes the PRAMInitData, PrimaryInit, and sRsrcBootRec entry types.

If no card takes over, the normal system startup continues. After version 1 of the Slot Manager is loaded, it conducts a second search for declaration ROMs, this time in 32-bit mode. If the Slot Manager finds any additional NuBus cards, it adds their sResources to the slot resource table and executes the code in their PrimaryInit entries. (Version 2 of the Slot Manager, which resides in ROM, does not need to conduct a second search.)

Note
Some versions of the Slot Manager prior to System 7 address NuBus cards in 24-bit mode and may not be able to identify all cards. After version 1 of the Slot Manager is loaded, it locates these cards.
After all system patches have been installed, version 1 or later of the Slot Manager executes the code in any SecondaryInit entries it finds in the declaration ROMs. It does not reexecute the code from PrimaryInit entries, reinitialize parameter RAM, or restore any sResources deleted by the PrimaryInit code.

Note
Most versions of the Slot Manager prior to System 7 do not execute code from SecondaryInit entries.
After the Slot Manager executes SecondaryInit code, it searches for sResources that have an sRsrcFlags entry with the fOpenAtStart flag set. When the Slot Manager finds an sResource with this flag set, it loads the device driver from the sRsrcDrvrDir entry of the sResource, or calls the code in the sResource's sRsrcLoadRec entry, which loads the sResource's device driver.

Finally, the system executes initialization resources of type 'INIT'.

See Designing Cards and Drivers for the Macintosh Family, third edition, for details about the sRsrcFlags, sRsrcDrvrDir, and sRsrcLoadRec entry types.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
3 JUL 1996