Gabe Black has submitted this change. ( https://gem5-review.googlesource.com/c/public/gem5/+/67573?usp=email )

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

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 <gabebl...@google.com>
Tested-by: kokoro <noreply+kok...@google.com>
Reviewed-by: Roger Chang <rogerycch...@google.com>
---
M src/arch/riscv/isa.cc
M src/arch/riscv/isa.hh
2 files changed, 24 insertions(+), 0 deletions(-)

Approvals:
  Roger Chang: Looks good to me, approved
  kokoro: Regressions pass
  Gabe Black: Looks good to me, approved




diff --git a/src/arch/riscv/isa.cc b/src/arch/riscv/isa.cc
index 6e4c380..3809c61 100644
--- a/src/arch/riscv/isa.cc
+++ b/src/arch/riscv/isa.cc
@@ -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 @@
     tc->getCpuPtr()->wakeup(tc->threadId());
 }

+void
+ISA::resetThread()
+{
+    Reset().invoke(tc);
+}
+
 } // namespace RiscvISA
 } // namespace gem5

diff --git a/src/arch/riscv/isa.hh b/src/arch/riscv/isa.hh
index e332956..5a2a610 100644
--- a/src/arch/riscv/isa.hh
+++ b/src/arch/riscv/isa.hh
@@ -127,6 +127,8 @@

     void globalClearExclusive() override;

+    void resetThread() override;
+
     RiscvType rvType() const { return rv_type; }
 };


--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/67573?usp=email To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: Ie0725b06e0b506640b9038a986a9c56d9eed7011
Gerrit-Change-Number: 67573
Gerrit-PatchSet: 2
Gerrit-Owner: Gabe Black <gabe.bl...@gmail.com>
Gerrit-Reviewer: Gabe Black <gabebl...@google.com>
Gerrit-Reviewer: Roger Chang <rogerycch...@google.com>
Gerrit-Reviewer: Yu-hsin Wang <yuhsi...@google.com>
Gerrit-Reviewer: kokoro <noreply+kok...@google.com>
Gerrit-CC: Giacomo Travaglini <giacomo.travagl...@arm.com>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org

Reply via email to