![](http://datasheet.mmic.net.cn/290000/XPC801ZP25_datasheet_16187868/XPC801ZP25_173.png)
Data Cache
10-10
MPC801 USER’S MANUAL
MOTOROLA
10
10.4.5 Data Cache Coherency
The MPC801 data cache provides no support for snooping external bus activity. All
coherency between the internal caches and memory/devices external to the extended core
must be controlled by the software. In addition, there is no mechanism provided for DMA or
other internal masters to access the data cache directly.
10.5 CONTROLLING THE DATA CACHE
10.5.1 Flushing and Invalidating
The MPC801 allows the software to explicitly flush and/or invalidate entries in the data
cache. The data cache can be invalidated by writing unlock all and invalidate all
to the DC_CST register. The data cache is not automatically invalidated on reset. It must be
invalidated under software control. The data cache can be flushed by a software loop using
the
dcbst
or
dcbf
instructions or the implementation-specific data cache
command. Notice that the PowerPC architecture instructions flush a line indexed by the
address it represents, while the implementation-specific command indexes a line by its
physical location within the data cache.
commands
flush
cache line
When flushing must be restricted to a specific memory area or the architecture must be
compliant, using the PowerPC architecture instructions is recommended. However, if the
entire data cache must be flushed and there is no concern for compatibility, the
implementation-specific command is more efficient. If a bus error occurs while executing the
dcbf
and
dcbst
instructions or the flush cache line implementation-specific command, the
data of the cache line specified by these operations must be retrieved from the copyback
data register rather than from the data cache array.
10.5.2 Disabling
The data cache can be enabled or disabled by using data cache
disable written to the DC_CST register. In the disabled state, the cache tag state bits are
ignored and all accesses are propagated to the bus as single beat transactions. The default
after the reset state of the data cache is disabled. Disabling the data cache does not affect
the data address translation logic and translation is still controlled by the MSR
write to the DC_CST register must be preceded by a
data cache from being disabled or enabled in the middle of a data access. When the data
cache generates an interrupt as a result of a bus error on the copyback or
implementation-specific flush cache line command, it enters the disable state. Operation of
the cache when it is disabled is similar to cache-inhibit operation.
enable and data cache
DR
bit. Any
sync
instruction. This prevents the
10.5.3 Locking
Each line of the data cache can be independently locked by using the lock line command
written to the DC_CST register, but replacement line fills are not performed to a locked line.
A flush or invalidation of a locked line cache is ignored by the data cache. Any write to the
DC_CST register must be preceded by a
sync
instruction, which prevents a cache from
being locked during a line fill.