]> git.baikalelectronics.ru Git - kernel.git/commit
ARM: 8849/1: NOMMU: Fix encodings for PMSAv8's PRBAR4/PRLAR4
authorVladimir Murzin <vladimir.murzin@arm.com>
Wed, 20 Feb 2019 14:00:53 +0000 (15:00 +0100)
committerRussell King <rmk+kernel@armlinux.org.uk>
Tue, 26 Feb 2019 11:35:56 +0000 (11:35 +0000)
commita578a9433b32ef2b8476b76555f4cb57f51db7a6
tree5b5d71c63902a8ce3dd318371f7ded6364b947c3
parent488158059d9952a66ed7c5722ab67316d6c2b703
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: 9ba49672cdb6be1124130654b7e696b979c0f7c3 ("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>
arch/arm/kernel/head-nommu.S