Earlier in the book, we mentioned the I/O subsystem and the fact that you can attach a variety of devices to Linux on the mainframe. This section details how the Linux I/O approach was accommodated on the mainframe as well as lists the various device drivers available. For more detailed descriptions of the device drivers, see the Device Drivers and Installation Commands book from IBM.
20.4.1 Common I/O layer
Linux was originally designed for the Intel-based PC architecture, which uses two cascaded programmable interrupt controllers (PIC) that allow a maximum of 15 different interrupt lines. All devices attached to that type of system share those 15 interrupt levels (or IRQs). In addition, the bus systems (ISA, MCA, EISA, PCI, and so forth) might allow shared interrupts, different polling methods, or DMA processing.
Unlike most other hardware designs, the mainframe implements a channel subsystem that provides a unified view of the devices attached to the system (Figure 20-2). Although a large variety of peripheral attachments are defined for the mainframe architecture, they are all accessed in the same manner using I/O interrupts. Each device attached to the system is uniquely identified by a subchannel, and the mainframe architecture allows up to 64 K (65,536) devices to be attached.
Figure 20-2. Linux device uses the common I/O layer to connect to device drivers
To avoid the introduction of a new I/O concept to the common Linux code, mainframe Linux developers decided to preserve the IRQ concept and systematically map the mainframe subchannels to Linux as IRQs. This allows Linux for zSeries and S/390 to support up to 65,536 different IRQs, each representing a unique device.
In the following pages, we list some of the important devices that are supported in a Linux-on-the-mainframe environment. For network device drivers, see Chapter 24, "Communications Reference."
20.4.2 System console support
The intended use of the console device drivers is solely to launch Linux. The following consoles are supported:
20.4.3 SCSI device support
Linux on the mainframe can make use of all SCSI device types currently supported by Linux on other platforms. These include SCSI disks, tapes, CD-ROMs, and DVDs.
SCSI-over-Fiber Channel support through the zfcp device driver requires a zSeries z900, z800, or later mainframe. zSeries FCP adapters do not work with older S/390 models. Both 31-bit Linux and 64-bit Linux are supported.
20.4.4 Disk support
The following disk types are supported through the DASD device driver:
20.4.5 Tape support
The Linux-on-the-mainframe tape device driver manages channel-attached tape drives which are compatible with IBM 3480, 3490, and 3590 magnetic tape subsystems. Various models of these devices are handled (for example, the 3490E). The device driver supports a maximum of 128 tape devices.
20.4.6 Cryptographic device support
The Linux device driver z90crypt is a generic character device driver for a cryptographic device. This virtual device will route work to the physical cryptographic devices, such as PCI Cryptographic Coprocessor (PCICC) or PCI Cryptographic Accelerator (PCICA), installed on the system.
There are two interfaces to the device driver: through the OpenSSL engine or through the Public Key Cryptography Standards (PKCS) 11 interface.
The device driver controls the PCICC or PCICA features in a Linux environment. Its current function is RSA-PKCS 1.2 decryption using a private key. The owner of the key can decrypt messages that were encrypted using the corresponding public key.
20.4.7 Expanded memory support
The XPRAM device driver is a block device driver that enables Linux for zSeries and S/390 to access the expanded storage. Thus XPRAM can be used as a basis for fast swap devices and/or fast file systems.
The zSeries architecture in 31-bit mode and the S/390 architecture support the access of only 2 GB (gigabytes) of main memory. To overcome this limitation, additional memory can be declared and accessed as expanded memory. For compatibility reasons, this expanded memory can also be declared in the 64-bit mode of zSeries. The zSeries and S/390 architectures allow applications to access up to 18 EB (exabytes) and 16 TB (terabytes) of expanded storage, respectively (although the current hardware can be equipped with at most 64 GB of real memory). The memory in the expanded storage range can be swapped in or out of the main memory in 4-KB blocks.
20.4.8 Network device drivers and adapters
This section introduces the most important drivers and network adapters that are used in a consolidated server environment based on Linux. It lists device drivers supported by Linux on the mainframe and the adapters supported by the drivers.
The channel device layer provides a common interface to Linux for S/390 or Linux for zSeries channel devices. You can use this interface to configure the devices and to handle machine checks (devices appearing and disappearing).
The drivers using the channel device layer at the time of writing are:
The QETH device driver
The QETH device driver supports Linux for zSeries (64-bit mode) and Linux for S/390 (31-bit mode), and is important for server consolidation. Version 2.4 of the Linux Kernel is required.
The QETH Linux network driver supports these features in QDIO mode:
These additional functions are supported:
The channel-to-channel device driver
A CTC connection or an ESCON connection is the typical high-speed connection between mainframes. The data packages and the protocol of both connections are the same. The difference between them is the physical channel used to transfer the data.
Both types of connection may be used to connect a mainframe, an LPAR, or a z/VM guest to another mainframe, LPAR, or z/VM guest, where the peer LPAR or z/VM guest may reside on the same or on a different system.
A third type of connection is virtual CTC, which is a software connection between two z/VM guests on the same z/VM system and which is faster than a physical connection.
CTC can be used to establish a point-to-point TCP/IP connection between two Linux for zSeries systems or between a Linux for zSeries system and another operating system such as VM/ESA, VSE/ESA, Linux for S/390, OS/390, or z/OS.
The Linux for zSeries CTC device driver supports all three types of connection and can be used to establish a point-to-point TCP/IP connection between two Linux on zSeries systems or between a Linux on zSeries system and another operating system such as VM/ESA, VSE/ESA, or z/OS.
The LCS device driver
This Linux network driver supports OSA-2 Ethernet/Token Ring and OSA-Express Fast Ethernet in non-QDIO mode. To configure this device driver, you use the channel device layer. This device driver is available in source code.
The LAN Channel Station (LCS) network interface has two channels: one read channel and one write channel. This is very similar to the zSeries and S/390 CTC interface.
The OSA-Express network adapter
The OSA-Express network adapter is a TCP/IP-based adapter that is important for server consolidation, since it is designed to communicate between a consolidated server environment that uses virtual adapters and IP addressing, and the "outside world." OSA is an abbreviation for Open Systems Adapter. The OSA-Express adapter is based on the QDIO (Queued Direct I/O) architecture and provides direct connectivity between applications running in a Linux Guest or Linux LPAR, and the other platforms on the attached network. The QDIO architecture allows a highly efficient data transfer, since it eliminates the need for conventional I/O and interrupt processing, which are instead virtualized.
The OSA-Express is identified in the hardware I/O configuration by its channel path identifier (CHPID). The CHPID is assigned when the OSA is installed and is based on the number of features already installed in the mainframe. The OSA-Express channel can be shared among all Linux LPARs within the mainframe. This is also referred to as port sharing. If a Linux system is running in an LPAR, an OSA channel path can be defined to be shared among those LPARs to which it is defined in the system hardware I/O configuration (IOCDS). This allows a network port on the OSA to be shared by as many as 15 Linux LPARs.
The OSA-Express adapter consists of these features which support the QDIO architecture:
The OSA-Express Gigabit Ethernet feature
The Gigabit Ethernet feature supports direct attachment through two separate channels to Gigabit Ethernet (GbE) LANs, where clients communicate using TCP/IP. The OSA-Express Gigabit Ethernet feature is available as short and long wavelength features, and supports full duplex data transmission.
The OSA-Express FENET feature
The FENET feature provides direct attachment through two separate channels to 100 Mbps or 10 Mbps Ethernet LANs running in either half- or full-duplex mode. The OSA-Express FENET supports auto-negotiation with its attached Ethernet hub, router, or switch. Auto-negotiation is a process that takes control of the cable when a connection to a network device is established. It detects the various modes that exist in the device on the other end of the wire and advertises its own abilities in order to automatically configure the highest common performance mode of interoperation.
The OSA-Express ATM feature
The ATM feature supports 155 Mbps over single-mode or multi-mode fiber-optic connection. When set up for QDIO, the ATM feature can be configured for Ethernet LAN emulation. When set up for non-QDIO, it can be configured for ATM Native or LAN emulation (Ethernet and Token Ring).
The OSA-Express Token Ring feature
The Token Ring (TR) feature provides direct attachment through two separate channels to 100-, 16-, or 4-Mbps LANs running in either half- or full-duplex mode. The OSA-Express TR also supports autosensing.
Communication between Linux LPARs is supported when the destination IP address is the same as the IP address for the target LPAR, and the port is enabled. Otherwise the packet is sent out on the network.
The OSA-2 network adapter
The OSA-2 network adapter enables an S/390 or zSeries mainframe to have a multipurpose and integrated open systems network interface, connecting to an Ethernet, Fast Ethernet, Token-Ring, and FDDI LANs and ATM networks. Both native and LAN-emulation ATM implementations are supported.
OSA-2 also supports concurrent channel upgrade and maintenance (hot-plug): that is, OSA-2 features can be added or updated as desired. Using the Open Systems Adapter Support Facility (OSA/SF), the OSA-2 adapter can also be configured to allow sharing among logical partitions (LPAR support).
ESCON channel adapter
ESCON (Enterprise System Connection) channels use fiber-optic cables, which transmit light pulses. They are serial channels, that is, they transfer information 1 bit at a time over the cable. They are used in zSeries or S/390 computers in LPAR mode, and ESCON channels can be shared across LPARs. This reduces the number of channels required to add new partitions or applications.
By sharing ESCON channels, Linux LPARs can connect to I/O devices using far fewer cables and are therefore an important part of server consolidation.
ESCON can be used to connect a mainframe, a Linux LPAR, or a Linux Guest to another mainframe, Linux LPAR, or Linux Guest, where the peer LPAR or VM Guest may reside on the same or on a different system.
FICON channel adapter
FICON (Fiber Connection) channels are similar to ESCON, except that whereas ESCON operates in half-duplex mode (data move in one direction only at any point in time), FICON operates in full-duplex mode (data move in both directions at any point in time). This means that under FICON the distance between the channel and the control unit can be 43 km and under ESCON only 23 km.
In addition, FICON can handle up to eight simultaneous I/O operations and ESCON only one. It increases the maximum throughput rate from 500 to 4000 I/Os per channel per second. FICON can also be used to connect a mainframe, a Linux LPAR, or a Linux Guest to another mainframe, Linux LPAR, or Linux Guest, where the peer LPAR or VM Guest may reside on the same or on a different system. It also allows Linux LPARs to share channels and use far fewer cables.