diff options
author | Geoffrey Blake <geoffrey.blake@arm.com> | 2011-08-19 15:08:07 -0500 |
---|---|---|
committer | Geoffrey Blake <geoffrey.blake@arm.com> | 2011-08-19 15:08:07 -0500 |
commit | 5f425b8bd1ac70b61fc57b7ec44c52cd7d8de9fb (patch) | |
tree | decdd198675fc01637584a8ef65d50c216e992da /src/arch/arm/isa/templates | |
parent | f125ef22b997d5ba6173d9d3f0d07ae741e279bd (diff) | |
download | gem5-5f425b8bd1ac70b61fc57b7ec44c52cd7d8de9fb.tar.xz |
Fix bugs due to interaction between SEV instructions and O3 pipeline
SEV instructions were originally implemented to cause asynchronous squashes
via the generateTCSquash() function in the O3 pipeline when updating the
SEV_MAILBOX miscReg. This caused race conditions between CPUs in an MP system
that would lead to a pipeline either going inactive indefinitely or not being
able to commit squashed instructions. Fixed SEV instructions to behave like
interrupts and cause synchronous sqaushes inside the pipeline, eliminating
the race conditions. Also fixed up the semantics of the WFE instruction to
behave as documented in the ARMv7 ISA description to not sleep if SEV_MAILBOX=1
or unmasked interrupts are pending.
Diffstat (limited to 'src/arch/arm/isa/templates')
-rw-r--r-- | src/arch/arm/isa/templates/pred.isa | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/arch/arm/isa/templates/pred.isa b/src/arch/arm/isa/templates/pred.isa index 04f253ca9..8b7ff69e7 100644 --- a/src/arch/arm/isa/templates/pred.isa +++ b/src/arch/arm/isa/templates/pred.isa @@ -205,6 +205,34 @@ def template QuiescePredOpExecute {{ } }}; +def template QuiescePredOpExecuteWithFixup {{ + Fault %(class_name)s::execute(%(CPU_exec_context)s *xc, Trace::InstRecord *traceData) const + { + Fault fault = NoFault; + uint64_t resTemp = 0; + resTemp = resTemp; + %(op_decl)s; + %(op_rd)s; + + if (%(predicate_test)s) + { + %(code)s; + if (fault == NoFault) + { + %(op_wb)s; + } + } else { + xc->setPredicate(false); + %(pred_fixup)s; +#if FULL_SYSTEM + PseudoInst::quiesceSkip(xc->tcBase()); +#endif + } + + return fault; + } +}}; + def template DataDecode {{ if (machInst.opcode4 == 0) { if (machInst.sField == 0) |