Silver
Fri Jun 13 15:44:53 PDT 2008
Grab the ARM920 core manual (from arm.com) and you will find the
instructions for manipulating cache. You will need to know how your cache
architecture is setup, that is lines/ways/tagging type. You will need to use
assembler routines to do that.
http://infocenter.arm.com/help/topic/com.arm.doc.ddi0151c/ARM920T_TRM1_S.pdf
Your cache is most likely 4 ways, 32 bytes per line, physically tagged.
Register 7 is for cache operations reg, and reg 9 is for locking it.
"Example 2.2. Load a cache line into DCache line 0 and lock it down
MCR to CP15 register 9, opcode_2 = 0x0, Victim=Base=0x0
Data load (LDR/LDM). Assuming the DCache misses, a linefill occurs to line
0.
MCR to CP15 register 9, opcode_2 = 0x0, Victim=Base=0x1
More DCache linefills now occur into lines 1-63."
Do not forget to undo the locks when you are done.
Note that using a profiler will have a side effect of hitting the cache to
run the profiler code, to be careful with those reults.
That said:
I very much doubt that you will see much improvement unless you are *very*
careful.
Silver
--