arch-arm: Implementing SecureEL2 feature for Armv8
[gem5.git] / src / arch / arm / isa.hh
index 00c29bc77c963de94477c74e87c2b9a30b4b42f9..3b90de1346949b0139ac93c4a933748ec630537c 100644 (file)
@@ -95,6 +95,7 @@ namespace ArmISA
         bool haveSVE;
         bool haveLSE;
         bool havePAN;
+        bool haveSecEL2;
 
         /** SVE vector length in quadwords */
         unsigned sveVL;
@@ -695,7 +696,7 @@ namespace ArmISA
             if (hcr.e2h == 0x0 || currEL(tc) != EL2)
                 return misc_reg;
             SCR scr = readMiscRegNoEffect(MISCREG_SCR_EL3);
-            bool sec_el2 = scr.eel2 && false;
+            bool sec_el2 = scr.eel2 && haveSecEL2;
             switch(misc_reg) {
               case MISCREG_SPSR_EL1:
                   return MISCREG_SPSR_EL2;