3-34
MPC7400 RISC Microprocessor Users Manual
Memory and Cache Coherency
arbitrated to address the cache block in the L1 data cache, the L2 cache, or the system bus.
Note that loads are considered performed at the L1 data cache and L2 cache only if the
respective cache contains a valid copy of that address. Write-back stores are considered
performed at the L1 data cache and L2 cache only if the respective cache contains a valid,
non-shared copy of that address. Caching-inhibited (WIMG = x1xx) loads,
caching-inhibited (WIMG = x1xx) stores, and write-through (WIMG = 10xx) stores are
performed when they have been successfully presented to the external system bus.
3.4.4.2 Sequential Consistency of Memory Accesses
The PowerPC architecture requires that all memory operations executed by a single
processor be sequentially consistent with respect to that processor. This means that all
memory accesses appear to be executed in program order with respect to exceptions and
data dependencies.
The MPC7400 achieves sequential consistency by operating a single pipeline to the
cache/MMU. All memory accesses are presented to the MMU in exact program order and
therefore exceptions are determined in order. Loads are allowed to bypass stores once
exception checking has been performed for the store, but data dependency checking is
handled in the load/store unit so that a load will not bypass a store with an address match.
Newer caching-allowed loads can bypass older caching-allowed loads only if the two loads
are to different 32-byte address granules. Newer caching-allowed write-back stores can
bypass older caching-allowed write-back stores if they do not store to overlapping bytes of
data.
Note that although memory accesses that miss in the cache are forwarded to the reload
buffer for future arbitration for the L2 cache and external bus, all potential synchronous
exceptions have been resolved before the cache. In addition, although subsequent memory
accesses can address the cache, full coherency checking between the cache and the memory
queue is provided to avoid dependency conicts.
3.4.4.3 Enforcing Store Ordering
For caching-allowed memory accesses, or write-through, non-guarded memory accesses,
an
eieio
instruction must be used to ensure ordering. The
eieio
instruction is used to ensure
storage ordering. Because the MPC7400 does not reorder cache-inhibited memory accesses
or write-through, guarded memory accesses, the
eieio
instruction is not necessary to force
ordering for these types of stores.
If store gathering is enabled, the
eieio
instruction may be used to keep stores from being
gathered. If an
eieio
instruction is detected in the store queues, then store gathering is not
performed. The
eieio
instruction causes a system bus broadcast, which may be used to
prevent external devices, such as a bus bridge chip, from gathering stores.