
3-6
MPC603e & EC603e RISC Microprocessors User's Manual
MOTOROLA
3.2.3 Data Cache Control
The 603e provides several means of data cache control through the use of the WIMG bits
in the page tables, control bits in the HID0 register, and user- and supervisor-level cache
control instructions. While memory page level cache control is provided by the WIMG bits,
the on-chip data cache can be invalidated, disabled, locked, or broadcast by the control bits
in the HID0 register described in this section. (Note that, user- and supervisor-level are
referred to as problem and privileged state, respectively, in the architecture specification.)
3.2.3.1 Data Cache Invalidation
While the data cache is automatically invalidated when the 603e is powered up and during
a hard reset, assertion of the soft reset signal does not cause data cache invalidation.
Software may invalidate the contents of the data cache using the data cache flash invalidate
(DCFI) control bit in the HID0 register. Flash invalidation of the data cache is accomplished
by setting and clearing the DCFI bit in two consecutive store operations.
3.2.3.2 Data Cache Disabling
The data cache may be disabled through the use of the data cache enable (DCE) control bit
in the HID0 register. When the data cache is in the disabled state, the cache tag state bits
are ignored, and all accesses are propagated to the bus as single-beat transactions. The DCE
bit is cleared on power-up, causing the data cache to be disabled. 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.
Note that while snooping is not performed when the data cache is disabled, cache
operations (caused by the
dcbz
,
dcbf
,
dcbst
, and
dcbi
instructions) are not affected by
disabling the cache, causing potential coherency errors. An example of this would be a
dcbf
instruction that hits a modified cache block in the disabled cache, causing a copyback to
memory of potentially stale data.
Regardless of the state of HID0[DCE], load and store operations are assumed to be weakly
ordered. Thus the LSU can perform load operations that occur later in the program ahead
of store operations, even when the data cache is disabled. However, strongly ordered load
and store operations can be enforced through the setting of the I bit (of the page WIMG bits)
when address translation is enabled. Note that when address translation is disabled, the
default WIMG bits cause the I bit to be cleared (accesses are assumed to be cacheable), and
thus the accesses are weakly ordered. Refer to Section 3.5.2, “Caching-Inhibited Attribute
(I),” for a description of the operation of the I bit and Section 5.2, “Real Addressing Mode,”
for a description of the WIMG bits when address translation is disabled.
3.2.3.3 Data Cache Locking
The contents of the data cache may be locked through the use of the DLOCK control bit in
the HID0 register. A locked data cache supplies data normally on a cache hit, but cache
misses are treated as cache-inhibited accesses. The cache inhibited (CI) signal is asserted if