Important: The information in this document is obsolete and should not be used for new development.
SCSIRegisterBus
You use theSCSIRegisterBusfunction to register a SIM and HBA for use with the XPT.
OSErr SCSIRegisterBus(SIMInitInfo *SIMinfoPtr);
SIMinfoPtr- A pointer to a SIM initialization record, which is described on page 4-36.
 
<-- SIMstaticPtr UInt8 * A pointer to the allocated static storage. --> staticSize SInt32 The amount of memory requested for static storage. --> SIMInit SIMInitProc A pointer to the SIMInitfunction.--> SIMAction SIMActionProc A pointer to the SIMActionfunction.--> SIMInterruptPoll InterruptPollProc A pointer to the SIMInterruptPollfunction.--> NewOldCall SIMActionProc A pointer to the NewOldCallfunction.--> ioPBSize UInt16 The SCSI I/O parameter block size for this SIM. --> oldCallCapable Boolean Set to trueif the SIM emulates original SCSI Manager functions.<-- EnteringSIM SCSIProc A pointer to the EnteringSIMfunction.<-- ExitingSIM SCSIProc A pointer to the ExitingSIMfunction.<-- MakeCallback MakeCallbackProc A pointer to the MakeCallbackfunction.<-- busID UInt16 The bus number assigned to this SIM/HBA. DESCRIPTION
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 theEnteringSIM,ExitingSIM, andMakeCallbackfunctions.Before assigning a bus number, the XPT calls the SIM's
SIMInitfunction, which instructs the SIM to initialize itself. If theSIMInitfunction returnsnoErr, the XPT assigns a bus number and returns from theSCSIRegisterBusfunction. At this point the SIM is installed and should be ready to accept requests.SPECIAL CONSIDERATIONS
TheSCSIRegisterBusfunction may move memory; you should not call it at interrupt time.RESULT CODES
noErr 0 No error scsiTooManyBuses -7888 SIM registration failed because the XPT registry is full SEE ALSO
See "Writing a SCSI Interface Module," beginning on page 4-15, for more information about using this function.