3.3.22. c10, TLB Lockdown Register

The purpose of the TLB Lockdown Register is to control where hardware page table walks place the TLB entry in either:

See TLB organization for a description of the structure of the TLB. The lockdown region of the TLB contains eight entries, numbered from 0 to 7.

The TLB Lockdown Register is:

Figure 3.48 shows the arrangement of bits in the register.

Figure 3.48. TLB Lockdown Register format

Table 3.99 shows the bit functions of the TLB Lockdown Register.

Table 3.99. TLB Lockdown Register bit functions

Bit rangeField nameFunction

[31:29]

-

UNP/SBZ.

[28:26]Victim

Specifies the entry in the lockdown region where a subsequent hardware page table walk can place a TLB entry.

The Victim value defines the Lockdown region for the TLB entry. Allowed values are 0-7.

The reset value is 0.

[25:1]

-

UNP/SBZ.

[0]

P

Preserve bit. Determines if subsequent hardware page table walks place a TLB entry in the lockdown region or in the set associative region of the TLB.

0 = Place the TLB entry in the set associative region of the TLB. This is the reset value.

1 = Place the TLB entry in the lockdown region of the TLB as defined by the Victim bits [28:26].

TLB entries in the lockdown region are preserved:

See c8, TLB Operations Register (invalidate TLB operation) for a description of the TLB invalidate operations.

The victim automatically increments after any table walk that results in an entry being written into the lockdown part of the TLB.

Accessing the TLB Lockdown Register

Table 3.100 shows the results of attempted accesses to the TLB Lockdown Register for each mode.

Table 3.100. Results of accesses to the Data TLB Lockdown Register

Privileged readPrivileged writeUser read or write
Data readData writeUndefined exception

To access the TLB Lockdown Register you read or write CP15 with:

  • Opcode_1 set to 0

  • CRn set to c10

  • CRm set to c0

  • Opcode_2 set to 0.

For example:

MRC p15, 0, <Rd>, c10, c0, 0            ; Read TLB Lockdown Register
MCR p15, 0, <Rd>, c10, c0, 0            ; Write TLB Lockdown Register.

Example 3.3 is a code sequence that locks down an entry to the current victim.

Example 3.3. Lock down an entry to the current victim

ADR r1,LockAddr         ; set r1 to the value of the address to be locked down
MCR p15,0,r1,c8,c7,1    ; invalidate TLB single entry to ensure that
                        ; LockAddr is not already in the TLB
MRC p15,0,r0,c10,c0,0   ; read the lockdown register
ORR r0,r0,#1            ; set the preserve bit
MCR p15,0,r0,c10,c0,0   ; write to the lockdown register
LDR r1,[r1]             ; TLB will miss, and entry will be loaded
MRC p15,0,r0,c10,c0,0   ; read the lockdown register (victim will have
                        ; incremented)
BIC r0,r0,#1            ; clear preserve bit
MCR p15,0,r0,c10,c0,0   ; write to the lockdown register
Copyright © 2002-2006 ARM Limited. All rights reserved.ARM DDI 0211I
Non-Confidential