DASD Subsystem

Document Revision: 26h1.0
Source: arch/s390x/init/zxfl/common/dasd_*.c


1. Overview

ZXFL supports three DASD device types. The correct driver is selected automatically by probing the IPL device with Sense ID and Read Device Characteristics (RDC) CCWs.

TypeDriverTypical device
ECKDdasd_eckd.c3390 (most common)
FBAdasd_fba.c9336
Tapedasd_tape.c3480, 3490, 3590

2. Low-Level I/O (dasd_io.c)

All device access goes through a single CCW submission layer:

dasd_do_io(schid, ccw_chain, sense_buf)
  │
  ├─ Build ORB pointing to ccw_chain
  ├─ SSCH(schid, ORB)
  ├─ Wait for I/O interrupt (disabled-wait loop on TSCH)
  ├─ TSCH(schid, IRB) → check device end status
  └─ Return status or panic on unrecoverable error

All CCW data buffers are static BSS arrays, ensuring they reside below 0x80000000 (31-bit CDA constraint).


3. ECKD Driver (dasd_eckd.c)

ECKD (Extended Count Key Data) is the standard format for IBM 3390 DASD. Addressing is by cylinder, head, and record number (C/H/R).

Key operations:

OperationCCW commandDescription
Sense ID0xE4Identify device type and model
Read Device Characteristics0x64Obtain geometry (cylinders, heads, sectors)
Seek0x07Position to cylinder/head
Search ID Equal0x31Find record by C/H/R
Read Count Key Data0x86Read a full record

Track reads use a Seek → Search → Read CCW chain. The search CCW loops (via TIC — Transfer in Channel) until the target record is found.


4. FBA Driver (dasd_fba.c)

FBA (Fixed Block Architecture) devices use linear block addressing. Each block is 512 bytes.

Key operations:

OperationCCW commandDescription
Sense ID0xE4Identify device
Define Extent0x63Set the block range for the following operation
Locate Record0x43Specify starting block and count
Read0x42Transfer data

5. Tape Driver (dasd_tape.c)

Tape support is provided for environments where the kernel is stored on a 3480/3490/3590 tape cartridge. Tape is read sequentially; there is no random access.

Key operations: Sense ID, Rewind, Read Block, Forward Space File.


6. Device Selection

At Stage 1 startup, probe_ipl_device() issues a Sense ID CCW to the IPL subchannel. The returned device type code selects the driver:

device_type == 0x3390  →  ECKD
device_type == 0x9336  →  FBA
device_type == 0x3480
              0x3490
              0x3590   →  Tape
otherwise              →  panic("unsupported IPL device")