2012/11/18

[ARM] coprocessor CP15 - system control coprocessor


Purpose

Cortex-A8 Technical Reference Manual Revision: r3p2 3.1. About the system control coprocessor

The purpose of the system control coprocessor, CP15, is to control and provide status information for the functions implemented in the processor. The main functions of the system control coprocessor are:
  • overall system control and configuration
  • cache configuration and management
  • Memory Management Unit (MMU) configuration and management
  • preloading engine for L2 cache
  • system performance monitoring.


Instruction

mcr{cond} p15, <opcode_1>, <rd>, <CRn>, <CRm>, <opcode_2>
mrc{cond} p15, <opcode_1>, <rd>, <CRn>, <CRm>, <opcode_2>

Following the order, CRn -> Op1 -> CRm -> Op2, to look up the entry of target register in manual.


Cortex-A15 MPCore Technical Reference Manual Revision: r3p2 4.2. Register summary

Table 4.1. Column headings definition for CP15 register summary tables
Column nameDescription
CRnRegister number within the system control coprocessor
Op1Opcode_1 value for the register
CRmOperational register number within CRn
Op2Opcode_2 value for the register
NameShort form architectural, operation, or code name for the register
ResetReset value of register
DescriptionCross-reference to register description



Catagory




FunctionCP15 Registers
System Configurationc0
System Controlc1
Translation Base Controlc2
Domain Access Controlc3
Faultsc5/c6
Cache Operationsc7
TLB Operationsc8/c10
Performance Monitorc9
L2 Controlc9
Pre-load Enginec11
Interruptsc12
Process IDc13
Memory Arraysc15


Table 4.3. c1 register summary
Op1CRmOp2NameResetDescription
0c00SCTLR0x00C50078[a]
1ACTLR
0x00000000
2CPACR0x00000000[b]
....



The mapping is c1 -> 0 -> c0 -> to access System Control Register.

mcr p15, 0, rX, c1, c0, 0  : write arm to coprocessor , rX -> {c1, 0, c0, 0}
mrc p15, 0, rX, c1, c0, 0  : read coprocessor to arm , {c1, 0, c0, 0} -> rX





沒有留言:

張貼留言