Top Banner
© 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)
12
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Prefixing Education

© 2004 IBM Corporation

IBM Systems and Technology Group

1 z/VM CP Storage Management Education Series

Storage Prefixing on z/ArchitectureA Brief Primer

Dan FitzGeraldMonday, October 19, 2009 (Revision 2)

Page 2: Prefixing Education

IBM Systems and Technology Group

© 2004 IBM Corporation04/15/23z/VM CP Storage Management Education Series

2

Outline

Review: Terminology

Background

Introduction to Prefixing

How Prefixing Works

Special Operations

Low-Address Protection

Suppression on Protection

Page 3: Prefixing Education

IBM Systems and Technology Group

© 2004 IBM Corporation04/15/23z/VM CP Storage Management Education Series

3

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.

Page 4: Prefixing Education

IBM Systems and Technology Group

© 2004 IBM Corporation04/15/23z/VM CP Storage Management Education Series

4

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.

Page 5: Prefixing Education

IBM Systems and Technology Group

© 2004 IBM Corporation04/15/23z/VM CP Storage Management Education Series

5

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

Page 6: Prefixing Education

IBM Systems and Technology Group

© 2004 IBM Corporation04/15/23z/VM CP Storage Management Education Series

6

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

Page 7: Prefixing Education

IBM Systems and Technology Group

© 2004 IBM Corporation04/15/23z/VM CP Storage Management Education Series

7

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.

Page 8: Prefixing Education

IBM Systems and Technology Group

© 2004 IBM Corporation04/15/23z/VM CP Storage Management Education Series

8

Introduction to PrefixingPrefixing 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.

Page 9: Prefixing Education

IBM Systems and Technology Group

© 2004 IBM Corporation04/15/23z/VM CP Storage Management Education Series

9

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.

Page 10: Prefixing Education

IBM Systems and Technology Group

© 2004 IBM Corporation04/15/23z/VM CP Storage Management Education Series

10

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

Page 11: Prefixing Education

IBM Systems and Technology Group

© 2004 IBM Corporation04/15/23z/VM CP Storage Management Education Series

11

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

Page 12: Prefixing Education

IBM Systems and Technology Group

© 2004 IBM Corporation04/15/23z/VM CP Storage Management Education Series

12

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