Chapter 3. L1 and L2 Cache Operation
3-39
Cache Control
The instruction cache is automatically invalidated when the MPC7400 is powered up and
during a hard reset. However, a soft reset does not automatically invalidate the instruction
cache. Software must set HID0[ICFI] to invalidate the entire instruction cache after a soft
reset.
3.5.2 Data Cache Hardware Flush Parameter in MSSCR0
The MPC7400 provides a hardware ush mechanism to ease ushing of the data cache. It
is controlled by MSSCR0[dL1HWF]. When the processor detects a state transistion from
0 to 1 in dL1HWF, the MPC7400 initiates a hardware ush of the data cache.
The ush is performed by starting with low cache indices and increments through way 0 of
the cache one index at a time until the maximum index value is obtained. Then, the index
is reset to zero and the same process is repeated for ways 1, 2, 3, 4, 5, 6, and 7 of the data
cache. For each index and way of the cache, the processor generates a non-global
Write-with-Kill operation to the system bus for all modiTed cache blocks. At the end of the
hardware ush, all lines in the data cache are invalidated.
During the ush, all memory subsystem requests to the data cache are stalled until the ush
is complete. Snoops, however, are fully serviced by the data cache during the ush.
When the data cache tags have been fully ushed of all valid entries, the dL1HWF bit is
cleared by hardware. Note that when dL1HWF is cleared, data cache ushes can still exist
in the L1OPQ or below. A Tnal
sync
instruction is required to guarantee that all data from
the data cache has been written to the system address interface.
The recommended sequence to ush the data cache follows:
1. disable interrupts
2.
dssall
3.
sync
4. set MSSCR0[dL1HWF] = 1
5.
sync
The data cache hardware ush mechanism is not present in earlier PowerPC
microprocessor implementations. Using MSSCR0[dL1HWF] is the preferred mechanism
for ushing the data cache on the MPC7400.