13.5.4 CP15 Register Access

CP15 registers can only be accessed in privileged mode by:

  • MCR (Move to Coprocessor from ARM Register) instruction is used to write an ARM register to CP15.
  • MRC (Move to ARM Register from Coprocessor) instruction is used to read the value of CP15 to an ARM register.

Other instructions such as CDP, LDC, STC can cause an undefined instruction exception.

The assembler code for these instructions is:

MCR/MRC{cond} p15, opcode_1, Rd, CRn, CRm, opcode_2

The MCR/MRC instructions bit pattern is shown below:

Bit3130292827262524
cond1110
Bit2322212019181716
opcode_1LCRn
Bit15141312111098
Rd1111
Bit76543210
opcode_21CRm

• CRm[3:0]: Specified Coprocessor Action

Determines specific coprocessor action. Its value is dependent on the CP15 register used. For details, see CP15 specific register behavior.

• opcode_2[7:5]

Determines specific coprocessor operation code. By default, set to 0.

• Rd[15:12]: ARM Register

Defines the ARM register whose value is transferred to the coprocessor. If R15 is chosen, the result is unpredictable.

• CRn[19:16]: Coprocessor Register

Determines the destination coprocessor register.

• L: Instruction Bit

0: MCR instruction

1: MRC instruction

• opcode_1[23:20]: Coprocessor Code

Defines the coprocessor specific code. Value is c15 for CP15.

• cond [31:28]: Condition