6.2.2.4
Protecting TLB Entries
Figure 33.
TLB Entry Lock Mechanism
SPRU890A
3) Select the TLB entry to be written by setting the victim pointer through the
Lock/Protect Entry Register (LOCK_REG). For example, to update entry
0 in the TLB, write 0 to the victim pointer field of LOCK_REG.
4) Set the WRITE_ENTRY bit in the Read/Write TLB Entry Register
(LD_TLB_REG).
5) Enable the table walking logic by setting the TWL_EN bit in the Control
Register (CNTL_REG). This step can be omitted if the table walking logic
is not used.
Section 6.5 gives detailed descriptions of all TLB control registers.
The first n TLB entries (with n < 32) can be protected, or locked, against being
overwritten with new translations retrieved by the table walking logic. This is
done by setting the TLB base pointer to n (see Figure 33). The remaining
entries are overwritten, if necessary, on a random basis. The victim pointer
indicates the next TLB entry to be read/written.
Victim pointer = 30
Base pointer = 3
Locking TLB entries ensures that certain commonly used or time-critical
translations are always in the TLB and do not have to be retrieved via the table
walking process.
To protect the first n TLB entries, follow these steps:
1) Disable the table walking logic by clearing the TWL_EN bit in the Control
Register (CNTL_REG).
2) Set the base pointer field in the Lock/Protect Entry Register (LOCK_REG)
to n, and set the current victim pointer (also in the Lock/Protect Entry
Register) to a value equal to or greater than n. For example, to protect
DSP Memory Management Unit
TLB
Entry 31
Entries 3...31 can be
Entry 3
Entry 2
Entry 1
Entries 0,1, and 2 are
Entry 0
DSP Subsystem
overwritten
locked
77