ZXFoundation™ 26h2
Loading...
Searching...
No Matches
devmatch.cxxm File Reference

z/Architecture CCW device identification database. More...

import std;
import zxfoundation.base.types;
Include dependency graph for devmatch.cxxm:

Data Structures

struct  arch::s390x::css::devmatch::detail::dev_entry
 Single entry in the device-type or control-unit-type table. More...
struct  arch::s390x::css::devmatch::match_result
 Result of a device lookup. More...

Enumerations

enum class  arch::s390x::css::devmatch::detail::dev_class : u8 {
  console , display , dasd_eckd , dasd_fba ,
  tape , printer , reader , punch ,
  network , crypto , ctc , virtio ,
  unknown
}
 Device class — broad categorization for policy/driver binding. More...

Functions

constexpr auto arch::s390x::css::devmatch::class_name (dev_class cls) noexcept -> std::string_view
 Get a human-readable name for a device class.
constexpr auto arch::s390x::css::devmatch::cu_class_of (u16 cu_type) noexcept -> dev_class
 Get the device class for a control-unit type.
constexpr auto arch::s390x::css::devmatch::device_class_of (u16 dev_type) noexcept -> dev_class
 Get the device class for a device type.
constexpr auto arch::s390x::css::devmatch::lookup_cu (u16 cu_type) noexcept -> std::string_view
 Look up a control-unit type by its IBM 4-digit code.
constexpr auto arch::s390x::css::devmatch::lookup_device (u16 dev_type) noexcept -> std::string_view
 Look up a device type by its IBM 4-digit code.
constexpr auto arch::s390x::css::devmatch::match (u16 dev_type, u16 cu_type) noexcept -> match_result
 Combined lookup: match both device type and control-unit type.

Variables

constexpr std::string_view arch::s390x::css::devmatch::detail::class_names []
constexpr dev_entry arch::s390x::css::devmatch::detail::cu_types []
constexpr dev_entry arch::s390x::css::devmatch::detail::device_types []
constexpr u32 arch::s390x::css::devmatch::detail::NUM_CU_TYPES
constexpr u32 arch::s390x::css::devmatch::detail::NUM_DEVICE_TYPES

Detailed Description

z/Architecture CCW device identification database.

SPDX-License-Identifier: Apache-2.0

Enumeration Type Documentation

◆ dev_class

Device class — broad categorization for policy/driver binding.

Enumerator
console 

Line-mode console (3215).

display 

Block-mode display terminal (3270 family).

dasd_eckd 

Count-Key-Data DASD (3380, 3390).

dasd_fba 

Fixed-Block-Architecture DASD (9336, 0671).

tape 

Magnetic tape (3480, 3490, 3590).

printer 

Impact/laser printer.

reader 

Card reader.

punch 

Card punch.

network 

OSA-Express / HiperSockets / CTC.

crypto 

Crypto Express adapter.

ctc 

Channel-to-channel.

virtio 

virtio-ccw (KVM/QEMU)

unknown 

Unrecognised.

Function Documentation

◆ lookup_cu()

auto arch::s390x::css::devmatch::lookup_cu ( u16 cu_type) ->std::string_view
nodiscardconstexprexportnoexcept

Look up a control-unit type by its IBM 4-digit code.

Returns
CU name string, or nullptr if unknown.

◆ lookup_device()

auto arch::s390x::css::devmatch::lookup_device ( u16 dev_type) ->std::string_view
nodiscardconstexprexportnoexcept

Look up a device type by its IBM 4-digit code.

Returns
Device name string, or nullptr if unknown.

Variable Documentation

◆ class_names

std::string_view arch::s390x::css::devmatch::detail::class_names[]
inlineconstexpr
Initial value:
{
"console",
"display",
"dasd-eckd",
"dasd-fba",
"tape",
"printer",
"reader",
"punch",
"network",
"crypto",
"ctc",
"virtio",
"unknown",
}

◆ cu_types

dev_entry arch::s390x::css::devmatch::detail::cu_types[]
inlineconstexpr
Initial value:
{
{ 0x1750, dev_class::dasd_eckd, "DS8000 storage ctrl" },
{ 0x2105, dev_class::dasd_eckd, "2105 ESS storage ctrl" },
{ 0x2107, dev_class::dasd_eckd, "2107 ESS storage ctrl" },
{ 0x3880, dev_class::dasd_eckd, "3880 storage ctrl" },
{ 0x3990, dev_class::dasd_eckd, "3990 storage ctrl" },
{ 0x6310, dev_class::dasd_fba, "6310 FBA ctrl" },
{ 0x9343, dev_class::dasd_fba, "9343 FBA ctrl" },
{ 0x3174, dev_class::display, "3174 terminal ctrl" },
{ 0x3274, dev_class::display, "3274 terminal ctrl" },
{ 0x3215, dev_class::console, "3215 console ctrl" },
{ 0x3480, dev_class::tape, "3480 tape ctrl" },
{ 0x3490, dev_class::tape, "3490 tape ctrl" },
{ 0x3590, dev_class::tape, "3590 tape ctrl" },
{ 0x3088, dev_class::ctc, "3088 CTC ctrl" },
{ 0x1731, dev_class::network, "OSA-Express ctrl" },
{ 0x1732, dev_class::network, "OSA-Express data ctrl" },
{ 0x2104, dev_class::crypto, "Crypto Express EP11 ctrl" },
{ 0x2105, dev_class::crypto, "Crypto Express CCA ctrl" },
{ 0x3832, dev_class::virtio, "virtio-ccw ctrl" },
}
@ dasd_eckd
Count-Key-Data DASD (3380, 3390).
Definition devmatch.cxxm:15

◆ NUM_CU_TYPES

u32 arch::s390x::css::devmatch::detail::NUM_CU_TYPES
inlineconstexpr
Initial value:
=
sizeof(cu_types) / sizeof(cu_types[0])

◆ NUM_DEVICE_TYPES

u32 arch::s390x::css::devmatch::detail::NUM_DEVICE_TYPES
inlineconstexpr
Initial value:
=
sizeof(device_types) / sizeof(device_types[0])