summaryrefslogtreecommitdiff
path: root/src/arch/arm/isa.cc
diff options
context:
space:
mode:
authorCurtis Dunham <Curtis.Dunham@arm.com>2016-12-19 11:03:27 -0600
committerCurtis Dunham <Curtis.Dunham@arm.com>2016-12-19 11:03:27 -0600
commita73937b60c0057d006938bca7ec69a8b48450f2c (patch)
tree5d6a51c05403196104f17617f6e8ae725a19c2bb /src/arch/arm/isa.cc
parent282cf5807d827d5583e5cd5bffae75c4e5efb116 (diff)
downloadgem5-a73937b60c0057d006938bca7ec69a8b48450f2c.tar.xz
arm: compute ID_PFR{0,1} registers
Compute the proper values of the aforementioned registers from the system configuration rather than configuring the values themselves. Change-Id: Ie7685b5d8b5f2dd9d6380b4af74f16d596b2bfd1 Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Diffstat (limited to 'src/arch/arm/isa.cc')
-rw-r--r--src/arch/arm/isa.cc13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/arch/arm/isa.cc b/src/arch/arm/isa.cc
index c093ceda9..90325346c 100644
--- a/src/arch/arm/isa.cc
+++ b/src/arch/arm/isa.cc
@@ -358,10 +358,6 @@ ISA::clear()
miscRegs[MISCREG_CPACR] = 0;
-
- miscRegs[MISCREG_ID_PFR0] = p->id_pfr0;
- miscRegs[MISCREG_ID_PFR1] = p->id_pfr1;
-
miscRegs[MISCREG_ID_MMFR0] = p->id_mmfr0;
miscRegs[MISCREG_ID_MMFR1] = p->id_mmfr1;
miscRegs[MISCREG_ID_MMFR2] = p->id_mmfr2;
@@ -772,6 +768,15 @@ ISA::readMiscReg(int misc_reg, ThreadContext *tc)
case MISCREG_HSCTLR:
return (readMiscRegNoEffect(misc_reg) & 0x32CD183F) | 0x30C50830;
+ case MISCREG_ID_PFR0:
+ // !ThumbEE | !Jazelle | Thumb | ARM
+ return 0x00000031;
+ case MISCREG_ID_PFR1:
+ // !Timer | Virti | !M Profile | TrustZone | ARMv4
+ return 0x00000001
+ | (haveSecurity ? 0x00000010 : 0x0)
+ | (haveVirtualization ? 0x00001000 : 0x0);
+
// Generic Timer registers
case MISCREG_CNTFRQ ... MISCREG_CNTHP_CTL:
case MISCREG_CNTPCT ... MISCREG_CNTHP_CVAL: