14.06.2015 Views

Power ISA™ Version 2.03 - Power.org

Power ISA™ Version 2.03 - Power.org

Power ISA™ Version 2.03 - Power.org

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Version</strong> <strong>2.03</strong><br />

“Assembler Extended Mnemonics” on page 471), the<br />

Decrementer can be written from GPR Rx using:<br />

mtdec Rx<br />

The Decrementer can be read into GPR Rx using:<br />

mfdec Rx<br />

Copying the Decrementer to a GPR has no effect on<br />

the Decrementer contents or on the interrupt mechanism.<br />

7.4 Hypervisor Decrementer<br />

The Hypervisor Decrementer (HDEC) is a 32-bit decrementing<br />

counter that provides a mechanism for causing<br />

a Hypervisor Decrementer interrupt after a programmable<br />

delay. The contents of the Decrementer are treated<br />

as a signed integer.<br />

HDEC<br />

32 63<br />

Figure 38. Hypervisor Decrementer<br />

The Hypervisor Decrementer is a hypervisor resource;<br />

Chapter 2. “Logical Partitioning (LPAR)” on page 389.<br />

The Hypervisor Decrementer is driven by the same frequency<br />

as the Time Base. The period of the Hypervisor<br />

Decrementer will depend on the driving frequency, but<br />

if the same values are used as given above for the<br />

Time Base (see Section 7.2), and if the Time Base<br />

update frequency is constant, the period would be<br />

2 32 × 32<br />

T DEC = -------------------- = 137 seconds.<br />

1 GHz<br />

When the contents of HDEC 32 change from 0 to 1, a<br />

Hypervisor Decrementer exception will come into existence<br />

within a reasonable period or time. When the contents<br />

of HDEC 32 change from 1 to 0, an existing<br />

Hypervisor Decrementer exception will cease to exist<br />

within a reasonable period of time, but not later than<br />

the completion of the next context synchronizing<br />

instruction or event.<br />

The preceding paragraph applies regardless of whether<br />

the change in the contents of HDEC 32 is the result of<br />

decrementation of the Hypervisor Decrementer by the<br />

processor or of modification of the Hypervisor Decrementer<br />

caused by execution of an mtspr instruction.<br />

The operation of the Hypervisor Decrementer satisfies<br />

the following constraints.<br />

1. The operation of the Time Base and the Hypervisor<br />

Decrementer is coherent, i.e., the counters are<br />

driven by the same fundamental time base.<br />

2. Loading a GPR from the Hypervisor Decrementer<br />

has no effect on the accuracy of the Hypervisor<br />

Decrementer.<br />

3. Copying the contents of a GPR to the Hypervisor<br />

Decrementer replaces the contents of the Hypervisor<br />

Decrementer with the contents of the GPR.<br />

Programming Note<br />

In systems that change the Time Base update frequency<br />

for purposes such as power management,<br />

the Hypervisor Decrementer update frequency will<br />

also change. Software must be aware of this in<br />

order to set interval timers.<br />

7.5 Processor Utilization of<br />

Resources Register (PURR)<br />

The Processor Utilization of Resources Register<br />

(PURR) is a 64-bit counter, the contents of which provide<br />

an estimate of the resources used by the processor.<br />

The contents of the PURR are treated as a 64-bit<br />

unsigned integer.<br />

PURR<br />

0 63<br />

Figure 39. Processor Utilization of Resources<br />

Register<br />

The PURR is a hypervisor resource; see Chapter 2.<br />

The contents of the PURR increase monotonically,<br />

unless altered by software, until the sum of the contents<br />

plus the amount by which it is to be increased<br />

exceed 0xFFFF_FFFF_FFFF_FFFF (2 64 - 1) at which<br />

point the contents are replaced by that sum modulo<br />

2 64 . There is no interrupt or other indication when this<br />

occurs.<br />

The rate at which the value represented by the contents<br />

of the PURR increases is an estimate of the portion<br />

of resources used by the processor with respect to<br />

other processors that share those resources monitored<br />

by the PURR.<br />

Let the difference between the value represented by<br />

the contents of the Time Base at times T a and T b be<br />

T ab . Let the difference between the value represented<br />

by the contents of the PURR at time T a and T b be the<br />

value P ab . The ratio of P ab /T ab is an estimate of the percentage<br />

of shared resources used by the processor<br />

during the interval T ab . For the set {S} of processors<br />

that share the resources monitored by the PURR, the<br />

sum of the usage estimates for all the processors in the<br />

set is 1.0.<br />

The definition of the set of processors S, the shared<br />

resources corresponding to the set S, and specifics of<br />

the algorithm for incrementing the PURR are implementation-specific.<br />

Chapter 7. Timer Facilities<br />

459

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!