IBM SCSI SCB Commands

Adapter-to-System Interface
   I/O Registers
   Command List
Send Other SCSI Command (1Fh)
Set Max LBA Command (1Ah)
Reference Material

Content by Louis Ohland and Tomáš Slavotínek.
Based the listed reference documents and reverse engineering.


Adapter-to-System Interface

I/O Registers

To the system, the adapter operates as a bus master. A set of eight I/O registers issues commands and receives status from the adapter. The addresses for these registers depend on the address range selected in POS Register 2.

Register Read/Write Offset
Command Interface Register 1 Read/Write 00
Command Interface Register 2 Read/Write 01
Command Interface Register 3 Read/Write 02
Command Interface Register 4 Read/Write 03
Attention Register Read/Write 04
Basic Control Register Read/Write 05
Interrupt Status Register Read 06
Basic Status Register Read 07

Note: The IBM SCSI controller's interface uses immediate commands and SCB commands. The register configuration is the same for both.

Note: The interface has some similarities with the IBM ESDI interface. See the ESDI Fixed Disk Drive Adapter/A Technical Reference for comparison.

Command List

The following is a list of supported commands ordered by the command code.

Cmd.
Code
(Hex)
Command Name Command
Type
Sup.
Devices
(Hex)
Reference
00 Reset Immediate 0-F SCSI w/C TR pp. 60
01 Read Data SCB 0-E SCSI w/C TR pp. 51
02 Write Data SCB 0-E SCSI w/C TR pp. 62
03 Read Verify SCB 0-E SCSI w/C TR pp. 54
04 Write with Verify SCB 0-E SCSI w/C TR pp. 63
05 Unknown/Reserved (was Seek for ESDI)
06 Unknown/Reserved (was Park Heads for ESDI)
07 Get Command Complete Status SCB 0-F SCSI w/C TR pp. 42
08 Request Sense SCB 0-E SCSI w/C TR pp. 56
09 Read Device Capacity SCB 0-E SCSI w/C TR pp. 52
0A Get POS Information SCB F SCSI w/C TR pp. 48
0B Device Inquiry SCB 0-E SCSI w/C TR pp. 36
0C Feature Control Immediate 0-F SCSI w/C TR pp. 38
0D DMA Pacing Control Immediate F SCSI w/C TR pp. 37
0E Assign Immediate F SCSI w/C TR pp. 35
0F Abort Immediate 0-F SCSI w/C TR pp. 34
10 Write Sector Buffer? (Int 13 AH=0F) SCB F? undocumented
11 Read Sector Buffer? (Int 13 AH=0E) SCB F? undocumented
12 Unknown (Int 13 AH=1C AL=17) Immediate F? undocumented
13-14 Unknown/Reserved
15 Unknown/Reserved (was Get Manufacturing Header for ESDI)
16 Format Unit SCB 0-E SCSI w/C TR pp. 39
17 Format Prepare Immediate 0-E SCSI w/C TR pp. 39
18 Reassign Block SCB 0-E SCSI w/C TR pp. 55
19 Unknown/Reserved
1A Set Max LBA SCB 0-E undocumented
1B-1E Unknown/Reserved
1F Send Other SCSI SCB 0-E SCSI w/C TR pp. 61
20-30 Unknown/Reserved
31 Read Prefetch SCB 0-E SCSI w/C TR pp. 53

Note: The host adapter is device number F hex, other devices are 0-E hex.

The commands can be submitted using the Int 4Bh func. 80h — IBM SCSI Services interface. Specifically subfunc. 04h — Send Device SCB and 05h — Send Device Immediate. See the BIOS Interface Technical Reference for details (pp. 157 onwards).


Send Other SCSI Command (1Fh)

This SCB command is used to send any SCSI command (SCSI CDB) not supported by the adapter directly to a SCSI device. The command to be issued is placed at the end of the SCB. When commands are issued directly to a device using this command, messages are handled by the adapter. Data transfer direction is controlled by the read-option bit (RD) in the Enable word. When this bit is set to 1, the adapter transfers data to the system from the device. When the read-option bit is set to 0, the adapter transfers data to the device from the system. If the system-buffer byte count specified in the SCB is 0, no data is transferred. Because device data can be altered by this command, the cache is automatically cleared of any data from that device.

    15 14 13 12 11 10  9  8  7  6  5  4  3  2  1  0  Remarks

00:  0  0  1  0  0  1  0  0 ND NS  0  1  1  1  1  1  Send Other SCSI Command
02: RD ES RE PT  0 SS  1  0  0  0  0  0  0  0  0 CH  Enable Word
04:  <----- Reserved -----> <-- SCSI CMD Length -->
06:  <---------- Reserved ------------------------>
08:  <---------- Least Significant Word ---------->  System Buffer
0A:  <---------- Most Significant Word ----------->    Address
0C:  <---------- Reserved ------------------------>  System Buffer
0E:  <---------- Reserved ------------------------>    Byte Count
10:  <---------- Least Significant Word ---------->  Termination Status Block
12:  <---------- Most Significant Word ----------->    Address
14:  <---------- Least Significant Word ---------->  Optional SCB Chain
16:  <---------- Most Significant Word ----------->    Address
18:  <------ 1 ------ SCSI Command ------ 0 ------>  SCSI Command
1A:  <------ 3 ------ SCSI Command ------ 2 ------>
1C:  <------ 5 ------ SCSI Command ------ 4 ------>    6 Bytes or
1E:  <------ 7 ------ SCSI Command ------ 6 ------>
20:  <------ 9 ------ SCSI Command ------ 8 ------>    10 Bytes or
22:  <----- 11 ------ SCSI Command ----- 10 ------>    12 Bytes

Notes:

  1. This command should be used only when other commands cannot perform the operation; otherwise, performance of the SCSI subsystem can be impacted.
  2. This command should be issued only to logical device numbers 0 to 14 (0-E hex).

See the SCSI Commands Reference Manual for information about standard SCSI commands.

This command is used by the POST code (late IML and all SurePath systems) to obtain the total device capacity, etc.


Set Max LBA Command (1Ah)

The Set Max LBA SCB is an undocumented command for the IBM SCSI Adapter. Any SCB issued requesting an I/O to the DASD at an address over the set limit will not be processed by the SCSI adapter.

    15 14 13 12 11 10  9  8  7  6  5  4  3  2  1  0  Remarks

00:  0  0  0  1  1  1  0  0 ND NS  0  1  1  0  1  0  Set Max LBA
02:  0 ES RE  0  0  0  1  0  0  0  0  0  0  0  0 CH  Enable Word
04:  <---------- Least Significant Word ---------->  Logical Block
06:  <---------- Most Significant Word ----------->    Address
08:  <---------- Reserved ------------------------>
0A:  <---------- Reserved ------------------------>
0C:  <---------- Reserved ------------------------>
0E:  <---------- Reserved ------------------------>
10:  <---------- Least Significant Word ---------->  Termination Status Block
12:  <---------- Most Significant Word ----------->    Address
14:  <---------- Least Significant Word ---------->  Optional SCB Chain
16:  <---------- Most Significant Word ----------->    Address
18:  <---------- Reserved ------------------------>
1A:  <---------- Reserved ------------------------>

Note: Details about the Set Max LBA block were retrieved via reverse engineering and as such may be incomplete.

This command is used by the POST code (later IML and all SurePath machines) to manipulate the reference partition "fencing". See US5651139A for additional information.


Reference Material

Content created and/or collected by:
Louis Ohland, Peter Wendt, David Beem, William Walsh, Tatsuo Sunagawa, Jim Shorney, Tim Clarke, Kevin Bowling, Tomáš Slavotínek, and many others.

Ardent Tool of Capitalism - MAD Edition! is maintained by Tomáš Slavotínek.
Last update: 26 Jan 2023 - Changelog | Legal Info & Contact