arm: compute ID_AA64PFR{0,1}_EL1 registers
authorCurtis Dunham <Curtis.Dunham@arm.com>
Mon, 19 Dec 2016 17:03:28 +0000 (11:03 -0600)
committerCurtis Dunham <Curtis.Dunham@arm.com>
Mon, 19 Dec 2016 17:03:28 +0000 (11:03 -0600)
Compute the proper values of the aforementioned registers from
the system configuration rather than configuring the values themselves.

Change-Id: If9774b6610a29568b80ae4866107b9a6a5b5be0f
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
src/arch/arm/ArmISA.py
src/arch/arm/isa.cc

index fbefe3dafaad15cef20fd235f4da1cab103fe98e..73ef4a09d72fc3ea499b2fc0b03f5c12c5c0d463 100644 (file)
@@ -106,10 +106,3 @@ class ArmISA(SimObject):
     # Reserved for future expansion
     id_aa64mmfr1_el1 = Param.UInt64(0x0000000000000000,
         "AArch64 Memory Model Feature Register 1")
-
-    # !GICv3 CP15 | AdvSIMD | FP | !EL3 | !EL2 | EL1 (AArch64) | EL0 (AArch64)
-    id_aa64pfr0_el1 = Param.UInt64(0x0000000000000022,
-        "AArch64 Processor Feature Register 0")
-    # Reserved for future expansion
-    id_aa64pfr1_el1 = Param.UInt64(0x0000000000000000,
-        "AArch64 Processor Feature Register 1")
index 90325346c9911e8c79cfdbcc028d927e4d2c7407..74ea91a8d0dbe9f77457ac0c5b6fa162af620b9b 100644 (file)
@@ -452,8 +452,6 @@ ISA::clear64(const ArmISAParams *p)
     miscRegs[MISCREG_ID_AA64ISAR1_EL1] = p->id_aa64isar1_el1;
     miscRegs[MISCREG_ID_AA64MMFR0_EL1] = p->id_aa64mmfr0_el1;
     miscRegs[MISCREG_ID_AA64MMFR1_EL1] = p->id_aa64mmfr1_el1;
-    miscRegs[MISCREG_ID_AA64PFR0_EL1] = p->id_aa64pfr0_el1;
-    miscRegs[MISCREG_ID_AA64PFR1_EL1] = p->id_aa64pfr1_el1;
 
     miscRegs[MISCREG_ID_DFR0_EL1] =
         (p->pmu ? 0x03000000ULL : 0); // Enable PMUv3
@@ -776,6 +774,13 @@ ISA::readMiscReg(int misc_reg, ThreadContext *tc)
         return 0x00000001
              | (haveSecurity       ? 0x00000010 : 0x0)
              | (haveVirtualization ? 0x00001000 : 0x0);
+      case MISCREG_ID_AA64PFR0_EL1:
+        return 0x0000000000000002   // AArch{64,32} supported at EL0
+             | 0x0000000000000020                             // EL1
+             | (haveVirtualization ? 0x0000000000000200 : 0)  // EL2
+             | (haveSecurity       ? 0x0000000000002000 : 0); // EL3
+      case MISCREG_ID_AA64PFR1_EL1:
+        return 0; // bits [63:0] RES0 (reserved for future use)
 
       // Generic Timer registers
       case MISCREG_CNTFRQ ... MISCREG_CNTHP_CTL: