Chapter 5. Memory Management
5-21
Block Address Translation
5.3 Block Address Translation
The block address translation (BAT) mechanism in the OEA provides a way to map ranges
of effective addresses larger than a single page into contiguous areas of physical memory.
Such areas can be used for data that is not subject to normal virtual memory handling
(paging), such as a memory-mapped display buffer or an extremely large array of numerical
data.
Block address translation in the MPC7400 is described in Chapter 7, òMemory
Management,ó in
The
Programming Environments Manual
for 32-bit implementations.
The MPC7400 BAT registers are not initialized by the hardware after the power-up or reset
sequence. Consequently, all valid bits in both instruction and data BATs must be cleared
before setting any BAT for the Trst time. This is true regardless of whether address
translation is enabled. Also, software must avoid overlapping blocks while updating a BAT
or areas. Even if translation is disabled, multiple BAT hits are treated as programming
errors and can corrupt the BAT registers and produce unpredictable results.
5.4 Memory Segment Model
The MPC7400 adheres to the memory segment model as deTned in Chapter 7, òMemory
Management,ó in
The
Programming Environments Manual
for 32-bit implementations.
Memory in the PowerPC OEA is divided into 256-Mbyte segments. This segmented
memory model provides a way to map 4-Kbyte pages of effective addresses to 4-Kbyte
pages in physical memory (page address translation), while providing the programming
exibility afforded by a large virtual address space (52 bits).
The segment/page address translation mechanism may be superseded by the block address
translation (BAT) mechanism described in
Section 5.3, òBlock Address Translation
.ó If not, the
translation proceeds in the following two steps:
1. from effective address to the virtual address (which never exists as a speciTc entity
but can be considered to be the concatenation of the virtual page number and the byte
offset within a page), and
2. from virtual address to physical address.
This section highlights those areas of the memory segment model deTned by the OEA that
are speciTc to the MPC7400.
5.4.1 Page History Recording
Referenced (R) and changed (C) bits in each PTE keep history information about the page.
They are maintained by a combination of the MPC7400 table search hardware and the
system software. The operating system uses this information to determine which areas of
memory to write back to disk when new pages must be allocated in main memory.