Cache
6-26
Freescale Semiconductor
In many applications where data is shared among bus masters, the performance of the software function
to push and/or clear specific lines from the data cache is important. Previously, this function was
implemented using a CPUSHL loop that explicitly referenced all four ways in each cache set. By
referencing all possible cache entries that might contain the targeted address range, it is guaranteed that
the cache data of interest is referenced. It also has the unfortunate side-effect of potentially
pushing/clearing other data that happened to be mapped into the targeted cache entries.
For the enhanced CPUSHL functionality, a higher-performance version of this function is possible using
a physical address range and a simpler search loop. The enhanced CPUSHL instruction also affects only
the specific cache lines being referenced and does not change the state of any other cache entries.
The specific variation of the CPUSHL instruction used to operate only on the data cache:
cpushl dc, (ax)
where
dc
specifies the data cache, and
ax
is the cache set address and way number for the baseline
CPUSHL functionality or
ax
is the physical address for the enhanced CPUSHL.
For the enhanced implementations, the specific operation performed by the CPUSHL instruction is defined
by the state of four CACR bits. See
Table 6-10. Enhanced CPUSHL Functionality
Instruction
CACR Bits
Description
[14]
SPA
[20]
IVO
[28]
DDPI
[12]
IDPI
Search by...
Action
cpushl bc,(ax)
0
0
0
0
Cache address/way
Clear both
cpushl bc,(ax)
0
0
0
1
Cache address/way
Clear data
cpushl bc,(ax)
0
0
1
0
Cache address/way
Push data, clear instruction
cpushl bc,(ax)
0
0
1
1
Cache address/way
Push data
cpushl bc,(ax)
0 1
–
–
Cache
address/way
Invalidate
both
cpushl bc,(ax)
1
0
0
0
Physical address
Clear both
cpushl bc,(ax)
1
0
0
1
Physical address
Clear data
cpushl bc,(ax)
1
0
1
0
Physical address
Push data, clear instruction
cpushl bc,(ax)
1
0
1
1
Physical address
Push data
cpushl bc,(ax)
1
1
–
–
Physical address
Invalidate both
cpushl dc,(ax)
0
0
0
–
Cache address/way
Clear data
cpushl dc,(ax)
0
0
1
–
Cache address/way
Push data
cpushl dc,(ax)
0
1
–
–
Cache address/way
Invalidate data
cpushl dc,(ax)
1
0
0
–
Physical address
Clear data
cpushl dc,(ax)
1
0
1
–
Physical address
Push data
cpushl dc,(ax)
1
1
–
–
Physical address
Invalidate data
cpushl ic,(ax)
0
0
–
0
Cache address/way
Clear instruction
Summary of Contents for MCF54455
Page 33: ...xxviii Freescale Semiconductor ...
Page 67: ...Freescale Semiconductor 1 ...
Page 125: ...Freescale Semiconductor 1 ...
Page 145: ...Enhanced Multiply Accumulate Unit EMAC 5 21 Freescale Semiconductor ...
Page 173: ...Cache 6 28 Freescale Semiconductor ...
Page 179: ...Static RAM SRAM 7 6 Freescale Semiconductor ...
Page 207: ...Power Management 9 16 Freescale Semiconductor ...
Page 323: ...Reset Controller Module 13 8 Freescale Semiconductor ...
Page 389: ...Pin Multiplexing and Control 16 44 Freescale Semiconductor ...
Page 575: ...PCI Bus Controller 22 58 Freescale Semiconductor ...
Page 600: ...Advanced Technology Attachment ATA Freescale Semiconductor 23 25 ...
Page 601: ...Freescale Semiconductor 1 ...
Page 842: ...I2 C Interface Freescale Semiconductor 33 16 ...
Page 843: ...Freescale Semiconductor 1 ...
Page 921: ...Revision History A 6 Freescale Semiconductor ...