Important: The information in this document is obsolete and should not be used for new development.
SCSIRegisterBus
You use theSCSIRegisterBus
function 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 SIMInit
function.--> SIMAction SIMActionProc A pointer to the SIMAction
function.--> SIMInterruptPoll InterruptPollProc A pointer to the SIMInterruptPoll
function.--> NewOldCall SIMActionProc A pointer to the NewOldCall
function.--> ioPBSize UInt16 The SCSI I/O parameter block size for this SIM. --> oldCallCapable Boolean Set to true
if the SIM emulates original SCSI Manager functions.<-- EnteringSIM SCSIProc A pointer to the EnteringSIM
function.<-- ExitingSIM SCSIProc A pointer to the ExitingSIM
function.<-- MakeCallback MakeCallbackProc A pointer to the MakeCallback
function.<-- 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
, andMakeCallback
functions.Before assigning a bus number, the XPT calls the SIM's
SIMInit
function, which instructs the SIM to initialize itself. If theSIMInit
function returnsnoErr
, the XPT assigns a bus number and returns from theSCSIRegisterBus
function. At this point the SIM is installed and should be ready to accept requests.SPECIAL CONSIDERATIONS
TheSCSIRegisterBus
function 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.