ZXFoundation™ 26h2
Loading...
Searching...
No Matches
arch.s390x.io.types Module Reference

Data Structures

struct  arch::s390x::io::ccw1
 Format-1 CCW: 8 bytes, big-endian, used with Format-1 ORB. More...
struct  arch::s390x::io::irb
 Interruption Response Block — output of TSCH instruction. Layout: SCSW(12) + ESW(20) + ECW(32) + EMW(32) = 96 bytes. More...
struct  arch::s390x::io::orb
 Operation Request Block — input to SSCH instruction. More...
struct  arch::s390x::io::pmcw
 Path Management Control Word — subchannel configuration. More...
struct  arch::s390x::io::schib
 Subchannel Information Block — returned by STSCH, input to MSCH. More...
struct  arch::s390x::io::scsw
 Subchannel Status Word — packed status from TSCH. More...
struct  arch::s390x::io::senseid_data
 Sense ID response data returned by CCW_CMD_SENSE_ID. More...
struct  arch::s390x::io::subchannel_id
 Subsystem-Identification Word (SID) for I/O instructions. More...

Functions

constexpr auto actl () const noexcept -> u8
 Extract activity control field (PoP bits 20-26 of word 0). AC bits: 20=Resume, 21=Start, 22=Halt, 23=Clear, 24=SchActive, 25=DevActive, 26=Suspended.
constexpr auto fctl () const noexcept -> u8
 Extract function control field (PoP bits 17-19 of word 0). FC bits: 17=Start, 18=Halt, 19=Clear.
static constexpr auto from_parts (u8 cssid, u8 ssid, u16 sch_no) noexcept -> subchannel_id
 Construct from SSID and subchannel number.
constexpr auto has_channel_end () const noexcept -> bool
 True if channel-end (CE) bit is set in device status.
constexpr auto has_device_end () const noexcept -> bool
 True if device-end (DE) bit is set in device status.
constexpr auto has_error () const noexcept -> bool
 True if any error condition is indicated.
constexpr auto is_alert () const noexcept -> bool
 True if alert status (unsolicited primary without secondary).
constexpr auto is_enabled () const noexcept -> bool
 True if subchannel is enabled (E bit — bit 7 of flags).
constexpr auto is_multipath () const noexcept -> bool
 True if multipath mode is active (M bit — bit 5 of flags).
constexpr auto is_primary () const noexcept -> bool
 True if primary status is indicated.
constexpr auto is_secondary () const noexcept -> bool
 True if secondary status is indicated.
constexpr auto is_solicited () const noexcept -> bool
 True if status is solicited (primary status pending).
constexpr auto isc () const noexcept -> u8
 Extract ISC (I/O interruption subclass code, bits 2-4 of word 1). In the u16 flags field on big-endian: positions 13-11.
constexpr auto sch_no () const noexcept -> u16
 Extract subchannel number (bits 48-63 → u32 positions 15-0).
constexpr auto set_cpa (u32 addr) noexcept -> void
 Set the Channel Program Address (word 2, 31-bit physical).
constexpr auto set_format1 () noexcept -> void
 Set Format-1 CCW bit (bit 8 of word 1).
constexpr auto set_key (u8 key) noexcept -> void
 Set the storage key in bits 0-3 of word 1.
constexpr auto set_lpm (u8 lpm) noexcept -> void
 Set the Logical Path Mask (bits 16-23 of word 1).
constexpr auto ssid () const noexcept -> u8
 Extract subchannel set ID (bits 45-46 → u32 positions 18-17).
constexpr auto stctl () const noexcept -> u8
 Extract status control field (PoP bits 27-31 of word 0). SC bits: 27=Alert, 28=Intermediate, 29=Primary, 30=Secondary, 31=StatusPending.
constexpr auto to_raw () const noexcept -> u32
 Return raw 32-bit value for use in I/O instructions.

Variables

u32 _pad {0}
 Padding to 52 bytes.
u32 _reserved {0}
 Reserved.
u8 _reserved {0}
 Reserved (0xFF when valid).
u32 _reserved3 {0}
 Word 3: CSS priority (reserved for us).
u32 _reserved4 {0}
 Word 4.
u32 _reserved5 {0}
 Word 5.
u32 _reserved6 {0}
 Word 6.
u32 _reserved7 {0}
 Word 7.
constexpr u8 arch::s390x::io::ACTL_CLEAR_PEND = 0x08
 Clear pending (PoP bit 23).
constexpr u8 arch::s390x::io::ACTL_DEV_ACTIVE = 0x02
 Device active (PoP bit 25).
constexpr u8 arch::s390x::io::ACTL_HALT_PEND = 0x10
 Halt pending (PoP bit 22).
constexpr u8 arch::s390x::io::ACTL_RESUME_PEND = 0x40
 Resume pending (PoP bit 20).
constexpr u8 arch::s390x::io::ACTL_SCH_ACTIVE = 0x04
 Subchannel active (PoP bit 24).
constexpr u8 arch::s390x::io::ACTL_START_PEND = 0x20
 Start pending (PoP bit 21).
constexpr u8 arch::s390x::io::ACTL_SUSPENDED = 0x01
 Suspended (PoP bit 26).
u32 ccw_addr {0}
 Word 1: CCW address.
constexpr u8 arch::s390x::io::CCW_CMD_BASIC_SENSE = 0x04
 Basic sense.
constexpr u8 arch::s390x::io::CCW_CMD_CONTROL = 0x03
 Control.
constexpr u8 arch::s390x::io::CCW_CMD_NOP = 0x03
 No operation.
constexpr u8 arch::s390x::io::CCW_CMD_READ = 0x02
 Read.
constexpr u8 arch::s390x::io::CCW_CMD_SENSE_ID = 0xE4
 Sense ID.
constexpr u8 arch::s390x::io::CCW_CMD_TIC = 0x08
 Transfer in channel.
constexpr u8 arch::s390x::io::CCW_CMD_WRITE = 0x01
 Write.
constexpr u8 arch::s390x::io::CCW_FLAG_CC = 0x40
 Command chaining (PoP bit 9).
constexpr u8 arch::s390x::io::CCW_FLAG_CD = 0x80
 Chain data (PoP bit 8).
constexpr u8 arch::s390x::io::CCW_FLAG_IDA = 0x04
 Indirect data addressing (PoP bit 13).
constexpr u8 arch::s390x::io::CCW_FLAG_MIDA = 0x01
 Modified IDA (PoP bit 15).
constexpr u8 arch::s390x::io::CCW_FLAG_PCI = 0x08
 Program-controlled interruption (PoP bit 12).
constexpr u8 arch::s390x::io::CCW_FLAG_SKIP = 0x10
 Skip data transfer (PoP bit 11).
constexpr u8 arch::s390x::io::CCW_FLAG_SLI = 0x20
 Suppress length indication (PoP bit 10).
constexpr u8 arch::s390x::io::CCW_FLAG_SUSPEND = 0x02
 Suspend channel program (PoP bit 14).
u8 chpid [8] {}
 Channel path identifiers (one per path).
u8 cmd {}
 Byte 0: Command code.
u16 count {}
 Bytes 2-3: Byte count.
u16 count {0}
 Word 2 bits 16-31: Residual byte count.
u32 cpa {0}
 Word 2: Channel Program Address (31-bit).
u32 ctrl {0}
 Word 1: Key + control flags + LPM + ILS.
u8 cu_model {0}
 Control unit model.
u16 cu_type {0}
 Control unit type.
u32 data_addr {}
 Bytes 4-7: Data address (31-bit, bit 0 must be zero).
u8 dev_model {0}
 Device model.
constexpr u8 arch::s390x::io::DEV_STAT_ATTN = 0x80
 Attention.
constexpr u8 arch::s390x::io::DEV_STAT_BUSY = 0x10
 Busy.
constexpr u8 arch::s390x::io::DEV_STAT_CE = 0x08
 Channel end.
constexpr u8 arch::s390x::io::DEV_STAT_CUE = 0x20
 Control unit end.
constexpr u8 arch::s390x::io::DEV_STAT_DE = 0x04
 Device end.
constexpr u8 arch::s390x::io::DEV_STAT_MOD = 0x40
 Status modifier.
constexpr u8 arch::s390x::io::DEV_STAT_UC = 0x02
 Unit check.
constexpr u8 arch::s390x::io::DEV_STAT_UX = 0x01
 Unit exception.
u8 dev_status {0}
 Word 2 bits 0-7: Device status byte.
u16 dev_type {0}
 Device type.
u16 devno {0}
 Device number.
u32 ecw [8] {}
 Extended Control Word — device sense data (32 bytes).
u32 emw [8] {}
 Extended Measurement Word (32 bytes).
u32 esw [5] {}
 Extended Status Word (20 bytes) — PoP §14.3.5.
constexpr u8 arch::s390x::io::FCTL_CLEAR = 0x1
 Clear function (PoP bit 19).
constexpr u8 arch::s390x::io::FCTL_HALT = 0x2
 Halt function (PoP bit 18).
constexpr u8 arch::s390x::io::FCTL_START = 0x4
 Start function (PoP bit 17).
u8 flags {}
 Byte 1: Flag byte (CD, CC, SLI, SKIP, PCI, IDA, S, MIDA).
u16 flags {0}
 Control flags (E, LM, MM, D, T, V, ISC, etc.).
u32 flags {0}
 Word 0: key(4), control bits, FC(3), AC(7), SC(5).
u32 intparm {0}
 Word 0: Interruption parameter.
u32 intparm {0}
 Interruption parameter.
u8 lpm {0}
 Logical path mask.
u8 lpum {0}
 Last path used mask.
constexpr u16 arch::s390x::io::MAX_SCHID = 0xFFFF
 Maximum valid subchannel number (0-based).
constexpr u32 arch::s390x::io::MAX_SUBCHANNELS = 65536
 Maximum number of subchannels in the subchannel number space.
u64 mba {0}
 Measurement block address.
u16 mbi {0}
 Measurement block index.
u8 pam {0}
 Path available mask.
u8 pim {0}
 Path installed mask.
pmcw pmcw_data {}
 Path Management Control Word.
u8 pnom {0}
 Path not operational mask.
u8 pom {0}
 Path operational mask.
constexpr u8 arch::s390x::io::SCH_STAT_CC = 0x01
 Chaining check.
constexpr u8 arch::s390x::io::SCH_STAT_CHC = 0x04
 Channel control check.
constexpr u8 arch::s390x::io::SCH_STAT_CHD = 0x08
 Channel data check.
constexpr u8 arch::s390x::io::SCH_STAT_ICC = 0x02
 Interface control check.
constexpr u8 arch::s390x::io::SCH_STAT_INCL = 0x40
 Incorrect length.
constexpr u8 arch::s390x::io::SCH_STAT_PCI = 0x80
 Program-controlled interruption.
constexpr u8 arch::s390x::io::SCH_STAT_PROG = 0x20
 Program check.
constexpr u8 arch::s390x::io::SCH_STAT_PROT = 0x10
 Protection check.
u8 sch_status {0}
 Word 2 bits 8-15: Subchannel status byte.
scsw scsw_data {}
 Subchannel Status Word (12 bytes).
scsw scsw_data {}
 Subchannel Status Word.
constexpr u8 arch::s390x::io::STCTL_ALERT = 0x10
 Alert status (PoP bit 27).
constexpr u8 arch::s390x::io::STCTL_INTERMEDIATE = 0x08
 Intermediate status (PoP bit 28).
constexpr u8 arch::s390x::io::STCTL_PRIMARY = 0x04
 Primary status (PoP bit 29).
constexpr u8 arch::s390x::io::STCTL_SECONDARY = 0x02
 Secondary status (PoP bit 30).
constexpr u8 arch::s390x::io::STCTL_STATUS_PEND = 0x01
 Status pending (PoP bit 31).
u32 val {0}

Files

file  arch/s390x/io/types.cxxm