Chapter 3. L1 and L2 Cache Operation
3-63
L2 Cache Interface
¥
Burst read requests from the L1 instruction or data caches that miss in the L2 cache
will initiate a burst read operation from the system interface for the cache block that
missed. The cache block that is received from the bus is forwarded to the appropriate
L1 cache. L1 instruction cache misses are also allocated into the L2. If the L2
allocate requires a new tag entry and the current tag is modiTed, any modiTed
sectors of the tag to be replaced are castout from the L2 cache to the system
interface, and the F-bit is updated to point to the other cache way. If the L2 cache is
disabled (L2E = 0) or data only (L2D0 = 0), then L1 instruction cache misses are not
allocated into L2.
¥
Normal burst writes from the L1 data cache due to castouts (also referred to as
replacement copybacks) are written to the L2 cache with the same state (MERSI)
information as they had in the L1. If the L2 is conTgured as write-through
(L2WT = 1), they are marked exclusive instead, and are also forwarded to the
system interface. If the L1 castout requires a new tag entry to be allocated in the L2
cache and the current tag is modiTed, any modiTed sectors of the tag to be replaced
are castout from the L2 cache to the system interface, unless the C bit of the L1 cast
out is clear. If the C bit is clear, and the L1 castout misses in the L2, it does not
allocate a new entry and is forwarded to the system interface. If a new tag is
allocated, the F-bit is updated to point to the other cache way. Note that setting the
L2IO bit of the L2CR forces the C bit of all L1 castouts to be cleared. In this case,
L1 castouts will never allocate in the L2.
¥
Normal burst writes to the L2, on behalf of instruction cache misses that cause L2
allocates, are written to the L2 with the state (RSI) information obtained from the
system interface. If this write ever hits in the L2 (due to data and instructions
occupying the same block), then it is discarded.
¥
Normal single-beat writes (not
stwcx.
) that are marked write-through (by address
translation or because the L1 cache is locked) are written to the L2 cache if they hit,
and they are also written to the system interface independent of L2 hit/miss status.
In case of a hit to a line in the L2 not marked modiTed, the status (MERSI)
information and F-bit remain unchanged. In case of a hit to a line in the L2 that is
marked modiTed, the entire line is pushed to memory and the state is changed to
exclusive. The F-bit remains unchanged.
¥
Caching-allowed
stwcx.
operations are handled by the L1 data cache similarly to
normal caching-allowed stores. The L2 data cache does not treat
stwcx.
differently
than a normal caching-allowed store. Caching-inhibited
stwcx.
operations do not
access the L2 tags and are forwarded to the system interface.
¥
The
dcbz
instruction does not affect the L2 cache state. The
dcbz
instruction is
handled entirely by the L1.
¥
On the MPC7400,
dcba
differs from
dcbz
only in its exception generation. As such,
it is identical to
dcbz
from an L2 perspective. The
dcba
instruction does not affect
the L2 cache state.