Programmjng Notes
1. Since no unit-status bits are set
to ones in the CSW associated with
the conclusion of an operation of a
selector channel by HALT I/O or
HALT DEVICE, unit-status bits and
the PCI bit set to ones are not
necessary for the operation to be
concluded. When status in a selec­
tor channel includes PCI at the
time the operation is concluded by
HALT I/O or HALT DEVICE, the CSW associated with the concluded oper­
ation is indistinguishable from the CSW provided by an interruption
during execution of the operation.
2. Program-controlled interruption
provides a means of alerting the
program to the progress of chaining
during an I/O operation. It
permits programmed dynamic storage
allocation. CHANNEL INDIRECT DATA ADDRESSING Channel indirect data addressing permits
a single channel-command word to control
the transmission of data that spans non­
contiguous pages in absolute storage. Channel indirect data addressing is
specified by a flag bit in the CCW which, when one, indicates that the
data-address field is not used to
directly address data. The contents of
the data-address field specify the
location of an indirect-data-address
word (IDAW), which contains an absolute
address designating a data area within
storage. An IDAW is used for the trans­
fer of up to 2K bytes. The IDAW
specified by the CCW can designate any
location. IDAWs can be located at any
available location in the first 16M-byte
block of storage.
Additional IDAWs, if needed for complet­
ing the data transfer for the CCW, are
contained in successive storage
locations. The number of IDAWs required
for a CCW is determined by the count
field of the CCW and by the data address
in the initial IDAW. When, for example,
the CCW count field specifies 4K bytes
and the first IDAW specifies a location
in the middle of a 2K-byte block, three
IDAWs are required. Data is then trans­
ferred, for read, write, control, and
sense commands, to or from successively
higher storage locations or, for a
read-backward command, to successively
lower storage locations, until a 2K-byte
block boundary is reached. The control
of data transfer is then passed to the
next IDAW. The second and any subse­
quent IDAWs must specify, depending on
the command, the first or last byte of a
2K-byte block. Thus, for read, write,
control, and sense commands, these IDAWs
have zeros in bit positions 21-31. For
a read-backward command, these IDAWs
have ones in bit positions 21-31.
Except for the unique restrictions on
the specification of the data address by
the IDAW, all other rules for the data
address, such as for protected storage
and invalid addresses, and the rules for
data prefetching, remain the same as
when indirect data addressing is not
used.
A channel may prefetch any of the IDAWs
pertaining to the current CCW or to a prefetched CCW. An IDAW takes control
of the data transfer when the last byte
has been transferred for the previous
IDAW. The same rules apply as with data
chaining regarding when an IDAW takes
control of data transfer during an I/O operation. That is, when the count in
the CCW has not reached zero, a new IDAW
takes control of the data transfer when
the last byte has been transferred for
the previous IDAW for that CCW, even in
situations where (1) channel end,
(2) channel end and device end, or
(3) channel end, device end, and status
modifier are received prior to transfer
of any data bytes pertaining to the new
IDAW. A prefetched IDAW does not take
control of an I/O operation if the count
in the CCW reached zero with the trans­
fer of the last byte of data for the
previous IDAW for that CCW. Errors
detected in prefetched IDAWs are not
indicated until the IDAW takes control
of the data transfer. Depending on the
model, addresses used to fetch an IDAW
may wrap from 16,777,212 to 0, or a
channel program check may be generated
when that IDAW takes control of the
operation.
Addressing Using the 24-Bit IDAW
The format of the IDAW and the signif­
icance of its fields when the
24-bit-IDAW facility is installed are as
follows: 1000000001 Data Address
o 8 31
Bit positions 0-7 are reserved for
future use and must contain zeros;
otherwise, a program-check condition is
recognized.
Bits 8-31 specify the location of the
first byte to be used in the data trans­
fer. In the first IDAW for a CCW, any
location can be specified. For subse­
quent IDAWs, depending on the command,
either the first or the last location of a 2K-byte block located on a 2K-byte
boundary must be specified. For read, Chapter 13. Input/Output Operations 13-45
write, control,
beginning of
specified, and
are zeros. For
the end of the
and bits 21-31
and sense commands, the the block must be
bits 21-31 of the IDAW
a read-backward command,
block must be specified,
of the IDAW are ones.
When the IDAW flag (bit 37) of the CCW is set to one and any of the following
conditions occurs:
1. The address in the CCW does not
designate the first IDAW on an
integral word boundary,
2. The address in the CCW designates a
storage location which is not
available,
3. Access to the storage location
specified by the address in the CCW is prohibited by protection, or
4. Bits 0-7 of the first IDAW are not
zeros,
then, depending on the model, the above
four conditions may be handled in one of
two ways:
1 The channel checks for the above
conditions before initiating the
operation at the device. If any of
these conditions i s recognized, the
channel does not initiate the oper-
ation with the device, and an
interruption condition is
generated.
2. The channel initiates the operation
at the device prior to checking for
these conditions. In this case,
recognition of any of these condi­
tions causes the channel to termi­
nate execution of the I/O operation
and generate an interruption condi­
tion only if the device attempts to
transfer data.
Addressing Using the 31-Bit IDAW
The format of the IDAW and the signif­
icance of its fields when the 31-bit­
IDAW facility is installed are as
follows:
Data Address
o 31
Bit position 0 is reserved for future
use and must be zero. Otherwise, a program-check condition is recognized.
Bits 1-31 specify the location of the
first byte to be used in the data trans­
fer. In the first IDAW for a CCW, any
location can be specified. For subse­
quent IDAWs, depending on the command,
either the first or the last location of
13-46 System/370 Principles of Operation
a 2K-byte block located on a 2K-byte
boundary must be specified. For read,
write, control, and sense commands, the
beginning of the block must be
specified, and bits 21-31 of the IDAW
are zeros. For a read-backward command,
the end of the block must be specified,
and bits 21-31 of the IDAW are ones.
When the IDAW flag (bit 37) of the CCW is set to one and any of the following
conditions occurs:
1. The address in the CCW does not
designate the first IDAW on an
integral word boundary,
2. The address in the CCW does not
designate a valid storage location,
3. Access to the storage location
specified by the address in the CCW is prohibited by protection, or
4. Bit 0 of the first IDAW is not zero then, depending on the model, the above
four conditions may be handled in one of
two ways:
1. The channel checks for the above
conditions before initiating the
operation at the device. If any of
these conditions i s recognized, the
channel does not initiate the oper-
ation wi th the device, and an
interruption condition is
generated.
2. The channel initiates the operation
at the device prior to checking for these conditions. In this case,
recognition of any of these condi­
tions causes the channel to termi­
nate execution of the I/O operation
and generate an interruption condi­
tion only if the device attempts to
transfer data.
SUSPENSION OF CHANNEL-PROGRAM EXECUTION The suspend function, when used in
conjunction with the RIO function,
provides the program with a means to
stop and restart the execution of a channel program. The initiation of the
suspend function is controlled by the
setting of the suspend-control bit in
the CAW. The suspend function is
signaled to the channel during channel­
program execution by the S flag in the CCW. The 5 flag in a CCW is not valid
and causes a program-check condition to
be recognized if (1) the CAW contains
the suspend-control bit set to zero,
(2) the CCW is fetched while data chain­
ing (see the earlier section "Data Chaining" for the handling of program­
ming errors detected during data
chaining), or (3) the suspend function
is not available for the subchannel.
Previous Page Next Page