diff options
Diffstat (limited to 'src/sim/tlb.cc')
-rw-r--r-- | src/sim/tlb.cc | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/src/sim/tlb.cc b/src/sim/tlb.cc index 9c3166280..5ceec637e 100644 --- a/src/sim/tlb.cc +++ b/src/sim/tlb.cc @@ -34,21 +34,17 @@ #include "sim/tlb.hh" Fault -GenericITB::translate(RequestPtr &req, ThreadContext *tc) +GenericTLBBase::translate(RequestPtr req, ThreadContext * tc) { #if FULL_SYSTEM - panic("Generic ITB translation shouldn't be used in full system mode.\n"); + panic("Generic translation shouldn't be used in full system mode.\n"); #else - return tc->getProcessPtr()->pTable->translate(req); -#endif -} + Process * p = tc->getProcessPtr(); -Fault -GenericDTB::translate(RequestPtr &req, ThreadContext *tc, bool write) -{ -#if FULL_SYSTEM - panic("Generic DTB translation shouldn't be used in full system mode.\n"); -#else - return tc->getProcessPtr()->pTable->translate(req); + Fault fault = p->pTable->translate(req); + if(fault != NoFault) + return fault; + + return NoFault; #endif -}; +} |