arch-riscv: Implement the resetThread method on the ISA object.

This method invokes a Reset fault on the associated ThreadContext.

Change-Id: Ie0725b06e0b506640b9038a986a9c56d9eed7011
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/67573
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Roger Chang <rogerycchang@google.com>
This commit is contained in:
Gabe Black
2023-02-02 04:53:50 -08:00
parent c853187273
commit c9719b44a3
2 changed files with 9 additions and 0 deletions

View File

@@ -34,6 +34,7 @@
#include <set>
#include <sstream>
#include "arch/riscv/faults.hh"
#include "arch/riscv/interrupts.hh"
#include "arch/riscv/mmu.hh"
#include "arch/riscv/pagetable.hh"
@@ -723,6 +724,12 @@ ISA::globalClearExclusive()
tc->getCpuPtr()->wakeup(tc->threadId());
}
void
ISA::resetThread()
{
Reset().invoke(tc);
}
} // namespace RiscvISA
} // namespace gem5

View File

@@ -127,6 +127,8 @@ class ISA : public BaseISA
void globalClearExclusive() override;
void resetThread() override;
RiscvType rvType() const { return rv_type; }
};