
3-36
MPC7400 RISC Microprocessor Users Manual
Cache Control
The MPC7400 implements a reservation signal (RSRV) as on the MPC604- and the
MPC750-family processors. The state of the reservation is always presented onto the RSRV
output signal. This can be used to determine when an internal condition has caused a change
in the reservation state.
3.5 Cache Control
The MPC7400s L1 caches are controlled by programming speciTc bits in the HID0 and
MSSCR0 special-purpose registers and by issuing dedicated cache control instructions.
Section 3.5.1, òCache Control Parameters in HID0,ó describes the HID0 cache control bits,
Section 3.5.2, òData Cache Hardware Flush Parameter in MSSCR0,ó describes the data
cache hardware ush control in MSSCR0, and Section 3.5.3, òCache Control Instructions,ó
describes the cache control instructions.
3.5.1 Cache Control Parameters in HID0
The HID0 special-purpose register contains several bits that invalidate, disable, and lock
the instruction and data caches. The following sections describe these facilities.
3.5.1.1 Enabling and Disabling the Data Cache
The data cache may be enabled or disabled by using the data cache enable bit, HID0[DCE].
HID0[DCE] is cleared on power-up, disabling the data cache. Snooping is not performed
when the data cache is disabled. Note that if the data cache is disabled, the L2 cache must
also be disabled. The L2 cache is enabled/disabled by L2CR[L2E].
When the data cache is in the disabled state (HID0[DCE] = 0), the cache tag status bits are
ignored, and all accesses are propagated to the system bus as single-beat transactions. Note
that the CI (cache inhibit) signal always reects the state of the caching-inhibited
memory/cache access attribute (the I bit) independent of the state of HID0[DCE]. Also note
that disabling the data cache does not affect the translation logic; translation for data
accesses is controlled by MSR[DR].
The setting of the DCE bit must be preceded by a
sync
instruction to prevent the cache from
being enabled or disabled in the middle of a data access. In addition, the cache must be
globally ushed before it is disabled to prevent coherency problems when it is re-enabled.
The
dcbz
instruction causes an alignment exception when the data cache is disabled. The
touch load (
dcbt
and
dcbtst
) instructions are no-ops when the data cache is disabled;
however, address translation is still performed for these instructions. Other cache
instructions (
dcbf
,
dcbst
, and
dcbi
) do not affect the data cache when it is disabled.
3.5.1.2 Data Cache Locking
The contents of the data cache can be locked by setting the data cache lock bit,
HID0[DLOCK]. For a locked data cache, there are no new tag allocations. Store hits and