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 />

Notes:<br />

1. The effect of changing the EE bit is immediate,<br />

even if the mtmsr[d] instruction is not context synchronizing<br />

(i.e., even if L=1).<br />

If an mtmsr[d] instruction sets the EE bit to 0,<br />

neither an External interrupt nor a Decrementer<br />

interrupt occurs after the mtmsr[d] is<br />

executed.<br />

If an mtmsr[d] instruction changes the EE bit<br />

from 0 to 1 when an External, Decrementer, or<br />

higher priority exception exists, the corresponding<br />

interrupt occurs immediately after<br />

the mtmsr[d] is executed, and before the next<br />

instruction is executed in the program that set<br />

EE to 1.<br />

If a hypervisor executes the mtmsr[d] instruction<br />

that sets the EE bit to 0, a Hypervisor<br />

Decrementer interrupt does not occur after<br />

mtmsr[d] is executed as long as the processor<br />

remains in hypervisor state.<br />

If the hypervisor executes an mtmsr[d]<br />

instruction that changes the EE bit from 0 to 1<br />

when a Hypervisor Decrementer or higher priority<br />

exception exists, the corresponding interrupt<br />

occurs immediately after the mtmsr[d]<br />

instruction is executed, and before the next<br />

instruction is executed, provided HDICE is 1.<br />

2. Synchronization requirements for this instruction<br />

are implementation-dependent.<br />

3. SDR1 must not be altered when MSR DR =1 or<br />

MSR IR =1; if it is, the results are undefined.<br />

4. A ptesync instruction is required before the mtspr<br />

instruction because (a) SDR1 identifies the Page<br />

Table and thereby the location of Reference and<br />

Change bits, and (b) on some implementations,<br />

use of SDR1 to update Reference and Change bits<br />

may be independent of translating the virtual<br />

address. (For example, an implementation might<br />

identify the PTE in which to update the Reference<br />

and Change bits in terms of its offset in the Page<br />

Table, instead of its real address, and then add the<br />

Page Table address from SDR1 to the offset to<br />

determine the real address at which to update the<br />

bits.) To ensure that Reference and Change bits<br />

are updated in the correct Page Table, SDR1 must<br />

not be altered until all Reference and Change bit<br />

updates associated with address translations that<br />

were performed, by the processor executing the<br />

mtspr instruction, before the mtspr instruction is<br />

executed have been performed with respect to that<br />

processor. A ptesync instruction guarantees this<br />

synchronization of Reference and Change bit<br />

updates, while neither a context synchronizing<br />

operation nor the instruction fetching mechanism<br />

does so.<br />

5. For data accesses, the context synchronizing<br />

instruction before the tlbie, tlbiel, or tlbia instruction<br />

ensures that all preceding instructions that<br />

access data storage have completed to a point at<br />

which they have reported all exceptions they will<br />

cause.<br />

The context synchronizing instruction after the<br />

tlbie, tlbiel, or tlbia instruction ensures that storage<br />

accesses associated with instructions following<br />

the context synchronizing instruction will not<br />

use the TLB entry(s) being invalidated.<br />

(If it is necessary to order storage accesses associated<br />

with preceding instructions, or Reference<br />

and Change bit updates associated with preceding<br />

address translations, with respect to subsequent<br />

data accesses, a ptesync instruction must also be<br />

used, either before or after the tlbie, tlbiel, or tlbia<br />

instruction. These effects of the ptesync instruction<br />

are described in the last paragraph of Note 8.)<br />

6. The notation “{ptesync,CSI}” denotes an instruction<br />

sequence. Other instructions may be interleaved<br />

with this sequence, but these instructions<br />

must appear in the order shown.<br />

No software synchronization is required before the<br />

Store instruction because (a) stores are not performed<br />

out-of-order and (b) address translations<br />

associated with instructions preceding the Store<br />

instruction are not performed again after the store<br />

has been performed (see Section 5.5). These<br />

properties ensure that all address translations<br />

associated with instructions preceding the Store<br />

instruction will be performed using the old contents<br />

of the PTE.<br />

The ptesync instruction after the Store instruction<br />

ensures that all searches of the Page Table that<br />

are performed after the ptesync instruction completes<br />

will use the value stored (or a value stored<br />

subsequently). The context synchronizing instruction<br />

after the ptesync instruction ensures that any<br />

address translations associated with instructions<br />

following the context synchronizing instruction that<br />

were performed using the old contents of the PTE<br />

will be discarded, with the result that these<br />

address translations will be performed again and, if<br />

there is no corresponding entry in any implementation-specific<br />

address translation lookaside information,<br />

will use the value stored (or a value stored<br />

subsequently).<br />

The ptesync instruction also ensures that all storage<br />

accesses associated with instructions preceding<br />

the ptesync instruction, and all Reference and<br />

Change bit updates associated with additional<br />

address translations that were performed, by the<br />

processor executing the ptesync instruction,<br />

before the ptesync instruction is executed, will be<br />

performed with respect to any processor or mechanism,<br />

to the extent required by the associated<br />

Memory Coherence Required attributes, before<br />

any data accesses caused by instructions follow-<br />

Chapter 10. Synchronization Requirements for Context Alterations<br />

469

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

Saved successfully!

Ooh no, something went wrong!