CDFS control blocks are used with most CDFS SWI Calls to identify the target drive. Control blocks are a five-word long, word-aligned data structure, and are typically constructed by zero-extending the fields contained in the compacted 32bit ‘physical drive number’ that is returned by CDFS_ConvertDriveToDevice.
Control Block | Physical Drive No. | Contents |
---|---|---|
Word 0 | Bits 0-2 | SCSI Device ( 0 – 7) |
Word 1 | Bits 3-4 | SCSI Card (0 – 3) |
Word 2 | Bits 5-7 | SCSI Logical Unit Number (0 – 7) |
Word 3 | Bits 8-15 | Driver handle (0-255) (see CD_Identify) |
Word 4 | Bits 16-31 | Reserved/extension field (0-65535) |
Although the CD driver stack uses SCSI device identifiers to identify drives, the identifiers may not correspond to ‘real’ SCSI devices that are known to the SCSI stack?. To send SCSI commands to drives, CD_SCSIUserOp should be used, rather than attempting to use SCSI_Op? directly.