
Caches and Write Buffer
4-10
Copyright 1999, 2000 ARM Limited. All rights reserved.
ARM DDI 0144B
4.3.4
DCache validity
The ARM940T does not support memory translation so the data in the DCache can
always be considered valid within the context of the ARM940T. However, if external
memory translation is used, and the mappings are changed, the DCache data is no
longer consistent with external memory, and the DCache must be flushed by the
programmer.
The ARM940T does not support external memory snooping. Any shared data memory
space therefore, must not be cachable. Additionally, if the data protection regions are
reprogrammed, data already in the cache might now be in a noncachable region, and the
cache must be flushed.
4.3.5
DCache clean and flush
The DCache has flexible cleaning and flushing utilities that allow the following
operations:
The whole DCache can be invalidated (
flush DCache
) in one operation without
writing back dirty data.
Individual lines can be invalidated without writing back any dirty data (
flush
DCache single entry
).
Cleaning can be performed on a line-by-line basis. The data is only written back
through the write buffer when a dirty line is encountered, and the cleaned line
remains in the cache (
clean DCache single entry
).
Individual lines can be cleaned and flushed in one operation (
clean and flush
DCache single entry
).
Note
Flushing the entire DCache also flushes any locked down code, without resetting the
victim counter range.
The cleaning and flushing utilities are performed using CP15 register 7, in a similar
manner to that described in
ICache
on page 4-5 for ICache. The format of Rd
transferred to CP15 is as shown in Figure 4-2 on page 4-3 for all register 7 operations.
It is usual for the cache to be cleaned before being flushed, so that external memory is
updated with any dirty data. Example 4-1 on page 4-11 shows how the entire cache can
be cleaned and flushed: