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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

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

registers on the occurrence of a Data TLB Error Interrupt<br />

or Instruction TLB Error interrupt.<br />

When a Data or Instruction TLB Error interrupt (miss)<br />

occurs, MAS0, MAS1, and MAS2 are automatically<br />

updated using the defaults specified in MAS4 as well<br />

as the AS and EPN values corresponding to the access<br />

that caused the exception. MAS6 is updated to set<br />

MAS6 SPID0 to the value of PID0 and MAS6 SAS to the<br />

value of MSR DS or MSR IS depending on the type of<br />

access that caused the error. In addition, if<br />

MAS4 TLBSELD identifies a TLB array that supports NV<br />

(Next Victim), MAS0 ESEL is loaded with a value that<br />

hardware believes represents the best TLB entry to victimize<br />

to create a new TLB entry and MAS0 NV is<br />

updated with the TLB entry index of what hardware<br />

believes to be the next victim. Thus MAS0 ESEL identifies<br />

the current TLB entry to be replaced, and MAS0 NV<br />

points to the next victim. When software writes the TLB<br />

entry, the MAS0 NV field is written to the TLB array. The<br />

algorithm used by the hardware to determine which<br />

TLB entry should be targeted for replacement is implementation-dependent.<br />

The automatic update of the MAS registers sets up all<br />

the necessary fields for creating a new TLB entry with<br />

the exception of RPN, the U0-U3 attribute bits, and the<br />

permission bits. With the exception of the upper 32 bits<br />

of RPN and the page attributes (should software desire<br />

to specify changes from the default attributes), all the<br />

remaining fields are located in MAS3, requiring only the<br />

single MAS register manipulation by software before<br />

writing the TLB entry.<br />

For Instruction Storage interrupt (ISI) and Data Storage<br />

interrupt (DSI) related exceptions, the MAS registers<br />

are not updated. Software must explicitly search the<br />

TLB to find the appropriate entry.<br />

The update of MAS registers through TLB Replacement<br />

Hardware Assist is summarized in Table 7.<br />

exception was executing in 32-bit mode, then bits<br />

0:31 of the EPN field in MAS2 will be set to 0.<br />

Executing a tlbre instruction in 32-bit mode will set<br />

bits 0:31 of the MAS2 EPN field to an undefined<br />

value.<br />

Programming Note<br />

This allows a 32-bit OS to operate seamlessly on a<br />

64-bit implementation and a 64-bit OS to easily<br />

support 32-bit applications.<br />

D.5 32-bit and 64-bit Specific<br />

MMU Behavior<br />

MMU behavior is largely unaffected by whether the processor<br />

is in 32-bit computation mode (MSR CM =0) or<br />

64-bit computation mode (MSR CM =1). The only differences<br />

occur in the EPN field of the TLB entry and the<br />

EPN field of MAS2. The differences are summarized<br />

here.<br />

<br />

<br />

Executing a tlbwe instruction in 32-bit mode will<br />

set bits 0:31 of the TLB EPN field to 0, regardless<br />

of the value of bits 0:31 of the EPN field in MAS2.<br />

Updates to MAS registers via TLB Replacement<br />

Hardware Assist (see Section D.4.5), update bits<br />

0:51 of the EPN field regardless of the computation<br />

mode of the processor at the time of the exception<br />

or the interrupt computation mode in which the<br />

interrupt is taken. If the instruction causing the<br />

626<br />

<strong>Power</strong> ISA -- Book III-E

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

Saved successfully!

Ooh no, something went wrong!