Epson ARM720T Core Cpu Manual page 197

Revision 4 (amba ahb bus interface version)
Table of Contents

Advertisement

Example 11-2 shows sample code for performing software test of the MMU. It contains typical
operations with C15.M.
; MMU write, read and check for CAM, RAM1 and RAM2
; Load victim pointer with 0
MOV r0,#0
MCR p15,0,r0,c10,c0,0
; Write pattern 0x5A5A5A50 in CAM
; Write pattern 0x0025A5A5 in RAM1
; Write pattern 0xF0F0F0C0 in RAM2
LDR r2,=0x5A5A5A50
LDR r3,=0x0025A5A5
LDR r4,=0xF0F0F0C0
MOV r5,#64
; Write all 64 lines
loop0
MCR p15,4,r2,c15,c7,0
MCR p15,4,r3,c15,c11,0
MCR p15,4,r4,c15,c3,1
SUBS r5,r5,#1
BNE loop0
; Now read and check
; Reset victim pointer
MOV r0,#0
MCR p15,0,r0,c10,c0,0
MOV r8,#64
loop1
MCR p15,4,r5,c15,c7,4
MRC p15,4,r5,c15,c3,6
MCR p15,4,r6,c15,c11,4
MRC p15,4,r6,c15,c3,6
BIC r5,r5,#0x01c00000
MCR p15,4,r7,c15,c3,5
MRC p15,4,r7,c15,c3,6
CMP r5,r2
CMPEQ r6,r3
CMPEQ r7,r4
BNE TEST_FAIL
SUBS r8,r8,#1
BNE loop1
B TEST_PASS
ARM720T CORE CPU MANUAL
Example 11-2 MMU test operations
; write CAM
; write RAM1
; write RAM2, pointer auto-incremented here
; read CAM to C15.M
; read C15.M to R5
; read RAM1 to R6
; mask fault/miss bits
; read RAM2 to R7
EPSON
11: Test Support
11-13

Advertisement

Table of Contents
loading

Table of Contents