Atmel ARM-Based Evaluation Kit AT91SAM9N12-EK AT91SAM9N12-EK Data Sheet

Product codes
AT91SAM9N12-EK
Page of 248
Programmer’s Model 
ARM DDI0198D
Copyright © 2001-2003 ARM Limited. All rights reserved.
2-33
Note
 It is not possible for a lockdown entry to entirely map either small or large pages, unless 
all the subpage access permissions are identical. Entries can still be written into the 
lockdown region, but the address range that is mapped only covers the subpage 
corresponding to the address that was used to perform the page table walk.
Example 2-1 is a code sequence that locks down an entry to the current victim.
Example 2-1 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
2.3.12
Register c11 and c12
Accessing (reading or writing) these registers causes Unpredictable behavior.
2.3.13
Process ID Register c13
Register c13 accesses the process identifier registers. The register accessed depends on 
the value of the Opcode_2 field:
Opcode_2 = 0 
Selects the Fast Context Switch Extension (FCSE) Process 
Identifier
 (PID) Register.
Opcode_2 = 1 
Selects the Context ID Register.
You can use the process ID register to determine the process that is currently running. 
The process identifier is set to 0 at reset.