From: Gabe Black Date: Wed, 11 Mar 2020 01:16:05 +0000 (-0700) Subject: power: Implement translateFunctional. X-Git-Tag: v20.0.0.0~397 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6fbf2e7b6eb61d72a3a2c5d6010f508aa04c1c0b;p=gem5.git power: Implement translateFunctional. Change-Id: I039a09879a50a7d50329c01c337cfa5674c34fae Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/26549 Maintainer: Gabe Black Tested-by: kokoro Reviewed-by: Nikos Nikoleris --- diff --git a/src/arch/power/tlb.cc b/src/arch/power/tlb.cc index 89551bd91..478814e45 100644 --- a/src/arch/power/tlb.cc +++ b/src/arch/power/tlb.cc @@ -282,32 +282,20 @@ TLB::translateInst(const RequestPtr &req, ThreadContext *tc) return std::make_shared(); } - Process * p = tc->getProcessPtr(); - - Fault fault = p->pTable->translate(req); - if (fault != NoFault) - return fault; - - return NoFault; + return tc->getProcessPtr()->pTable->translate(req); } Fault TLB::translateData(const RequestPtr &req, ThreadContext *tc, bool write) { - Process * p = tc->getProcessPtr(); - - Fault fault = p->pTable->translate(req); - if (fault != NoFault) - return fault; - - return NoFault; + return tc->getProcessPtr()->pTable->translate(req); } Fault TLB::translateAtomic(const RequestPtr &req, ThreadContext *tc, Mode mode) { - if (FullSystem) - fatal("translate atomic not yet implemented in full system mode.\n"); + panic_if(FullSystem, + "translateAtomic not yet implemented for full system."); if (mode == Execute) return translateInst(req, tc); @@ -315,6 +303,14 @@ TLB::translateAtomic(const RequestPtr &req, ThreadContext *tc, Mode mode) return translateData(req, tc, mode == Write); } +Fault +TLB::translateFunctional(const RequestPtr &req, ThreadContext *tc, Mode mode) +{ + panic_if(FullSystem, + "translateFunctional not implemented for full system."); + return tc->getProcessPtr()->pTable->translate(req); +} + void TLB::translateTiming(const RequestPtr &req, ThreadContext *tc, Translation *translation, Mode mode) diff --git a/src/arch/power/tlb.hh b/src/arch/power/tlb.hh index 4f05cec12..044054cd3 100644 --- a/src/arch/power/tlb.hh +++ b/src/arch/power/tlb.hh @@ -162,6 +162,8 @@ class TLB : public BaseTLB void translateTiming( const RequestPtr &req, ThreadContext *tc, Translation *translation, Mode mode) override; + Fault translateFunctional( + const RequestPtr &req, ThreadContext *tc, Mode mode) override; Fault finalizePhysical( const RequestPtr &req, ThreadContext *tc, Mode mode) const override;