Chapter 3. L1 and L2 Cache Operation
3-57
L2 Cache Interface
3.7.3.6 L2 Cache Data-Only and Instruction-Only Operation
The L2CR[L2DO] parameter enables data-only operation in the L2 cache. For data-only
operation, only transactions from the L1 data cache are allowed to be reloaded into the L2
cache. Instruction addresses already in the cache still hit for the L1 instruction cache. L2DO
may be dynamically programmed as needed.
The L2CR[L2IO] parameter enables instruction-only operation in the L2 cache. For
instruction-only operation, only transactions from the L1 instruction cache are allowed to
be reloaded into the L2 cache. Data addresses already in the cache still hit for the L1 data
cache. L2IO may be dynamically programmed as needed.
3.7.3.6.1 L2 Cache Locking Using L2DO and L2IO
The MPC7400s L2 cache can be locked by setting both the L2DO and L2IO bits of the
L2CR. This prevents instruction cache misses from reloading the L2 cache and prevents
data cache castouts from allocating entries in the L2 cache. Data cache castouts in the
modiTed state are forwarded to the system interface. Note that locking the L2 cache using
this mechanism is completely independent of L1 data or instruction cache locking.
3.7.3.7 L2 Cache Global Invalidation
The MPC7400 supports global (not ash) invalidation of the L2 cache through the
L2CR[L2I] parameter. Setting L2I causes a global invalidation of the L2 cache. A global
invalidation is performed by automatically sequencing through the L2 cache tags and
clearing all bits of the tag (tag data bits, tag status bits, and FIFO bit). The global
invalidation function must be performed only while the L2 cache is disabled. L2I must
never be set while the L2 cache is enabled. During the invalidation, all memory activity
from the L1 data and instruction caches are blocked from accessing the L2 until the
invalidation is complete.
The L1 caches are invalidated automatically upon power-up (hard reset), but the L2 cache
tags must be explicitly invalidated by software setting the L2I bit.
L2CR[L2IP] is a read-only bit that indicates whether an L2 global invalidate is in progress.
It should be monitored after an L2 global invalidate has been initiated to determine when
the global L2 invalidation has completed.
The sequence for performing a global invalidation of the L2 cache is as follows:
1. Execute a
dssall
instruction to cancel any pending data stream touch instructions.
2. Execute a
sync
instruction to Tnish any pending store operations in the load/store
unit, disable the L2 cache by clearing L2CR[L2E], and execute an additional
sync
instruction after disabling the L2 cache to ensure that any pending operations in the
L2 cache unit have completed.
3. Initiate the global invalidation operation by setting the L2CR[L2I] bit.