
3-8
MPC7400 RISC Microprocessor Users Manual
Memory and Cache Coherency
¥
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.
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 non-global).
Software must exercise care with respect to the use of these bits if coherent memory support
is desired. Careless speciTcation of these bits may create situations that present coherency
paradoxes to the processor. These coherency paradoxes can occur within a single processor
or across several processors. It is important to note that in the presence of a paradox, the
operating system software is responsible for correctness.
In particular, a coherency paradox can occur when the state of these bits is changed without
appropriate precautions (such as ushing the pages that correspond to the changed bits from
the caches of all processors in the system) or when the address translations of aliased real
addresses specify different values for certain WIMG bit values. The MPC7400 supports
aliasing for WIMG = 100x and WIMG = 000x; however, the MPC7400 does not support
aliasing WIMG = 101x and WIMG = 001x. SpeciTcally, this means that for a given physical
address, the MPC7400 only supports simultaneous memory/cache access attributes for that
physical address of caching-allowed, write-through, memory-coherency-not-required
(WIMG = 100x) and caching-allowed, write-back, memory-coherency-not-required
(WIMG = 000x).
For real addressing mode (that is, for accesses performed with address translation
disabledMSR[IR] = 0 or MSR[DR] = 0 for instruction or data access, respectively), the
WIMG bits are automatically generated as 0b0011 (all memory is write-back,
caching-allowed, memory-coherency-required, and guarded).
3.4.1.1 Out-of-Order Accesses to Guarded Memory
Guarded memory may be accessed out of order if the load is guaranteed to be executed. In
this case, the entire cache block containing the referenced data may be loaded into the
cache.
In addition, out-of-order accesses to non-guarded space (G = 0), from both the instruction
and data caches, can be disabled by setting speculative access disable bit, HID0[SPD].
For the MPC7400, a guarded load is not allowed to access the system interface until that
load is at the bottom of the completion buffer. This means that all prior load accesses to the
system interface must have already returned data to the processor before the subsequent
guarded load is allowed to access the system address bus. This prevents the MPC7400 from
pipelining a guarded load with any other type of load on the system interface. Note that this