update reference which does not change
the contents of the location may occur
for that portion, if any, of the store­
type operand for which no access excep­
tion exists. The interlocked-update
reference can occur only if the priority of the exception is equal to or lower
than the priority of an access exception
for the store-type operand.
When the exception is a specification
exception for a store-type operand which requires alignment on integral bounda­
ries, the interlocked-update reference which may occur is limited to the single
byte at the location designated by the
operand address. Programming Note The update appears to be an interlocked-update reference as observed
by other CPUs. It is not interlocked as
observed by channels. Examples of when
an interlocked-update reference may
occur to the destination-operand
location in storage are: Specification exception for an odd
register number for COMPARE DOUBLE AND SWAP Data exception for an invalid deci­
mal sign for ADD DECIMAL Decimal-divide exception for DIVIDE DECIMAL DUAL-ADDRESS-SPACE CONTROL The dual-address-space (DAS) facility
consists of a number of interrelated
functions. Some of these functions are described in this chapter, specifically
in the sections "DAS-Authorization Mech­
anisms" and "PC-Number Translation."
Additionally, address spaces, ASN trans­
lation, and ASN authorization are
described in Chapter 3, "Storage"; DAS
tracing in Chapter 4, "Control"; inter­ ruptions in Chapter 6, "Interruptions"; and the instructions in Chapter 10, "Control Instructions."
A complete list of the functions,
control-register fields, and
instructions that are part of DAS is
included in Appendix D, "Facilities." SUMMARY These major functions are provided:
1.
2.
3.
4.
5.
6 Two address spaces for immediate
use by the program
Means for changing to other spaces Three instructions for moving
information
A table-based
mechanism
subroutine-linkage
The use of multiple access keys for
key-controlled protection by prob­
lem programs
Aids for program-problem analysis
Additionally, control and authority
mechanisms are incorporated to control
these functions. These functions are intended for use by
programs considered to be semiprivileged, that is, programs which
are executed in the problem state but
which may be authorized to use addi­
tional capabilities. The authorization
mechanisms provided with DAS are described in the section "DAS Authori­
zation Mechanisms" in this chapter.
The 11 instructions which are included
as part of DAS are described in Chapter 10, "Control Instructions." DAS
includes the privileged instruction LOAD ADDRESS SPACE PARAMETERS and the follow­
ing semiprivileged instructions: EXTRACT PRIMARY ASN EXTRACT SECONDARY ASN INSERT ADDRESS SPACE CONTROL INSERT VIRTUAL STORAGE KEY MOVE TO PRIMARY MOVE TO SECONDARY t"OVE WITH KEY PROGRAM CALL PROGRAM TRANSFER
SET ADDRESS SPACE CONTROL SET SECONDARY ASN
In addition, when DAS is installed, two
instructions which are not part of DAS
are changed to be semiprivileged. These
instructions are: INSERT PSW KEY
SET PSW KEY FROM ADDRESS
The changes to the operation of these
two instructions are under the control
of mode bits in the PSW or in control registers. Whenever a program in the
problem state attempts to execute any of the 13 instructions at a time when the
required control registers have not been set up, a program exception is indicated which is also available on machines
without DAS. Chapter 5. Program Execution 5-13
DAS FUNCTIONS Using Two Address Spaces Primary and Secondarv Address Spaces:
DAS makes two address spaces available
for use by a semiprivileged program. The use of control register 1 to contain
the designation of a segment table for
one address space, called the primary
address space, is the same as when DAS is not installed. Control register 1 is
used when translating primary virtual
addresses. For the other address space,
called the secondary address space, a
segment-table designation is contained in control register 7. Control register
7 is used when translating secondary virtual addresses. DAT applies in the same way to both address spaces.
Address-Space Control: When the address-space-control bit, bit 16 of the EC-mode PSW, is one and DAT is on, the CPU is said to be in the secondary-space
mode. When the CPU is in the secondary-space mode, those operand
addresses defined to be logical refer to
the secondary address space. When the CPU is in the secondary-space mode, it is unpredictable whether instructions
are fetched from the primary address
space or from the secondary address
space. Programs which are executed in this mode are expected to reside in a portion of an address space which is shared between the primary address space and the secondary address space. The instruction SET ADDRESS SPACE CONTROL provides the semiprivileged program with the capability of selecting either the primary-space mode or the secondary-space mode when DAT is on. Since logical addresses are translated
as primary virtual addresses when the CPU is in the primary-space mode and as
secondary virtual addresses when the CPU is in the secondary-space mode, the semiprivileged program can use the entire set of unprivileged and semipriv­ ileged instructions to access
information in either of the two address
spaces. The instruction INSERT ADDRESS SPACE CONTROL provides the program with the ability to inspect the state of the address-space-control bit.
In addition to the function of accessing
operands in one address space or the other, the instructions MOVE TO PRIMARY and MOVE TO SECONDARY provide a means of
moving data from either of the two
address spaces to the other.
5-14 System/370 Principles of Operation Changing to Other Spaces
Address-Space Numbers: DAS provides for
changing both the primary address space
and the secondary address space. Each
address space is designated by a 16-bit
value, called the address-space number,
or ASN. The ASN can be used as a prima­
ry ASN (PASN) or a secondary ASN (SASN).
These two values are not used directly
to access an address space but are used
as symbolic identifiers of the address
space.
Bits 16-31 of control register 4 contain the PASN. The PASN can be loaded by
means of a PROGRAM CALL with space
switching, a PROGRAM TRANSFER with space
switching, or LOAD ADDRESS SPACE PARAME­ TERS. The PASN can be inspected by EXTRACT PRIMARY ASN. When the PASN is
loaded by means of the DAS instructions, the corresponding segment-table­
designation (STD) value is placed in the
primary segment-table designation (PSTD), bits 0-31 of control register 1. The PASN can also be loaded by means of
LOAD CONTROL, in which case no trans­
lation occurs to convert the PASN to an
STD value.
Bits 16-31 of control register 3 contain
the SASN. The SASN can be loaded by means of the SET SECONDARY ASN instruc­
tion and LOAD ADDRESS SPACE PARAMETERS. The SASN can be inspected by EXTRACT SECONDARY ASH. When the SASH is loaded
by means of the DAS instructions, the
corresponding STD value is placed in the secondary segment-table designation
(SSTD), bits 0-31 of control register 7. The SASH can also be loaded by means of LOAD CONTROL, in which case no trans­
lation occurs to convert the SASH to an
STD value.
Address-Space-Humber Translation: By using the instructions SET SECOHDARY ASN
and PROGRAM TRANSFER, the semiprivileged program can specify, by reference to a
general register containing an ASN, a
particular address space which is to be accessed. The ASN specified by the program is used in a table-lookup proc­
ess, which locates the address-space­
control parameters that in turn are used
to permit controlled access to the address space. The table lookup
includes an authorization test to ensure
that the program is authorized to use the specified address space. The table
lookup, including the authorization test
and the conversion to system-usable
form, is called ASH translation. The
same table lookup, but without the
authorization test, is performed by the PROGRAM CALL instruction on the ASN
specified in the entry-table entry. The
instruction LOAD ADDRESS SPACE PARAME­ TERS also uses ASN translation.
To obtain the segment-table designation
and other information for the new
Previous Page Next Page