Skip to content

Commit

Permalink
fix: Stop assertion failure caused by speculative instructions.
Browse files Browse the repository at this point in the history
A better way is to add a speculative flag to these instructions and do not check these assertions for these instructions
  • Loading branch information
xusine committed Sep 28, 2024
1 parent 1d4aef7 commit 78c5b16
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion components/MMU/pageWalk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,8 @@ PageWalk::InitialTranslationSetup(TranslationTransport& aTranslation)

// Handle a case where for Linux, the page table of EL0 is in EL1's register.
if (EL == 0) {
DBG_Assert(statefulPointer->isBR0);
// There might be speculative memory accesses, so the following check may not be passed.
// DBG_Assert(statefulPointer->isBR0);
EL = 1;
};

Expand Down
3 changes: 2 additions & 1 deletion components/uArch/CoreModel/arbiter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,8 @@ CoreImpl::scanAndBlockMSHR(memq_t::index<by_insn>::type::iterator anLSQEntry)
// Check for an existing MSHR for the same address (issued this cycle)
MSHRs_t::iterator existing = theMSHRs.find(anLSQEntry->thePaddr);
if (existing != theMSHRs.end()) {
DBG_Assert(!existing->second.theWaitingLSQs.empty());
// Maybe the original load was a speculative load that was annulled
// DBG_Assert(!existing->second.theWaitingLSQs.empty());
existing->second.theBlockedOps.push_back(anLSQEntry->theInstruction);
return true;
}
Expand Down

0 comments on commit 78c5b16

Please sign in to comment.