
3-10
MPC603e & EC603e RISC Microprocessors User's Manual
MOTOROLA
3.5 Memory Management/Cache Access Mode Bits—
W, I, M, and G
Some memory characteristics can be set on either a block or page basis by using the WIMG
bits in the BAT registers or page table entry (PTE) respectively. The WIMG attributes
control the following functionality:
Write-through (W bit)
Caching-inhibited (I bit)
Memory coherency (M bit)
Guarded memory (G bit)
These bits allow both uniprocessor and multiprocessor system designs to exploit numerous
system-level performance optimizations.
Careless specification and use of these bits may create situations where coherency
paradoxes are observed by the processor. In particular, this can happen when the state of
these bits is changed without appropriate precautions being taken (for example, when
flushing the pages that correspond to the changed bits from the caches of all processors in
the system is required, or when the address translations of aliased physical addresses
(referred to as real addresses in the architecture specification) specify different values for
any of the WIM bits). The 603e considers either of these cases to be a programming error
which may compromise the coherency of memory. These paradoxes can occur within a
single processor or across several devices, as described in Section 3.6.4.1, “Coherency in
Single-Processor Systems.”
The WIMG attributes are programmed by the operating system for each page and block.
The W and I attributes control how the processor performing an access uses its own cache.
The M
attribute
ensures that coherency is maintained for all copies of the addressed
memory location.
The G attribute prevents out-of-order loading and prefetching from the
addressed memory location.
When an access requires coherency, the processor performing the access must inform the
coherency mechanisms throughout the system that the access requires memory coherency.
The M attribute determines the kind of access performed on the bus (global or local).
The WIMG attributes occupy four bits in the BAT registers for block address translation
and in the PTEs for page address translation. The WIMG bits are programmed as follows:
The operating system uses the
mtspr
instruction to program the WIMG bits in the
BAT registers for block address translation. The IBAT register pairs do not have a
G bit and all accesses that use the IBAT register pairs are considered not guarded.
The operating system writes the WIMG bits for each page into the PTEs in system
memory as it sets up the page tables.