home *** CD-ROM | disk | FTP | other *** search
- /*
- File: SCSIPlugin.h
-
- Contains: Family defined Plugin exports and data structures
-
- Version: Technology: xxx put the technology version here xxx
- Release: Universal Interfaces 3.0d3 on Copland DR1
-
- Copyright: © 1984-1996 by Apple Computer, Inc. All rights reserved.
-
- Bugs?: If you find a problem with this file, send the file and version
- information (from above) and the problem description to:
-
- Internet: apple.bugs@applelink.apple.com
- AppleLink: APPLE.BUGS
-
- */
- #ifndef __SCSIPLUGIN__
- #define __SCSIPLUGIN__
-
- #ifndef __TYPES__
- #include <Types.h>
- #endif
- #ifndef __KERNEL__
- #include <Kernel.h>
- #endif
- #ifndef __SCSI__
- #include <SCSI.h>
- #endif
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- #if PRAGMA_IMPORT_SUPPORTED
- #pragma import on
- #endif
-
- #if PRAGMA_ALIGN_SUPPORTED
- #pragma options align=power
- /* the following contents can only be used by compilers that support PowerPC struct alignment */
-
- #if FOR_SYSTEM8_PREEMPTIVE
- /*
- ************************************************************************
- Define entries to SIM routines
- ************************************************************************
- SIMInitInfo PB
- directions are for SCSIPluginInit call ( -> parm, <- result) *|
- need to change this to PluginControlBlock •••
- */
- typedef struct PluginControlBlock PluginControlBlock;
- struct PluginControlBlock {
- UInt16 ioPBSize; /* <- size of SCSI_IO_PBs required for this SIM */
- UInt16 oldCallCapable; /* <- true if this SIM can handle old-API calls */
- UInt16 busID; /* <- bus number for the registered bus */
- UInt8 simSlotNumber; /* <- Magic cookie to place in scsiHBASlotNumber (PCI) */
- UInt8 simSRsrcID; /* <- Magic cookie to place in scsiSIMsRsrcID (PCI) */
- Ptr simRegEntry; /* -> The SIM's RegEntryIDPtr (PCI) */
- UInt32 maxTargetID; /* <- max Target ID of this bus*/
- UInt32 initiatorID; /* <- comes from the NVRAM */
- UInt32 scsiTimeout; /* <- bus time out period*/
- UInt32 scsiFlagsSupported; /* <- scsiFlags supported by this SIM*/
- SInt16 scsiSelectTimeout; /* <- selection time out period*/
- UInt16 scsiIOFlagsSupported; /* <- scsiIOFlags supported by this SIM*/
- UInt32 scsiDataTypes; /* <- scsiDataType supported by this SIM*/
-
- /* ••• need to remove the following declares ASAP plugin is ready*/
- /* SCSIPluginActionEntry scsiPluginAction; // address of SIM action routine*/
- /* SCSIPluginHandleBusEventEntry scsiPluginHandleBusEvent;*/
- /* SCSIPluginInitEntry scsiPluginInit;*/
- };
-
- /* Define SIM calls passed into the family at initialize time*/
- typedef void (*SCSIPluginActionEntry)(SCSI_PB *scsiPB);
- typedef void (*SCSIPluginHandleBusEventEntry)(void *busEvent);
- typedef OSStatus (*SCSIPluginInitEntry)(PluginControlBlock *pcb);
-
- enum {
- kSCSIPluginVersion = 0x02019600 /* date and version ••• temporary*/
- };
-
- struct SCSIPluginInfo {
- UInt32 version;
- UInt32 reserved1;
- UInt32 reserved2;
- UInt32 reserved3;
- };
- typedef struct SCSIPluginInfo SCSIPluginInfo;
-
- /* plugin needs to export this structure*/
- struct SCSIPluginDispatchTable {
- SCSIPluginInfo header;
- SCSIPluginActionEntry scsiPluginAction; /* address of SIM action routine*/
- SCSIPluginHandleBusEventEntry scsiPluginHandleBusEvent;
- SCSIPluginInitEntry scsiPluginInit;
- };
- typedef struct SCSIPluginDispatchTable SCSIPluginDispatchTable;
-
- extern void SCSIPluginAction(SCSI_PB *scsiPB);
-
- extern void SCSIPluginHandleBusEvent(void *busEvent);
-
- extern OSStatus SCSIPluginInit(PluginControlBlock *pcb);
-
- extern void SCSIFamMakeCallback(SCSI_PB *req);
-
- extern OSStatus SCSIFamBusEventForSIM(UInt32 busID, void *busEvent);
-
- #endif
-
- #pragma options align=reset
- #endif /* PRAGMA_ALIGN_SUPPORTED */
-
- #if PRAGMA_IMPORT_SUPPORTED
- #pragma import off
- #endif
-
- #ifdef __cplusplus
- }
- #endif
-
- #endif /* __SCSIPLUGIN__ */
-
-