Giacomo Travaglini has submitted this change and it was merged. ( https://gem5-review.googlesource.com/6201 )

Change subject: arm: Enable ns registers access in secure mode
......................................................................

arm: Enable ns registers access in secure mode

Arm security extension introduced register banking between secure and
non-secure mode. This has been removed in armv8 using AArch64 in EL3,
where the decoded register is by default the non-secure version. Using
non-secure register infos(flags) was preventing secure execution to
access the register with the MRC/MCR at EL1.
The patch updates the following banked registers' flags so that their
non-secure version can be accessed in secure mode:

MISCREG_CSSELR, MISCREG_SCTLR, MISCREG_ACTLR, MISCREG_TTBR0,
MISCREG_TTBR1, MISCREG_TTBCR, MISCREG_DACR, MISCREG_DFSR, MISCREG_IFSR,
MISCREG_ADFSR, MISCREG_AIFSR, MISCREG_DFAR, MISCREG_IFAR, MISCREG_PAR,
MISCREG_PRRR, MISCREG_MAIR0, MISCREG_NMRR, MISCREG_MAIR1,
MISCREG_AMAIR0, MISCREG_AMAIR1, MISCREG_VBAR, MISCREG_CONTEXTIDR,
MISCREG_TPIDRURW, MISCREG_TPIDRURO, MISCREG_TPIDRPRW, MISCREG_CNTP_TVAL,
MISCREG_CNTP_CTL, MISCREG_CNTP_CVAL

For those registers the following permission bits have been set:

MISCREG_PRI_S_RD
MISCREG_PRI_S_WR

Change-Id: Ib881c526e75d69e313f8ef66eb78fc704de6bf59
Signed-off-by: Giacomo Travaglini <[email protected]>
Reviewed-by: Giacomo Gabrielli <[email protected]>
Reviewed-on: https://gem5-review.googlesource.com/6201
Reviewed-by: Andreas Sandberg <[email protected]>
Maintainer: Andreas Sandberg <[email protected]>
---
M src/arch/arm/miscregs.cc
1 file changed, 28 insertions(+), 28 deletions(-)

Approvals:
  Andreas Sandberg: Looks good to me, approved; Looks good to me, approved



diff --git a/src/arch/arm/miscregs.cc b/src/arch/arm/miscregs.cc
index d31c84c..d08f751 100644
--- a/src/arch/arm/miscregs.cc
+++ b/src/arch/arm/miscregs.cc
@@ -344,7 +344,7 @@
     // MISCREG_CSSELR
     bitset<NUM_MISCREG_INFOS>(string("00000000000000010001")),
     // MISCREG_CSSELR_NS
-    bitset<NUM_MISCREG_INFOS>(string("11001100110000100001")),
+    bitset<NUM_MISCREG_INFOS>(string("11001111110000100001")),
     // MISCREG_CSSELR_S
     bitset<NUM_MISCREG_INFOS>(string("00110011000000100001")),
     // MISCREG_VPIDR
@@ -354,13 +354,13 @@
     // MISCREG_SCTLR
     bitset<NUM_MISCREG_INFOS>(string("00000000000000010001")),
     // MISCREG_SCTLR_NS
-    bitset<NUM_MISCREG_INFOS>(string("11001100110000100001")),
+    bitset<NUM_MISCREG_INFOS>(string("11001111110000100001")),
     // MISCREG_SCTLR_S
     bitset<NUM_MISCREG_INFOS>(string("00110011000000100001")),
     // MISCREG_ACTLR
     bitset<NUM_MISCREG_INFOS>(string("00000000000000010001")),
     // MISCREG_ACTLR_NS
-    bitset<NUM_MISCREG_INFOS>(string("11001100110000100001")),
+    bitset<NUM_MISCREG_INFOS>(string("11001111110000100001")),
     // MISCREG_ACTLR_S
     bitset<NUM_MISCREG_INFOS>(string("00110011000000100001")),
     // MISCREG_CPACR
@@ -388,19 +388,19 @@
     // MISCREG_TTBR0
     bitset<NUM_MISCREG_INFOS>(string("00000000000000010001")),
     // MISCREG_TTBR0_NS
-    bitset<NUM_MISCREG_INFOS>(string("11001100110000100001")),
+    bitset<NUM_MISCREG_INFOS>(string("11001111110000100001")),
     // MISCREG_TTBR0_S
     bitset<NUM_MISCREG_INFOS>(string("00110011000000100001")),
     // MISCREG_TTBR1
     bitset<NUM_MISCREG_INFOS>(string("00000000000000010001")),
     // MISCREG_TTBR1_NS
-    bitset<NUM_MISCREG_INFOS>(string("11001100110000100001")),
+    bitset<NUM_MISCREG_INFOS>(string("11001111110000100001")),
     // MISCREG_TTBR1_S
     bitset<NUM_MISCREG_INFOS>(string("00110011000000100001")),
     // MISCREG_TTBCR
     bitset<NUM_MISCREG_INFOS>(string("00000000000000010001")),
     // MISCREG_TTBCR_NS
-    bitset<NUM_MISCREG_INFOS>(string("11001100110000100001")),
+    bitset<NUM_MISCREG_INFOS>(string("11001111110000100001")),
     // MISCREG_TTBCR_S
     bitset<NUM_MISCREG_INFOS>(string("00110011000000100001")),
     // MISCREG_HTCR
@@ -410,31 +410,31 @@
     // MISCREG_DACR
     bitset<NUM_MISCREG_INFOS>(string("00000000000000010001")),
     // MISCREG_DACR_NS
-    bitset<NUM_MISCREG_INFOS>(string("11001100110000100001")),
+    bitset<NUM_MISCREG_INFOS>(string("11001111110000100001")),
     // MISCREG_DACR_S
     bitset<NUM_MISCREG_INFOS>(string("00110011000000100001")),
     // MISCREG_DFSR
     bitset<NUM_MISCREG_INFOS>(string("00000000000000010001")),
     // MISCREG_DFSR_NS
-    bitset<NUM_MISCREG_INFOS>(string("11001100110000100001")),
+    bitset<NUM_MISCREG_INFOS>(string("11001111110000100001")),
     // MISCREG_DFSR_S
     bitset<NUM_MISCREG_INFOS>(string("00110011000000100001")),
     // MISCREG_IFSR
     bitset<NUM_MISCREG_INFOS>(string("00000000000000010001")),
     // MISCREG_IFSR_NS
-    bitset<NUM_MISCREG_INFOS>(string("11001100110000100001")),
+    bitset<NUM_MISCREG_INFOS>(string("11001111110000100001")),
     // MISCREG_IFSR_S
     bitset<NUM_MISCREG_INFOS>(string("00110011000000100001")),
     // MISCREG_ADFSR
     bitset<NUM_MISCREG_INFOS>(string("00000000000000010100")),
     // MISCREG_ADFSR_NS
-    bitset<NUM_MISCREG_INFOS>(string("11001100110000100100")),
+    bitset<NUM_MISCREG_INFOS>(string("11001111110000100100")),
     // MISCREG_ADFSR_S
     bitset<NUM_MISCREG_INFOS>(string("00110011000000100100")),
     // MISCREG_AIFSR
     bitset<NUM_MISCREG_INFOS>(string("00000000000000010100")),
     // MISCREG_AIFSR_NS
-    bitset<NUM_MISCREG_INFOS>(string("11001100110000100100")),
+    bitset<NUM_MISCREG_INFOS>(string("11001111110000100100")),
     // MISCREG_AIFSR_S
     bitset<NUM_MISCREG_INFOS>(string("00110011000000100100")),
     // MISCREG_HADFSR
@@ -446,13 +446,13 @@
     // MISCREG_DFAR
     bitset<NUM_MISCREG_INFOS>(string("00000000000000010001")),
     // MISCREG_DFAR_NS
-    bitset<NUM_MISCREG_INFOS>(string("11001100110000100001")),
+    bitset<NUM_MISCREG_INFOS>(string("11001111110000100001")),
     // MISCREG_DFAR_S
     bitset<NUM_MISCREG_INFOS>(string("00110011000000100001")),
     // MISCREG_IFAR
     bitset<NUM_MISCREG_INFOS>(string("00000000000000010001")),
     // MISCREG_IFAR_NS
-    bitset<NUM_MISCREG_INFOS>(string("11001100110000100001")),
+    bitset<NUM_MISCREG_INFOS>(string("11001111110000100001")),
     // MISCREG_IFAR_S
     bitset<NUM_MISCREG_INFOS>(string("00110011000000100001")),
     // MISCREG_HDFAR
@@ -468,7 +468,7 @@
     // MISCREG_PAR
     bitset<NUM_MISCREG_INFOS>(string("00000000000000010001")),
     // MISCREG_PAR_NS
-    bitset<NUM_MISCREG_INFOS>(string("11001100110000100001")),
+    bitset<NUM_MISCREG_INFOS>(string("11001111110000100001")),
     // MISCREG_PAR_S
     bitset<NUM_MISCREG_INFOS>(string("00110011000000100001")),
     // MISCREG_ICIALLU
@@ -618,37 +618,37 @@
     // MISCREG_PRRR
     bitset<NUM_MISCREG_INFOS>(string("00000000000000010001")),
     // MISCREG_PRRR_NS
-    bitset<NUM_MISCREG_INFOS>(string("11001100110000100001")),
+    bitset<NUM_MISCREG_INFOS>(string("11001111110000100001")),
     // MISCREG_PRRR_S
     bitset<NUM_MISCREG_INFOS>(string("00110011000000100001")),
     // MISCREG_MAIR0
     bitset<NUM_MISCREG_INFOS>(string("00000000000000010001")),
     // MISCREG_MAIR0_NS
-    bitset<NUM_MISCREG_INFOS>(string("11001100110000100001")),
+    bitset<NUM_MISCREG_INFOS>(string("11001111110000100001")),
     // MISCREG_MAIR0_S
     bitset<NUM_MISCREG_INFOS>(string("00110011000000100001")),
     // MISCREG_NMRR
     bitset<NUM_MISCREG_INFOS>(string("00000000000000010001")),
     // MISCREG_NMRR_NS
-    bitset<NUM_MISCREG_INFOS>(string("11001100110000100001")),
+    bitset<NUM_MISCREG_INFOS>(string("11001111110000100001")),
     // MISCREG_NMRR_S
     bitset<NUM_MISCREG_INFOS>(string("00110011000000100001")),
     // MISCREG_MAIR1
     bitset<NUM_MISCREG_INFOS>(string("00000000000000010001")),
     // MISCREG_MAIR1_NS
-    bitset<NUM_MISCREG_INFOS>(string("11001100110000100001")),
+    bitset<NUM_MISCREG_INFOS>(string("11001111110000100001")),
     // MISCREG_MAIR1_S
     bitset<NUM_MISCREG_INFOS>(string("00110011000000100001")),
     // MISCREG_AMAIR0
     bitset<NUM_MISCREG_INFOS>(string("00000000000000010001")),
     // MISCREG_AMAIR0_NS
-    bitset<NUM_MISCREG_INFOS>(string("11001100110000100001")),
+    bitset<NUM_MISCREG_INFOS>(string("11001111110000100001")),
     // MISCREG_AMAIR0_S
     bitset<NUM_MISCREG_INFOS>(string("00110011000000100001")),
     // MISCREG_AMAIR1
     bitset<NUM_MISCREG_INFOS>(string("00000000000000010001")),
     // MISCREG_AMAIR1_NS
-    bitset<NUM_MISCREG_INFOS>(string("11001100110000100001")),
+    bitset<NUM_MISCREG_INFOS>(string("11001111110000100001")),
     // MISCREG_AMAIR1_S
     bitset<NUM_MISCREG_INFOS>(string("00110011000000100001")),
     // MISCREG_HMAIR0
@@ -662,7 +662,7 @@
     // MISCREG_VBAR
     bitset<NUM_MISCREG_INFOS>(string("00000000000000010001")),
     // MISCREG_VBAR_NS
-    bitset<NUM_MISCREG_INFOS>(string("11001100110000100001")),
+    bitset<NUM_MISCREG_INFOS>(string("11001111110000100001")),
     // MISCREG_VBAR_S
     bitset<NUM_MISCREG_INFOS>(string("00110011000000100001")),
     // MISCREG_MVBAR
@@ -678,25 +678,25 @@
     // MISCREG_CONTEXTIDR
     bitset<NUM_MISCREG_INFOS>(string("00000000000000010001")),
     // MISCREG_CONTEXTIDR_NS
-    bitset<NUM_MISCREG_INFOS>(string("11001100110000100001")),
+    bitset<NUM_MISCREG_INFOS>(string("11001111110000100001")),
     // MISCREG_CONTEXTIDR_S
     bitset<NUM_MISCREG_INFOS>(string("00110011000000100001")),
     // MISCREG_TPIDRURW
     bitset<NUM_MISCREG_INFOS>(string("00000000000000010001")),
     // MISCREG_TPIDRURW_NS
-    bitset<NUM_MISCREG_INFOS>(string("11001100111111100001")),
+    bitset<NUM_MISCREG_INFOS>(string("11001111111111100001")),
     // MISCREG_TPIDRURW_S
     bitset<NUM_MISCREG_INFOS>(string("00110011000000100001")),
     // MISCREG_TPIDRURO
     bitset<NUM_MISCREG_INFOS>(string("00000000000000010001")),
     // MISCREG_TPIDRURO_NS
-    bitset<NUM_MISCREG_INFOS>(string("11001100110101100001")),
+    bitset<NUM_MISCREG_INFOS>(string("11001111110101100001")),
     // MISCREG_TPIDRURO_S
     bitset<NUM_MISCREG_INFOS>(string("00110011000000100001")),
     // MISCREG_TPIDRPRW
     bitset<NUM_MISCREG_INFOS>(string("00000000000000010001")),
     // MISCREG_TPIDRPRW_NS
-    bitset<NUM_MISCREG_INFOS>(string("11001100110000100001")),
+    bitset<NUM_MISCREG_INFOS>(string("11001111110000100001")),
     // MISCREG_TPIDRPRW_S
     bitset<NUM_MISCREG_INFOS>(string("00110011000000100001")),
     // MISCREG_HTPIDR
@@ -708,13 +708,13 @@
     // MISCREG_CNTP_TVAL
     bitset<NUM_MISCREG_INFOS>(string("00000000000000010001")),
     // MISCREG_CNTP_TVAL_NS
-    bitset<NUM_MISCREG_INFOS>(string("11001100111111100001")),
+    bitset<NUM_MISCREG_INFOS>(string("11001111111111100001")),
     // MISCREG_CNTP_TVAL_S
     bitset<NUM_MISCREG_INFOS>(string("00110011001111100000")),
     // MISCREG_CNTP_CTL
     bitset<NUM_MISCREG_INFOS>(string("00000000000000010001")),
     // MISCREG_CNTP_CTL_NS
-    bitset<NUM_MISCREG_INFOS>(string("11001100111111100001")),
+    bitset<NUM_MISCREG_INFOS>(string("11001111111111100001")),
     // MISCREG_CNTP_CTL_S
     bitset<NUM_MISCREG_INFOS>(string("00110011001111100000")),
     // MISCREG_CNTV_TVAL
@@ -762,7 +762,7 @@
     // MISCREG_CNTP_CVAL
     bitset<NUM_MISCREG_INFOS>(string("00000000000000010001")),
     // MISCREG_CNTP_CVAL_NS
-    bitset<NUM_MISCREG_INFOS>(string("11001100111111100001")),
+    bitset<NUM_MISCREG_INFOS>(string("11001111111111100001")),
     // MISCREG_CNTP_CVAL_S
     bitset<NUM_MISCREG_INFOS>(string("00110011001111100000")),
     // MISCREG_CNTV_CVAL

--
To view, visit https://gem5-review.googlesource.com/6201
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ib881c526e75d69e313f8ef66eb78fc704de6bf59
Gerrit-Change-Number: 6201
Gerrit-PatchSet: 2
Gerrit-Owner: Giacomo Travaglini <[email protected]>
Gerrit-Reviewer: Andreas Sandberg <[email protected]>
Gerrit-Reviewer: Giacomo Gabrielli <[email protected]>
Gerrit-Reviewer: Giacomo Travaglini <[email protected]>
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to