
MOTOROLA
Chapter 4. Instruction and Data Cache Operation
For More Information On This Product,
Go to: www.freescale.com
4-7
Data Cache Organization and Control
4.3.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. To prevent the cache from
being enabled or disabled in the middle of a data access, a
sync
instruction should be issued
before changing the value of DCE.
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 copy back to
memory of potentially stale data.
NOTE
The
dcbi
instruction should never be used on the G2 core.
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 4.6.2, “Caching-Inhibited Attribute
(I),” for a description of the operation of the I bit and Section 6.2, “Real Addressing Mode,”
for a description of the WIMG bits when address translation is disabled.
4.3.3.3
Data Cache Locking
The contents of the data cache may be locked through the HID0[DLOCK]. A locked data
cache supplies data normally on a cache hit, but cache misses are treated as cache-inhibited
accesses. The cache-inhibited (core_ci) signal is asserted if a cache access misses into a
locked cache. The setting of DLOCK must be preceded by a
sync
instruction to prevent the
cache from being locked during an access.
Note that the G2 core also provides instruction cache way-locking in addition to entire data
cache locking as described in Section 4.12, “Cache Locking.”
4.3.3.4
Data Cache Operations and Address Broadcasts
Executing a
dcbz
instruction generates an address-only broadcast on the bus. Additionally,
if HID0[ABE] is set on a G2 core processor, the execution of the
dcbf
,
dcbi
, and
dcbst
instructions also causes an address-only broadcast. The ability of the G2 core to optionally
perform address-only broadcasts when executing the
dcbi
,
dcbf
, and
dcbst
instructions
F
Freescale Semiconductor, Inc.
n
.