Locking Instructions In The Instruction Cache; Locked Line Effect On Round Robin Replacement - Intel PXA255 User Manual

Xscale microarchitecture
Hide thumbs Also See for PXA255:
Table of Contents

Advertisement

Instruction Cache
4.3.4

Locking Instructions in the Instruction Cache

Software has the ability to lock performance critical code routines into the instruction cache. Up to
28 lines in each set can be locked; hardware will ignore the lock command if software is trying to
lock all the lines in a particular set i.e. ways 28-31 can never be locked. When this happens, the line
will still be allocated into the cache but the lock will be ignored. The round-robin pointer will stay
between way 28 and way 31 for that set.
Lines can be locked into the instruction cache by initiating a write to coprocessor 15. See
Table 7-14, "Cache Lockdown Functions" on page 7-11
Lines are locked into a set starting at way 0 and may progress up to way 27; which set a line gets
locked into depends on the set index of the virtual address.
of code may be locked into the cache along with how the round-robin pointer is affected.
There are several requirements for locking down code. Failure to follow these requirements will
produce unpredictable results when accessing the instruction cache.
the routine used to lock lines down in the cache must be placed in non-cacheable memory,
which means the MMU is enabled. Hence fetches of cacheable code must not occur while
locking instructions into the cache.
the code being locked into the cache must be cacheable.
the instruction cache must be enabled and invalidated prior to locking down lines.
Note: Exceptions must be disabled during cache locking, to prevent the wrong contents from being
locked down.
System programmers must ensure that the code to lock instructions into the cache is not closer than
128 bytes to a non-cacheable/cacheable page boundary. If the processor fetches ahead into a
cacheable page, then the first requirement noted above could be violated
Figure 4-2. Locked Line Effect on Round Robin Replacement
4-6
set 0: 8 ways locked, 24 ways available for round robin replacement
set 1: 23 ways locked, 9 ways available for round robin replacement
set 2: 28 ways locked, only way28-31 available for replacement
set 31: all 32 ways available for round robin replacement
set 0
set 1
way 0
way 1
way 7
way 8
way 22
way 23
way 30
way 31
for the exact command.
Figure 4-2
is an example of where lines
...
set 2
Intel® XScale™ Microarchitecture User's Manual
set 31

Advertisement

Table of Contents
loading

Table of Contents