Skip to content

Commit d410a8a

Browse files
murzinvRussell King
authored andcommitted
ARM: 8849/1: NOMMU: Fix encodings for PMSAv8's PRBAR4/PRLAR4
To access PRBARn, where n is referenced as a binary number: MRC p15, 0, <Rt>, c6, c8+n[3:1], 4*n[0] ; Read PRBARn into Rt MCR p15, 0, <Rt>, c6, c8+n[3:1], 4*n[0] ; Write Rt into PRBARn To access PRLARn, where n is referenced as a binary number: MRC p15, 0, <Rt>, c6, c8+n[3:1], 4*n[0]+1 ; Read PRLARn into Rt MCR p15, 0, <Rt>, c6, c8+n[3:1], 4*n[0]+1 ; Write Rt into PRLARn For PR{B,L}AR4, n is 4, n[0] is 0, n[3:1] is 2, while current encoding done with n[0] set to 1 which is wrong. Use proper encoding instead. Fixes: 046835b ("ARM: 8757/1: NOMMU: Support PMSAv8 MPU") Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
1 parent ca70ea4 commit d410a8a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

arch/arm/kernel/head-nommu.S

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -439,8 +439,8 @@ M_CLASS(str r6, [r12, #PMSAv8_RLAR_A(3)])
439439
str r5, [r12, #PMSAv8_RBAR_A(0)]
440440
str r6, [r12, #PMSAv8_RLAR_A(0)]
441441
#else
442-
mcr p15, 0, r5, c6, c10, 1 @ PRBAR4
443-
mcr p15, 0, r6, c6, c10, 2 @ PRLAR4
442+
mcr p15, 0, r5, c6, c10, 0 @ PRBAR4
443+
mcr p15, 0, r6, c6, c10, 1 @ PRLAR4
444444
#endif
445445
#endif
446446
ret lr

0 commit comments

Comments
 (0)