際際滷

際際滷Share a Scribd company logo
息 2004 IBM Corporation
IBM Systems and Technology Group
1 z/VM CP Storage Management Education Series
Storage Prefixing on z/Architecture
A Brief Primer
Dan FitzGerald
Monday, October 19, 2009 (Revision 2)
IBM Systems and Technology Group
息 2004 IBM Corporation
04/27/15
z/VM CP Storage Management Education Series2
Outline
Review: Terminology
Background
Introduction to Prefixing
How Prefixing Works
Special Operations
Low-Address Protection
Suppression on Protection
IBM Systems and Technology Group
息 2004 IBM Corporation
04/27/15
z/VM CP Storage Management Education Series3
Review: Terminology
In this portion of the presentation, we will introduce concepts
that will come up in our discussion on prefixing
Most of this information is available from the z/Architecture
Principles of Operation, Chapter 3.
We will present this information as a series of definitions.
This is intended to be a fast reference/review only, so please
consult the Principles of Operation or your Connections
Coach if you have any questions.
IBM Systems and Technology Group
息 2004 IBM Corporation
04/27/15
z/VM CP Storage Management Education Series4
Review: Terminology
 There are four different types of addresses that we will encounter
in z/Architecture. They are known as absolute, real, virtual and
logical. Additionally, we will hear about effective addresses.
Absolute Address  The address assigned to a main storage
location
These are the unmodified, actual addresses of bytes in storage.
The ultimate address of any unit of storage; all addresses are
eventually translated into absolute addresses.
Real Address  Identifies a location in real storage
This is an address that we will use for an access to storage
As we will see, real addresses are converted by prefixing into absolute
addresses.
The penultimate address of any unit of storage; all addresses are
translated first into real addresses, then into absolute addresses.
IBM Systems and Technology Group
息 2004 IBM Corporation
04/27/15
z/VM CP Storage Management Education Series5
Review: Terminology
Virtual Address  Identifies a location in virtual storage
When a virtual address is used for an access to main storage, it is
translated by means of dynamic address translation (DAT) to a real
address, which is then prefixed to an absolute address.
Logical Address  Your addresses are translated within
whatever mode the architecture is set to
In z/Architecture, a specific address mode can be set.
For example, your machine may be set to real address mode. In this
case, your logical addresses will be treated as real addresses.
Unless otherwise specified, the storage-operand addresses for most
instructions are logical addresses.
 Virtual and Logical are the addresses that a program will typically use
IBM Systems and Technology Group
息 2004 IBM Corporation
04/27/15
z/VM CP Storage Management Education Series6
Review: Terminology
Effective Address  The address which exists before any
transformation by dynamic address translation or any
prefixing is performed
Instruction Address  Addresses used to fetch instructions
from storage
IBM Systems and Technology Group
息 2004 IBM Corporation
04/27/15
z/VM CP Storage Management Education Series7
Background
Architecturally, low-order real memory (0 to 8191 bytes) is
very special
Lots of important stuff is kept there; things such as program interrupts
and things being passed back and forth between the hardware and the
software.
More specifically, old Program Status Words (PSWs) are stored there,
as are spaces for various machine check states.
Low-order memory is mapped and described in detail on pages 3-55
thru 3-64 of the Principles of Operation (SA22-7832-04).
This gives us a problem on multiprocessor systems
Each CPU has its own interrupts, PSWs, etc.
Each CPU wants to store these things in low-order memory.
Obviously, everybody cannot get their way.
IBM Systems and Technology Group
息 2004 IBM Corporation
04/27/15
z/VM CP Storage Management Education Series8
Introduction to Prefixing
Prefixing is the solution to the aforementioned problem!
The concept is simple: every CPU needs low-order memory
for its own use, so why don't we just map low-order
memory somewhere else?
Prefixing is a one-to-one mapping between absolute storage
and what we will refer to as real storage (see the Review
section).

Each CPU's low-order real memory is transformed into
absolute addresses different from that of every other CPU
Absolute addresses that lie between 0 - 8191 must be
mapped to a space elsewhere in memory; for demonstration
purposes, say it's 10000  18191
Similarly, the address range 10000  18191 is mapped to 0 
8191. This is a reverse prefix.
IBM Systems and Technology Group
息 2004 IBM Corporation
04/27/15
z/VM CP Storage Management Education Series9
How Prefixing Works
The prefix is a 51-bit quantity contained in bit positions 0-50
of the prefix register
Bits 0-32 of this quantity are always all zeroes
When prefixing is applied, the software-generated real
address is converted to an absolute address using these
three rules:
1. If bits 0-50 of the address are all zeroes, replace them with bits 0-50 of the
prefix
2. If bits 0-50 of the address are equal to the prefix value, replace them with
all zeroes
3. If bits 0-50 of the address are neither all zeroes nor equal to the prefix,
leave the address unchanged. In this case, the real and absolute
addresses are identical.
IBM Systems and Technology Group
息 2004 IBM Corporation
04/27/15
z/VM CP Storage Management Education Series10
How Prefixing Works
Only the address presented to storage is translated by
prefixing
The contents of the source of the address remain unchanged
A diagram of this process can be found on page 3-16 of the
Principles of Operation
IBM Systems and Technology Group
息 2004 IBM Corporation
04/27/15
z/VM CP Storage Management Education Series11
Special Operations
While bits 0-32 of the prefix register are always zeroes, it is
possible to set bits 33-50
This is done through the use of the privileged instructions
SET PREFIX and STORE PREFIX
SET PREFIX sets bits 33-50 of the prefix register with the
value in bit positions 1-18 of a word in storage
IBM Systems and Technology Group
息 2004 IBM Corporation
04/27/15
z/VM CP Storage Management Education Series12
Special Operations
Inversely, STORE PREFIX stores the value in bits 33-50 of
the prefix register into bit positions 1-18 of a word in storage

More Related Content

Prefixing Education

  • 1. 息 2004 IBM Corporation IBM Systems and Technology Group 1 z/VM CP Storage Management Education Series Storage Prefixing on z/Architecture A Brief Primer Dan FitzGerald Monday, October 19, 2009 (Revision 2)
  • 2. IBM Systems and Technology Group 息 2004 IBM Corporation 04/27/15 z/VM CP Storage Management Education Series2 Outline Review: Terminology Background Introduction to Prefixing How Prefixing Works Special Operations Low-Address Protection Suppression on Protection
  • 3. IBM Systems and Technology Group 息 2004 IBM Corporation 04/27/15 z/VM CP Storage Management Education Series3 Review: Terminology In this portion of the presentation, we will introduce concepts that will come up in our discussion on prefixing Most of this information is available from the z/Architecture Principles of Operation, Chapter 3. We will present this information as a series of definitions. This is intended to be a fast reference/review only, so please consult the Principles of Operation or your Connections Coach if you have any questions.
  • 4. IBM Systems and Technology Group 息 2004 IBM Corporation 04/27/15 z/VM CP Storage Management Education Series4 Review: Terminology There are four different types of addresses that we will encounter in z/Architecture. They are known as absolute, real, virtual and logical. Additionally, we will hear about effective addresses. Absolute Address The address assigned to a main storage location These are the unmodified, actual addresses of bytes in storage. The ultimate address of any unit of storage; all addresses are eventually translated into absolute addresses. Real Address Identifies a location in real storage This is an address that we will use for an access to storage As we will see, real addresses are converted by prefixing into absolute addresses. The penultimate address of any unit of storage; all addresses are translated first into real addresses, then into absolute addresses.
  • 5. IBM Systems and Technology Group 息 2004 IBM Corporation 04/27/15 z/VM CP Storage Management Education Series5 Review: Terminology Virtual Address Identifies a location in virtual storage When a virtual address is used for an access to main storage, it is translated by means of dynamic address translation (DAT) to a real address, which is then prefixed to an absolute address. Logical Address Your addresses are translated within whatever mode the architecture is set to In z/Architecture, a specific address mode can be set. For example, your machine may be set to real address mode. In this case, your logical addresses will be treated as real addresses. Unless otherwise specified, the storage-operand addresses for most instructions are logical addresses. Virtual and Logical are the addresses that a program will typically use
  • 6. IBM Systems and Technology Group 息 2004 IBM Corporation 04/27/15 z/VM CP Storage Management Education Series6 Review: Terminology Effective Address The address which exists before any transformation by dynamic address translation or any prefixing is performed Instruction Address Addresses used to fetch instructions from storage
  • 7. IBM Systems and Technology Group 息 2004 IBM Corporation 04/27/15 z/VM CP Storage Management Education Series7 Background Architecturally, low-order real memory (0 to 8191 bytes) is very special Lots of important stuff is kept there; things such as program interrupts and things being passed back and forth between the hardware and the software. More specifically, old Program Status Words (PSWs) are stored there, as are spaces for various machine check states. Low-order memory is mapped and described in detail on pages 3-55 thru 3-64 of the Principles of Operation (SA22-7832-04). This gives us a problem on multiprocessor systems Each CPU has its own interrupts, PSWs, etc. Each CPU wants to store these things in low-order memory. Obviously, everybody cannot get their way.
  • 8. IBM Systems and Technology Group 息 2004 IBM Corporation 04/27/15 z/VM CP Storage Management Education Series8 Introduction to Prefixing Prefixing is the solution to the aforementioned problem! The concept is simple: every CPU needs low-order memory for its own use, so why don't we just map low-order memory somewhere else? Prefixing is a one-to-one mapping between absolute storage and what we will refer to as real storage (see the Review section). Each CPU's low-order real memory is transformed into absolute addresses different from that of every other CPU Absolute addresses that lie between 0 - 8191 must be mapped to a space elsewhere in memory; for demonstration purposes, say it's 10000 18191 Similarly, the address range 10000 18191 is mapped to 0 8191. This is a reverse prefix.
  • 9. IBM Systems and Technology Group 息 2004 IBM Corporation 04/27/15 z/VM CP Storage Management Education Series9 How Prefixing Works The prefix is a 51-bit quantity contained in bit positions 0-50 of the prefix register Bits 0-32 of this quantity are always all zeroes When prefixing is applied, the software-generated real address is converted to an absolute address using these three rules: 1. If bits 0-50 of the address are all zeroes, replace them with bits 0-50 of the prefix 2. If bits 0-50 of the address are equal to the prefix value, replace them with all zeroes 3. If bits 0-50 of the address are neither all zeroes nor equal to the prefix, leave the address unchanged. In this case, the real and absolute addresses are identical.
  • 10. IBM Systems and Technology Group 息 2004 IBM Corporation 04/27/15 z/VM CP Storage Management Education Series10 How Prefixing Works Only the address presented to storage is translated by prefixing The contents of the source of the address remain unchanged A diagram of this process can be found on page 3-16 of the Principles of Operation
  • 11. IBM Systems and Technology Group 息 2004 IBM Corporation 04/27/15 z/VM CP Storage Management Education Series11 Special Operations While bits 0-32 of the prefix register are always zeroes, it is possible to set bits 33-50 This is done through the use of the privileged instructions SET PREFIX and STORE PREFIX SET PREFIX sets bits 33-50 of the prefix register with the value in bit positions 1-18 of a word in storage
  • 12. IBM Systems and Technology Group 息 2004 IBM Corporation 04/27/15 z/VM CP Storage Management Education Series12 Special Operations Inversely, STORE PREFIX stores the value in bits 33-50 of the prefix register into bit positions 1-18 of a word in storage