Previous Book Contents Book Index Next

Inside Macintosh: Devices /
Chapter 4 - SCSI Manager 4.3 / SCSI Manager 4.3 Reference
SCSI Manager 4.3 Functions / SIM Support Functions


You use the SCSIRegisterBus function to register a SIM and HBA for use with the XPT.

OSErr SCSIRegisterBus(SIMInitInfo *SIMinfoPtr);
A pointer to a SIM initialization record, which is described on page 4-36.
<--SIMstaticPtrUInt8 *A pointer to the allocated static storage.
-->staticSizeSInt32The amount of memory requested for static storage.
-->SIMInitSIMInitProcA pointer to the SIMInit function.
-->SIMActionSIMActionProcA pointer to the SIMAction function.
-->SIMInterruptPollInterruptPollProcA pointer to the SIMInterruptPoll function.
-->NewOldCallSIMActionProcA pointer to the NewOldCall function.
-->ioPBSizeUInt16The SCSI I/O parameter block size for this SIM.
-->oldCallCapableBooleanSet to true if the SIM emulates original SCSI Manager functions.
<--EnteringSIMSCSIProcA pointer to the EnteringSIM function.
<--ExitingSIMSCSIProcA pointer to the ExitingSIM function.
<--MakeCallbackMakeCallbackProcA pointer to the MakeCallback function.
<--busIDUInt16The bus number assigned to this SIM/HBA.

You use the SIM initialization record to specify the characteristics of the HBA, the SIM's function entry points, and the number of bytes required for static data storage (global variables). The XPT returns a pointer to the allocated storage and a bus number that identifies the bus in all future transactions. In addition, the XPT returns pointers to the EnteringSIM, ExitingSIM, and MakeCallback functions.

Before assigning a bus number, the XPT calls the SIM's SIMInit function, which instructs the SIM to initialize itself. If the SIMInit function returns noErr, the XPT assigns a bus number and returns from the SCSIRegisterBus function. At this point the SIM is installed and should be ready to accept requests.

The SCSIRegisterBus function may move memory; you should not call it at interrupt time.

noErr0No error
scsiTooManyBuses-7888SIM registration failed because the XPT registry is full
See "Writing a SCSI Interface Module," beginning on page 4-15, for more information about using this function.

Previous Book Contents Book Index Next

© Apple Computer, Inc.
3 JUL 1996