diff mbox

[RFC,09/21] target-arm: adjust SCR CP15 register access rights

Message ID 1386060535-15908-10-git-send-email-s.fedorov@samsung.com
State New
Headers show

Commit Message

Sergey Fedorov Dec. 3, 2013, 8:48 a.m. UTC
SCR register is accessible in PL3 (secure privileged) mode only. Fix SRC
access rights since arm_current_pl() can return PL3 now.

Signed-off-by: Sergey Fedorov <s.fedorov@samsung.com>
---
 target-arm/helper.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

diff --git a/target-arm/helper.c b/target-arm/helper.c
index e406ec9..3bd0a64 100644
--- a/target-arm/helper.c
+++ b/target-arm/helper.c
@@ -1530,7 +1530,7 @@  static int vbar_write(CPUARMState *env, const ARMCPRegInfo *ri,
 static const ARMCPRegInfo tz_cp_reginfo[] = {
 #ifndef CONFIG_USER_ONLY
     { .name = "SCR", .cp = 15, .crn = 1, .crm = 1, .opc1 = 0, .opc2 = 0,
-      .access = PL1_RW, .fieldoffset = offsetof(CPUARMState, cp15.c1_scr),
+      .access = PL3_RW, .fieldoffset = offsetof(CPUARMState, cp15.c1_scr),
       .resetvalue = 0 },
     { .name = "VBAR", .cp = 15, .crn = 12, .crm = 0, .opc1 = 0, .opc2 = 0,
       .access = PL1_RW, .writefn = vbar_write,