
6-36
G2 PowerPC Core Reference Manual
For More Information On This Product,
Go to: www.freescale.com
MOTOROLA
Page Table Search Operation
Figure 6-14. Required Physical Address (RPA) Register
Table 6-13 describes the bit settings of the RPA register.
6.5.2.2
Software Table Search Operation
When a TLB miss occurs, the instruction or data MMU loads IMISS or DMISS, with the
effective address of the access. The processor completes all instructions ahead of the
instruction that caused the exception, status information is saved in SRR1, and one of the
three TLB miss exceptions is taken. In addition, the processor loads ICMP or DCMP with
the value to be compared with the first word of PTEs in the tables in memory.
The software should then access the first PTE at the address pointed to by HASH1. The first
word of the PTE should be loaded and compared to the contents of DCMP or ICMP. If there
is a match, the required PTE has been found and the second word of the PTE is loaded from
memory into RPA. Then the
tlbli
or
tlbld
instruction is executed, which loads the contents
of ICMP or DCMP and RPA into the selected TLB entry. The TLB entry is selected by the
effective address of the access and SRR1[WAY].
If the comparison does not match, the PTEG address is incremented to point to the next PTE
in the table, and the above sequence is repeated. If none of the eight PTEs in the primary
PTEG matches, the sequence is then repeated using the secondary PTEG (at the address
contained in HASH2).
If the PTE is also not found in the eight entries of the secondary page table, a page fault
condition exists and a page fault exception must be synthesized. Thus, the appropriate bits
must be set in SRR1 (or DSISR) and the TLB miss handler must branch to either the ISI or
DSI exception handler, which handles the page fault condition.
Table 6-13. RPA Bit Settings
Bits
Name
Description
0–19
RPN
Physical page number from PTE
20–22
—
Reserved
23
R
Referenced bit from PTE
24
C
Changed bit from PTE
25–28
WIMG
Memory/cache access attribute bits
29
—
Reserved
30–31
PP
Page protection bits from PTE
Reserved
RPN
R
C
WIMG
PP
0
19 20
22
23 24 25
28 29 30 31
F
Freescale Semiconductor, Inc.
n
.