1-38
MPC7400 RISC Microprocessor Users Manual
Memory Management
The PowerPC architecture deTnes different resources for 32- and 64-bit processors; the
MPC7400 implements the 32-bit memory management model. The memory-management
model provides 4 Gbytes of logical address space accessible to supervisor and user
programs with a 4-Kbyte page size and 256-Mbyte segment size. BAT block sizes range
from 128 Kbytes to 256 Mbytes and are software selectable. In addition, it deTnes an
interim 52-bit virtual address and hashed page tables for generating 32-bit physical
addresses.
The architecture also provides independent four-entry BAT arrays for instructions and data
that maintain address translations for blocks of memory. These entries deTne blocks that
can vary from 128 Kbytes to 256 Mbytes. The BAT arrays are maintained by system
software.
The PowerPC MMU and exception model support demand-paged virtual memory. Virtual
memory management permits execution of programs larger than the size of physical
memory; demand-paged implies that individual pages are loaded into physical memory
from system memory only when they are Trst accessed by an executing program.
The hashed page table is a variable-sized data structure that deTnes the mapping between
virtual page numbers and physical page numbers. The page table size is a power of 2, and
its starting address is a multiple of its size. The page table contains a number of page table
entry groups (PTEGs). A PTEG contains eight page table entries (PTEs) of eight bytes
each; therefore, each PTEG is 64 bytes long. PTEG addresses are entry points for table
search operations.
Setting MSR[IR] enables instruction address translations and MSR[DR] enables data
address translations. If the bit is cleared, the respective effective address is the same as the
physical address.
1.8.2 MPC7400 Microprocessor Memory Management
Implementation
The MPC7400 implements separate MMUs for instructions and data. It implements a copy
of the segment registers in the instruction MMU, however, read and write accesses (
mfsr
and
mtsr
) are handled through the segment registers implemented as part of the data MMU.
The MPC7400 MMU is described in Section 1.2.3, òMemory Management Units
(MMUs).ó
The R (referenced) bit is updated in the PTE in memory (if necessary) during a table search
due to a TLB miss. Updates to the C (changed) bit are treated like TLB misses. A complete
table search is performed and the entire TLB entry is rewritten to update the C bit.