diff options
author | Nathan Binkert <nate@binkert.org> | 2009-04-21 16:04:55 -0700 |
---|---|---|
committer | Nathan Binkert <nate@binkert.org> | 2009-04-21 16:04:55 -0700 |
commit | 4d001e43da6da2972172c352153e745238860021 (patch) | |
tree | dfd0052a6ece6690540df06b4742e6d4d4cc2034 /src/arch/arm/tlb.cc | |
parent | 4f7d6a881ce959663cb32f9bb70b4a6b40a456e1 (diff) | |
parent | fcc142463d38fc1d752b2e45c24a9e1040ccfc9e (diff) | |
download | gem5-4d001e43da6da2972172c352153e745238860021.tar.xz |
Automated merge with ssh://m5sim.org//repo/m5
Diffstat (limited to 'src/arch/arm/tlb.cc')
-rw-r--r-- | src/arch/arm/tlb.cc | 85 |
1 files changed, 10 insertions, 75 deletions
diff --git a/src/arch/arm/tlb.cc b/src/arch/arm/tlb.cc index 78eebddfe..8cce5c152 100644 --- a/src/arch/arm/tlb.cc +++ b/src/arch/arm/tlb.cc @@ -36,20 +36,17 @@ #include <string> #include <vector> +#include "arch/arm/faults.hh" #include "arch/arm/pagetable.hh" #include "arch/arm/tlb.hh" -#include "arch/arm/faults.hh" #include "arch/arm/utility.hh" #include "base/inifile.hh" #include "base/str.hh" #include "base/trace.hh" #include "cpu/thread_context.hh" -#include "sim/process.hh" #include "mem/page_table.hh" -#include "params/ArmDTB.hh" -#include "params/ArmITB.hh" #include "params/ArmTLB.hh" -#include "params/ArmUTB.hh" +#include "sim/process.hh" using namespace std; @@ -279,7 +276,7 @@ TLB::regStats() } Fault -ITB::translateAtomic(RequestPtr req, ThreadContext *tc) +TLB::translateAtomic(RequestPtr req, ThreadContext *tc, Mode mode) { #if !FULL_SYSTEM Process * p = tc->getProcessPtr(); @@ -290,68 +287,18 @@ ITB::translateAtomic(RequestPtr req, ThreadContext *tc) return NoFault; #else - fatal("ITB translate not yet implemented\n"); + fatal("translate atomic not yet implemented\n"); #endif } void -ITB::translateTiming(RequestPtr req, ThreadContext *tc, - Translation *translation) +TLB::translateTiming(RequestPtr req, ThreadContext *tc, + Translation *translation, Mode mode) { assert(translation); - translation->finish(translateAtomic(req, tc), req, tc, false); -} - - -Fault -DTB::translateAtomic(RequestPtr req, ThreadContext *tc, bool write) -{ -#if !FULL_SYSTEM - Process * p = tc->getProcessPtr(); - - Fault fault = p->pTable->translate(req); - if(fault != NoFault) - return fault; - - return NoFault; -#else - fatal("DTB translate not yet implemented\n"); -#endif + translation->finish(translateAtomic(req, tc, mode), req, tc, mode); } -void -DTB::translateTiming(RequestPtr req, ThreadContext *tc, - Translation *translation, bool write) -{ - assert(translation); - translation->finish(translateAtomic(req, tc, write), req, tc, write); -} - -/////////////////////////////////////////////////////////////////////// -// -// Arm ITB -// -ITB::ITB(const Params *p) - : TLB(p) -{} - - -/////////////////////////////////////////////////////////////////////// -// -// Arm DTB -// -DTB::DTB(const Params *p) - : TLB(p) -{} - -/////////////////////////////////////////////////////////////////////// -// -// Arm UTB -// -UTB::UTB(const Params *p) - : ITB(p), DTB(p) -{} - ArmISA::PTE & TLB::index(bool advance) { @@ -363,20 +310,8 @@ TLB::index(bool advance) return *pte; } -ArmISA::ITB * -ArmITBParams::create() -{ - return new ArmISA::ITB(this); -} - -ArmISA::DTB * -ArmDTBParams::create() -{ - return new ArmISA::DTB(this); -} - -ArmISA::UTB * -ArmUTBParams::create() +ArmISA::TLB * +ArmTLBParams::create() { - return new ArmISA::UTB(this); + return new ArmISA::TLB(this); } |