From 29601eada77e66d346def0b219f6ccff48586ace Mon Sep 17 00:00:00 2001 From: Geoffrey Blake Date: Fri, 9 May 2014 18:58:46 -0400 Subject: 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. --- src/arch/arm/miscregs.cc | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'src/arch/arm/miscregs.cc') diff --git a/src/arch/arm/miscregs.cc b/src/arch/arm/miscregs.cc index 6fa304938..313ac18f9 100644 --- a/src/arch/arm/miscregs.cc +++ b/src/arch/arm/miscregs.cc @@ -714,15 +714,15 @@ bitset miscRegInfo[NUM_MISCREGS] = { // MISCREG_CNTP_CTL_S bitset(string("0011001100111110000")), // MISCREG_CNTV_TVAL - bitset(string("1111111111111100001")), + bitset(string("0111100000000000000")), // MISCREG_CNTV_CTL - bitset(string("1111111111111100001")), + bitset(string("0111100000000000000")), // MISCREG_CNTHCTL - bitset(string("1100110000000000001")), + bitset(string("0100100000000000000")), // MISCREG_CNTHP_TVAL - bitset(string("1100110000000000001")), + bitset(string("0100100000000000000")), // MISCREG_CNTHP_CTL - bitset(string("1100110000000000001")), + bitset(string("0100100000000000000")), // MISCREG_IL1DATA0 bitset(string("1111111111000000000")), // MISCREG_IL1DATA1 @@ -762,11 +762,11 @@ bitset miscRegInfo[NUM_MISCREGS] = { // MISCREG_CNTP_CVAL_S bitset(string("0011001100111110000")), // MISCREG_CNTV_CVAL - bitset(string("1111111111111100001")), + bitset(string("0111100000000000000")), // MISCREG_CNTVOFF bitset(string("1100110000000000001")), // MISCREG_CNTHP_CVAL - bitset(string("1100110000000000001")), + bitset(string("0100100000000000000")), // MISCREG_CPUMERRSR bitset(string("1111111111000000000")), // MISCREG_L2MERRSR @@ -1258,11 +1258,11 @@ bitset miscRegInfo[NUM_MISCREGS] = { // MISCREG_CNTP_CVAL_EL0 bitset(string("1111111111111100001")), // MISCREG_CNTV_TVAL_EL0 - bitset(string("1111111111111100001")), + bitset(string("0111100000000000000")), // MISCREG_CNTV_CTL_EL0 - bitset(string("1111111111111100001")), + bitset(string("0111100000000000000")), // MISCREG_CNTV_CVAL_EL0 - bitset(string("1111111111111100001")), + bitset(string("0111100000000000000")), // MISCREG_PMEVCNTR0_EL0 bitset(string("1111111111111100001")), // MISCREG_PMEVCNTR1_EL0 @@ -1290,19 +1290,19 @@ bitset miscRegInfo[NUM_MISCREGS] = { // MISCREG_CNTVOFF_EL2 bitset(string("1111110000000000001")), // MISCREG_CNTHCTL_EL2 - bitset(string("1111110000000000001")), + bitset(string("0111100000000000000")), // MISCREG_CNTHP_TVAL_EL2 - bitset(string("1111110000000000001")), + bitset(string("0111100000000000000")), // MISCREG_CNTHP_CTL_EL2 - bitset(string("1111110000000000001")), + bitset(string("0111100000000000000")), // MISCREG_CNTHP_CVAL_EL2 - bitset(string("1111110000000000001")), + bitset(string("0111100000000000000")), // MISCREG_CNTPS_TVAL_EL1 - bitset(string("1111111111111100001")), + bitset(string("0111100000000000000")), // MISCREG_CNTPS_CTL_EL1 - bitset(string("1111111111111100001")), + bitset(string("0111100000000000000")), // MISCREG_CNTPS_CVAL_EL1 - bitset(string("1111111111111100001")), + bitset(string("0111100000000000000")), // MISCREG_IL1DATA0_EL1 bitset(string("1111111111000000001")), // MISCREG_IL1DATA1_EL1 -- cgit v1.2.3