arch-arm: Fix masking in CPACR_EL1
authorChuan Zhu <chuan.zhu@arm.com>
Wed, 17 Jan 2018 10:59:30 +0000 (10:59 +0000)
committerGiacomo Travaglini <giacomo.travaglini@arm.com>
Wed, 18 Apr 2018 15:23:07 +0000 (15:23 +0000)
Some bits in CPACR_EL1 are RES0 but not RAZ/WI. For instance, bit
CPACR_EL1[31] is RES0 but should be made stateful, since it allows
programing of CPACR.ASEDIS. Therefore the masking of CPACR_EL1
is removed.

Change-Id: If1fa3fa1e06bc38495b8afce2c635f3ddf76ce32
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/10046
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

src/arch/arm/isa.cc

index 95437537496843a783121876aabb5df47633c2d2..7f0e0f42b4a39db2b9d141c2ae78e631acdca762 100644 (file)
@@ -754,17 +754,6 @@ ISA::setMiscReg(int misc_reg, const MiscReg &val, ThreadContext *tc)
                         miscRegName[misc_reg], newVal);
             }
             break;
-          case MISCREG_CPACR_EL1:
-            {
-                const uint32_t ones = (uint32_t)(-1);
-                CPACR cpacrMask = 0;
-                cpacrMask.tta = ones;
-                cpacrMask.fpen = ones;
-                newVal &= cpacrMask;
-                DPRINTF(MiscRegs, "Writing misc reg %s: %#x\n",
-                        miscRegName[misc_reg], newVal);
-            }
-            break;
           case MISCREG_CPTR_EL2:
             {
                 const uint32_t ones = (uint32_t)(-1);