diff options
author | Nathan Binkert <nate@binkert.org> | 2009-04-08 22:21:27 -0700 |
---|---|---|
committer | Nathan Binkert <nate@binkert.org> | 2009-04-08 22:21:27 -0700 |
commit | e0de2c34433be76eac7798e58e1ae02f5bffb732 (patch) | |
tree | 120f809cf3feb35e6b42e83a9896b8ae673c5445 /src/sim/tlb.hh | |
parent | 7b5a96f06b530db35637aca6f9d0f7a2ddfa6e60 (diff) | |
download | gem5-e0de2c34433be76eac7798e58e1ae02f5bffb732.tar.xz |
tlb: More fixing of unified TLB
Diffstat (limited to 'src/sim/tlb.hh')
-rw-r--r-- | src/sim/tlb.hh | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/src/sim/tlb.hh b/src/sim/tlb.hh index 6c1bf5350..db62b691d 100644 --- a/src/sim/tlb.hh +++ b/src/sim/tlb.hh @@ -42,10 +42,14 @@ class Packet; class BaseTLB : public SimObject { protected: - BaseTLB(const Params *p) : SimObject(p) + BaseTLB(const Params *p) + : SimObject(p) {} public: + enum Mode { Read, Write, Execute }; + + public: virtual void demapPage(Addr vaddr, uint64_t asn) = 0; class Translation @@ -59,24 +63,24 @@ class BaseTLB : public SimObject * be responsible for cleaning itself up which will happen in this * function. Once it's called, the object is no longer valid. */ - virtual void finish(Fault fault, RequestPtr req, - ThreadContext *tc, bool write=false, bool execute=false) = 0; + virtual void finish(Fault fault, RequestPtr req, ThreadContext *tc, + Mode mode) = 0; }; }; class GenericTLB : public BaseTLB { protected: - GenericTLB(const Params *p) : BaseTLB(p) + GenericTLB(const Params *p) + : BaseTLB(p) {} public: void demapPage(Addr vaddr, uint64_t asn); - Fault translateAtomic(RequestPtr req, ThreadContext *tc, - bool=false, bool=false); + Fault translateAtomic(RequestPtr req, ThreadContext *tc, Mode mode); void translateTiming(RequestPtr req, ThreadContext *tc, - Translation *translation, bool=false, bool=false); + Translation *translation, Mode mode); }; #endif // __ARCH_SPARC_TLB_HH__ |