R11 and r12 registers, R13:process id register, Programming instructions sample code sequence – Digi NS9215 User Manual

Page 102: R11 and r12 registers r13:process id register

Advertising
background image

W O R K I N G W I T H T H E C P U

R11 and R12 registers

102

Hardware Reference NS9215

Programming
instructions

Use these instructions to program the TLB Lockdown register:

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

Note:

It is not possible for a lockdown entry to map entirely either small or large
pages, unless all subpage access permissions are the same. Entries can still be
written into the lockdown region, but the address range that is mapped
covers only the subpage corresponding to the address that was used to
perform the page table walk.

Sample code
sequence

This example shows the code sequence that locks 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

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

R 1 1 a n d R 1 2 r e g i s t e r s

Accessing (reading or writing) these registers causes

UNPREDICTABLE

behavior.

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

R 1 3 : P r o c e s s I D r e g i s t e r

The Process ID register accesses the process identifier registers. The register
accessed depends on the value on the

opcode_2

field:

Function

Instruction

Read data TLB lockdown victim

MRC p15, 0, Rd, c10, c0, 0

Write data TLB lockdown victim

MCR p15, 0, Rd, c10, c0, 0

opcode_2=0

Selects the Fast Context Switch Extension (FCSE) Process Identifier (PID)
register.

Advertising