susceptibility  occurrence   of  code.   of  the   block  to  the   invalid  checking-block  
Bits 16-23ignored.   of  the   The   block  tested   is  
contents ofgeneral   contents  of  general   ignored.  addressed   by  register   R  2  •   register  R1   the  The   are  
When the storage-key 4K-byte-block
facility is not installed, all blocks
are double-key 4K-byte blocks, and two
keys are tested.
When the storage-key 4K-byte-block
facility is installed, all blocks are
single-key 4K-byte blocks, and only one
keyis   tested.  In  this  instruction  
definition, the term "storage keys"is   used  whether  one  or  two  storage  keys   are  
affected.
A complete testing operationis   neces  
sarily performed only when the initial
contents of general register0   are  zero.  
The contents of general register0   are  
set to zero at the completion of the
operation.
If the block is found to be usable, the
4K bytes of the block are cleared to
zeros, the contents of the storage keys
are unpredictable, and condition code0   is  set.  If  the  block  is  found  to  be  
unusable, the data and the storage keys
are set, as far as is possible by the
model, to a value such that subsequent
fetches to the area do not causea   machine-check  condition,  and  condition  
code 1 is set.
The contents of general register R2 are
treated as a 31-bit real address of a
4K-byte block in storage. Bits 1-19 of
the register designate the 4K-byte
block, and bits0   and  20-31   of  the  
register are ignored.
The address of the block is a real
address, and the accesses to the block
designated by the second-operand address
are not subject to key-controlled and
segment protection. Low-address
protection does apply. The operationis   terminated  on  addressing  and  protection  
exceptions. If termination occurs, the
condition code and the contents of
general register0   are  unpredictable.  
The contents of the storage block and
its associated storage keys are not
changed when these exceptions occur.
Depending on the model, the test for
usability may be performed (1) byalter
nately storing and reading out test
patterns to the data and storage keys in
the block or (2) by reference to an
internal record of the usability of the
blocks which are available in the
configuration, or (3) by using a combi
nation of both mechanisms.
Inmodels   in  which  an  internal  record  is   used,   the  block  is  indicated  as  unusable  
if a solid failure has been previouslydetected,   or  if  intermittent   failures   in  
the block haveexceeded   the   threshold  
implemented by the model. In such
models, depending on the criteria,
attempts tostore   mayor  may  not  occur.  
Thus, if block0   is  not  usable,   and  no  
store occurs, low-address protection may
or may notbe   indicated.  
In models in whichtest   patterns  are   used,  TEST  BLOCK  may  be   interruptible.  
When an interruption occursafter   a  unit  
ofoperation,   other   than  the  last  one,  the   condition  code  is  unpredictable,  and  
the contents ofgeneral   register  0   may  
contain arecord   of  the  state  of  inter  
mediate steps. When execution is
resumed after an interruption, the
condition code is ignored, but the
contents of general register0   may  be  
used todetermine   the  resumption  point.  
If (1) TEST BLOCK is executed with an
initial value other than zero ingeneral   register  0,   or  (2)  the   interrupted  
instruction is resumed after an inter
ruption witha   value  in   general  register  
o other than thevalue   which  was  present  
at thetime   of  the  interruption,  or  
(3) the block is accessed by anotherCPU   or  by  a  channel   during  the  execution  of  the   instruction,  then  the   contents  of  
the storage block, its associated stor
age keys, andgeneral   register  0   are  
unpredictable, along with the resultant
condition-code setting.
Invalid checking-block-code errors
initially found in the block or encount
ered during the test do not normally
result in machine-check conditions. The
test-block function is implemented in
such a way that the frequency of
machine-check interruptions due to the
instruction execution is not
significant. However,if,   during  the  execution   of  TEST  BLOCK   for  an  unusable  
block, that block is accessed by anotherCPU   (or  by  a  channel),  error  conditions  
may be reported both to thisCPU   and  to  
the otherCPU   (or  to  the  channel).  
A serialization function is performed
before the block is accessed and again
after the operation is completed (or
partially completed).
The priority of the recognition of
exceptions and condition codes is shown
in the figure"Priority   of  Execution:  
TEST BLOCK."
Resulting Condition Code:
o Block usable
1 Block not usable
2
3
Chapter10.   Control   Instructions  10-51   
Bits 16-23
contents of
When the storage-key 4K-byte-block
facility is not installed, all blocks
are double-key 4K-byte blocks, and two
keys are tested.
When the storage-key 4K-byte-block
facility is installed, all blocks are
single-key 4K-byte blocks, and only one
key
definition, the term "storage keys"
affected.
A complete testing operation
sarily performed only when the initial
contents of general register
The contents of general register
set to zero at the completion of the
operation.
If the block is found to be usable, the
4K bytes of the block are cleared to
zeros, the contents of the storage keys
are unpredictable, and condition code
unusable, the data and the storage keys
are set, as far as is possible by the
model, to a value such that subsequent
fetches to the area do not cause
code 1 is set.
The contents of general register R2 are
treated as a 31-bit real address of a
4K-byte block in storage. Bits 1-19 of
the register designate the 4K-byte
block, and bits
register are ignored.
The address of the block is a real
address, and the accesses to the block
designated by the second-operand address
are not subject to key-controlled and
segment protection. Low-address
protection does apply. The operation
exceptions. If termination occurs, the
condition code and the contents of
general register
The contents of the storage block and
its associated storage keys are not
changed when these exceptions occur.
Depending on the model, the test for
usability may be performed (1) byalter
nately storing and reading out test
patterns to the data and storage keys in
the block or (2) by reference to an
internal record of the usability of the
blocks which are available in the
configuration, or (3) by using a combi
nation of both mechanisms.
In
if a solid failure has been previously
the block have
implemented by the model. In such
models, depending on the criteria,
attempts to
Thus, if block
store occurs, low-address protection may
or may not
In models in which
When an interruption occurs
of
the contents of
contain a
mediate steps. When execution is
resumed after an interruption, the
condition code is ignored, but the
contents of general register
used to
If (1) TEST BLOCK is executed with an
initial value other than zero in
instruction is resumed after an inter
ruption with
o other than the
at the
(3) the block is accessed by another
the storage block, its associated stor
age keys, and
unpredictable, along with the resultant
condition-code setting.
Invalid checking-block-code errors
initially found in the block or encount
ered during the test do not normally
result in machine-check conditions. The
test-block function is implemented in
such a way that the frequency of
machine-check interruptions due to the
instruction execution is not
significant. However,
block, that block is accessed by another
may be reported both to this
the other
A serialization function is performed
before the block is accessed and again
after the operation is completed (or
partially completed).
The priority of the recognition of
exceptions and condition codes is shown
in the figure
TEST BLOCK."
Resulting Condition Code:
o Block usable
1 Block not usable
2
3
Chapter
 
             
            












































































































































































































































































































































































































































































































































































