
MOTOROLA
Chapter 4. Instruction and Data Cache Operation
For More Information On This Product,
Go to: www.freescale.com
4-33
Cache Locking
4.12.3 Performing Cache Locking
This section outlines the basic procedures for locking the data and instruction caches and
provides some example code for locking the caches. The procedures for the data cache are
described first, followed by the corresponding sections for locking the instruction cache.
The basic procedures for cache locking are:
Enabling the cache
Enabling address translation for example code
Table 4-10. HID0 Bits Used to Perform Cache Locking
Bits
Name
Description
16
ICE
Instruction cache enable. This bit must be set for instruction cache locking. See
Section 4.12.3.1.1, “Enabling the Data Cache.”
17
DCE
Data cache enable. This bit must be set for data cache locking. See
Section 4.12.3.1.1, “Enabling the Data Cache.”
18
ILOCK
Instruction cache lock. Set to lock the entire instruction cache. See
Section 4.12.3.2.5, “Entire Instruction Cache Locking.”
19
DLOCK
Data cache lock. Set to lock the entire data cache. See Section 4.12.3.1.6, “Entire
Data Cache Locking.”
20
ICFI
Instruction cache flash invalidate. Setting and then clearing this bit invalidates the
entire instruction cache. See Section 4.12.3.2.7, “Invalidating the Instruction Cache
(Even if Locked).”
21
DCFI
Data cache flash invalidate. Setting and then clearing this bit invalidates the entire
data cache. See Section 4.12.3.1.4, “Invalidating the Data Cache.”
Table 4-11. HID2 Bits Used to Perform Cache Way-Locking
Bits
Name
Description
16–18
IWLCK
Instruction cache way-lock. These bits are used to lock individual ways in the
instruction cache. See Section 4.12.3.2.6, “Instruction Cache Way-Locking.”
24–26
DWLCK
Data cache way-lock. These bits are used to lock individual ways in the data cache.
See Section 4.12.3.1.7, “Data Cache Way-Locking.”
Table 4-12. MSR Bits Used to Perform Cache Locking
Bits
Name
Description
16
EE
External interrupt enable. This bit must be cleared during instruction and data cache
loading. See Section 4.12.3.1.3, “Disabling Exceptions for Data Cache Locking.”
19
ME
Machine check enable. This bit must be cleared during instruction and data cache
loading. See Section 4.12.3.1.3, “Disabling Exceptions for Data Cache Locking.”
26
IR
Instruction address translation. This bit must be set to enable instruction address
translation by the MMU. See Section 4.12.3.1.2, “Address Translation for Data
Cache Locking.”
27
DR
Data address translation. This bit must be set to enable data address translation by
the MMU. See Section 4.12.3.1.2, “Address Translation for Data Cache Locking.”
F
Freescale Semiconductor, Inc.
n
.