| |||
| Home > System Control Coprocessor > System control coprocessor registers > c15, L2 data array operations | |||
The purpose of the L2 data array operations is to:
read the L2 data array contents and write into the system debug data registers
write into the system debug data registers and copy into the L2 data array.
The L2 data array operation is accessible in secure privileged modes only. You can determine the value of N in Figure 3.88 and Figure 3.89 from Table 3.163.
Figure 3.88 shows the bit arrangement of the L2 data RAM array read operation.
Figure 3.89 shows the bit arrangement of the L2 data RAM array write operation.
To write one entry to the L2 data RAM array, for example:
LDR R0, =0x01234567;
MCR p15, 0, R0, c15, c8, 0; Move R0 to L2 Data 0 Register
LDR R0, =0x89ABCDEF;
MCR p15, 0, R0, c15, c8, 1; Move R0 to L2 Data 1 Register
LDR R0, =0x00000001;
MCR p15, 0, R0, c15, c8, 5; Move R0 to L2 Data 2 Register
LDR R1, =0x400000C8;
MCR p15, 0, R1, c15, c8, 3; Write L2 Data 0-2 Registers to L2 data RAM
To read one entry from the L2 data RAM array, for example:
LDR R1, =0x400000C8;
MCR p15, 0, R1, c15, c9, 3; Read L2 data RAM into L2 Data 0-2 Registers
MRC p15, 0, R2, c15, c8, 0; Move L2 Data 0 Register to R2
MRC p15, 0, R3, c15, c8, 1; Move L2 Data 1 Register to R3
MRC p15, 0, R4, c15, c8, 5; Move L2 Data 2 Register to R4