summaryrefslogtreecommitdiff
path: root/src/arch/arm/isa.cc
diff options
context:
space:
mode:
authorGeoffrey Blake <geoffrey.blake@arm.com>2014-05-09 18:58:46 -0400
committerGeoffrey Blake <geoffrey.blake@arm.com>2014-05-09 18:58:46 -0400
commit29601eada77e66d346def0b219f6ccff48586ace (patch)
treeb869c97cea70229f580e391597a1740dbd05600e /src/arch/arm/isa.cc
parenta3306d0d5e4c83fcce7f7d5915a2a16a99d21744 (diff)
downloadgem5-29601eada77e66d346def0b219f6ccff48586ace.tar.xz
arm: Panics in miscreg read functions can be tripped by O3 model
Unimplemented miscregs for the generic timer were guarded by panics in arm/isa.cc which can be tripped by the O3 model if it speculatively executes a wrong path containing a mrs instruction with a bad miscreg index. These registers were flagged as implemented and accessible. This patch changes the miscreg info bit vector to flag them as unimplemented and inaccessible. In this case, and UndefinedInst fault will be generated if the register access is not trapped by a hypervisor.
Diffstat (limited to 'src/arch/arm/isa.cc')
-rw-r--r--src/arch/arm/isa.cc31
1 files changed, 15 insertions, 16 deletions
diff --git a/src/arch/arm/isa.cc b/src/arch/arm/isa.cc
index 4f1ef91ec..5f8378e09 100644
--- a/src/arch/arm/isa.cc
+++ b/src/arch/arm/isa.cc
@@ -729,30 +729,30 @@ ISA::readMiscReg(int misc_reg, ThreadContext *tc)
return getArchTimer(tc, tc->cpuId())->control();
// PL1 phys. timer, secure
// AArch64
- case MISCREG_CNTPS_CVAL_EL1:
- case MISCREG_CNTPS_TVAL_EL1:
- case MISCREG_CNTPS_CTL_EL1:
+ // case MISCREG_CNTPS_CVAL_EL1:
+ // case MISCREG_CNTPS_TVAL_EL1:
+ // case MISCREG_CNTPS_CTL_EL1:
// PL2 phys. timer, non-secure
// AArch32
- case MISCREG_CNTHCTL:
- case MISCREG_CNTHP_CVAL:
- case MISCREG_CNTHP_TVAL:
- case MISCREG_CNTHP_CTL:
+ // case MISCREG_CNTHCTL:
+ // case MISCREG_CNTHP_CVAL:
+ // case MISCREG_CNTHP_TVAL:
+ // case MISCREG_CNTHP_CTL:
// AArch64
- case MISCREG_CNTHCTL_EL2:
- case MISCREG_CNTHP_CVAL_EL2:
- case MISCREG_CNTHP_TVAL_EL2:
- case MISCREG_CNTHP_CTL_EL2:
+ // case MISCREG_CNTHCTL_EL2:
+ // case MISCREG_CNTHP_CVAL_EL2:
+ // case MISCREG_CNTHP_TVAL_EL2:
+ // case MISCREG_CNTHP_CTL_EL2:
// Virtual timer
// AArch32
- case MISCREG_CNTV_CVAL:
- case MISCREG_CNTV_TVAL:
- case MISCREG_CNTV_CTL:
+ // case MISCREG_CNTV_CVAL:
+ // case MISCREG_CNTV_TVAL:
+ // case MISCREG_CNTV_CTL:
// AArch64
// case MISCREG_CNTV_CVAL_EL2:
// case MISCREG_CNTV_TVAL_EL2:
// case MISCREG_CNTV_CTL_EL2:
- panic("Generic Timer register not implemented\n");
+ default:
break;
}
@@ -1902,7 +1902,6 @@ ISA::setMiscReg(int misc_reg, const MiscReg &val, ThreadContext *tc)
// case MISCREG_CNTV_CVAL_EL2:
// case MISCREG_CNTV_TVAL_EL2:
// case MISCREG_CNTV_CTL_EL2:
- panic("Generic Timer register not implemented\n");
break;
}
}