power: Implement translateFunctional.
Change-Id: I039a09879a50a7d50329c01c337cfa5674c34fae Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/26549 Maintainer: Gabe Black <gabeblack@google.com> Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
This commit is contained in:
@@ -282,32 +282,20 @@ TLB::translateInst(const RequestPtr &req, ThreadContext *tc)
|
||||
return std::make_shared<AlignmentFault>();
|
||||
}
|
||||
|
||||
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)
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user