Locking Entries - Intel XScale Core Developer's Manual

Table of Contents

Advertisement

3.4.3

Locking Entries

Individual entries can be locked into the instruction and data TLBs. See
Lockdown Functions" on page 7-90
address translation already resident in the TLB, the results are unpredictable. An invalidate by
entry command before the lock command will ensure proper operation. Software can also
accomplish this by invalidating all entries, as shown in
Locking entries into either the instruction TLB or data TLB reduces the available number of entries (by
the number that was locked down) for hardware to cache other virtual to physical address translations.
A procedure for locking entries into the instruction TLB is shown in
If a MMU abort is generated during an instruction or data TLB lock operation, the Fault Status
Register is updated to indicate a Lock Abort (see
the exception is reported as a data abort.
Example 3-2. Locking Entries into the Instruction TLB
; R1, R2 and R3 contain the virtual addresses to translate and lock into
; the instruction TLB.
; The value in R0 is ignored in the following instruction.
; Hardware guarantees that accesses to CP15 occur in program order
MCR P15,0,R0,C8,C5,0
MCR P15,0,R1,C10,C4,0 ; Translate virtual address (R1) and lock into
MCR P15,0,R2,C10,C4,0 ; Translate
MCR P15,0,R3,C10,C4,0 ; Translate virtual address (R3) and lock into
CPWAIT
; The MMU is guaranteed to be updated at this point; the next instruction will
; see the locked instruction TLB entries.
Note: If exceptions are allowed to occur in the middle of this routine, the TLB may end up caching a
translation that is about to be locked. For example, if R1 is the virtual address of an interrupt
service routine and that interrupt occurs immediately after the TLB has been invalidated, the lock
operation will be ignored when the interrupt service routine returns back to this code sequence.
Software should disable interrupts (FIQ or IRQ) in this case.
As a general rule, software should avoid locking in all other exception types.
Developer's Manual
Intel XScale® Core Developer's Manual
for the exact commands. If a lock operation finds the virtual
Section 2.3.4.4, "Data Aborts" on page
; Invalidate the entire instruction TLB
; instruction TLB
; virtual address (R2) and lock into instruction TLB
; instruction TLB
January, 2004
Memory Management
Table 7-14, "Cache
Example 3-2 on page
3-43.
Example 3-2 on page
3-43.
2-34), and
43

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the XScale Core and is the answer not in the manual?

Table of Contents