/*
- * Copyright (c) 2010, 2012-2014, 2016 ARM Limited
+ * Copyright (c) 2010, 2012-2014, 2016-2017 ARM Limited
* All rights reserved
*
* The license below extends only to copyright in the software and shall
"SError", 0x000, 0x180, 0x380, 0x580, 0x780, MODE_SVC,
0, 0, 0, 0, false, true, true, EC_SERROR, FaultStat()
};
-template<> ArmFault::FaultVals ArmFaultVals<FlushPipe>::vals = {
- // Some dummy values
- "Pipe Flush", 0x000, 0x000, 0x000, 0x000, 0x000, MODE_SVC,
- 0, 0, 0, 0, false, true, true, EC_UNKNOWN, FaultStat()
-};
template<> ArmFault::FaultVals ArmFaultVals<ArmSev>::vals = {
// Some dummy values
"ArmSev Flush", 0x000, 0x000, 0x000, 0x000, 0x000, MODE_SVC,
return toHyp;
}
-void
-FlushPipe::invoke(ThreadContext *tc, const StaticInstPtr &inst) {
- DPRINTF(Faults, "Invoking FlushPipe Fault\n");
-
- // Set the PC to the next instruction of the faulting instruction.
- // Net effect is simply squashing all instructions behind and
- // start refetching from the next instruction.
- PCState pc = tc->pcState();
- assert(inst);
- inst->advancePC(pc);
- tc->pcState(pc);
-}
-
void
ArmSev::invoke(ThreadContext *tc, const StaticInstPtr &inst) {
DPRINTF(Faults, "Invoking ArmSev Fault\n");
template class ArmFaultVals<PCAlignmentFault>;
template class ArmFaultVals<SPAlignmentFault>;
template class ArmFaultVals<SystemError>;
-template class ArmFaultVals<FlushPipe>;
template class ArmFaultVals<ArmSev>;
template class AbortFault<PrefetchAbort>;
template class AbortFault<DataAbort>;
bool routeToHyp(ThreadContext *tc) const override;
};
-// A fault that flushes the pipe, excluding the faulting instructions
-class FlushPipe : public ArmFaultVals<FlushPipe>
-{
- public:
- FlushPipe() {}
- void invoke(ThreadContext *tc, const StaticInstPtr &inst =
- StaticInst::nullStaticInstPtr) override;
-};
-
// A fault that flushes the pipe, excluding the faulting instructions
class ArmSev : public ArmFaultVals<ArmSev>
{
template<> ArmFault::FaultVals ArmFaultVals<PCAlignmentFault>::vals;
template<> ArmFault::FaultVals ArmFaultVals<SPAlignmentFault>::vals;
template<> ArmFault::FaultVals ArmFaultVals<SystemError>::vals;
-template<> ArmFault::FaultVals ArmFaultVals<FlushPipe>::vals;
template<> ArmFault::FaultVals ArmFaultVals<ArmSev>::vals;
/*
- * Copyright (c) 2014,2016 ARM Limited
+ * Copyright (c) 2014,2016-2017 ARM Limited
* All rights reserved
*
* The license below extends only to copyright in the software and shall
flags[IsNonSpeculative] = true;
iss = _iss;
miscReg = _miscReg;
+
+ if (miscReg == MISCREG_DCCMVAC)
+ flags[IsSquashAfter] = true;
}
Fault
if (hypTrap) {
return std::make_shared<HypervisorTrap>(machInst, iss,
EC_TRAPPED_CP15_MCR_MRC);
- }
-
- if (miscReg == MISCREG_DCCMVAC)
- return std::make_shared<FlushPipe>();
- else
+ } else {
return NoFault;
+ }
}
std::string
return std::make_shared<HypervisorTrap>(machInst, imm,
EC_TRAPPED_CP15_MCR_MRC);
}
- fault = std::make_shared<FlushPipe>();
'''
isbIop = InstObjParams("isb", "Isb", "ImmOp",
{"code": isbCode,
"predicate_test": predicateTest},
- ['IsSerializeAfter'])
+ ['IsSerializeAfter', 'IsSquashAfter'])
header_output += ImmOpDeclare.subst(isbIop)
decoder_output += ImmOpConstructor.subst(isbIop)
exec_output += PredOpExecute.subst(isbIop)
return std::make_shared<HypervisorTrap>(machInst, imm,
EC_TRAPPED_CP15_MCR_MRC);
}
- fault = std::make_shared<FlushPipe>();
'''
dsbIop = InstObjParams("dsb", "Dsb", "ImmOp",
{"code": dsbCode,
"predicate_test": predicateTest},
- ['IsMemBarrier', 'IsSerializeAfter'])
+ ['IsMemBarrier', 'IsSerializeAfter',
+ 'IsSquashAfter'])
header_output += ImmOpDeclare.subst(dsbIop)
decoder_output += ImmOpConstructor.subst(dsbIop)
exec_output += PredOpExecute.subst(dsbIop)
decoder_output += BasicConstructor64.subst(unknown64Iop)
exec_output += BasicExecute.subst(unknown64Iop)
- isbIop = InstObjParams("isb", "Isb64", "ArmStaticInst",
- "fault = std::make_shared<FlushPipe>();",
- ['IsSerializeAfter'])
+ isbIop = InstObjParams("isb", "Isb64", "ArmStaticInst", "",
+ ['IsSerializeAfter', 'IsSquashAfter'])
header_output += BasicDeclare.subst(isbIop)
decoder_output += BasicConstructor64.subst(isbIop)
exec_output += BasicExecute.subst(isbIop)
- dsbIop = InstObjParams("dsb", "Dsb64", "ArmStaticInst",
- "fault = std::make_shared<FlushPipe>();",
- ['IsMemBarrier', 'IsSerializeAfter'])
+ dsbIop = InstObjParams("dsb", "Dsb64", "ArmStaticInst", "",
+ ['IsMemBarrier', 'IsSerializeAfter',
+ 'IsSquashAfter'])
header_output += BasicDeclare.subst(dsbIop)
decoder_output += BasicConstructor64.subst(dsbIop)
exec_output += BasicExecute.subst(dsbIop)