arch-arm: Adding MiscReg Priv (EL1) global flag
authorGiacomo Travaglini <giacomo.travaglini@arm.com>
Mon, 18 Dec 2017 15:06:51 +0000 (15:06 +0000)
committerGiacomo Travaglini <giacomo.travaglini@arm.com>
Wed, 18 Apr 2018 14:42:22 +0000 (14:42 +0000)
This patch introduces a single global flag for setting RW access
permission at EL1 level, in either secure and non-secure mode.

Change-Id: I35df66a73349044ca996b5c04c5a2476f3a7abdf
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-by: Curtis Dunham <curtis.dunham@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/10042
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

src/arch/arm/isa.hh

index c10a88a3791431234f445282e46c749a061ef860..c8ae5c22ded0ede090ef9d7f838926c112d675a9 100644 (file)
@@ -199,6 +199,11 @@ namespace ArmISA
                 info[MISCREG_PRI_NS_WR] = v;
                 return *this;
             }
+            chain privNonSecure(bool v = true) const {
+                privNonSecureRead(v);
+                privNonSecureWrite(v);
+                return *this;
+            }
             chain privSecureRead(bool v = true) const {
                 info[MISCREG_PRI_S_RD] = v;
                 return *this;
@@ -212,6 +217,11 @@ namespace ArmISA
                 privSecureWrite(v);
                 return *this;
             }
+            chain priv(bool v = true) const {
+                privSecure(v);
+                privNonSecure(v);
+                return *this;
+            }
             chain hypRead(bool v = true) const {
                 info[MISCREG_HYP_RD] = v;
                 return *this;