From 7b5a96f06b530db35637aca6f9d0f7a2ddfa6e60 Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Wed, 8 Apr 2009 22:21:27 -0700 Subject: tlb: Don't separate the TLB classes into an instruction TLB and a data TLB --- src/arch/x86/tlb.hh | 48 +++++++----------------------------------------- 1 file changed, 7 insertions(+), 41 deletions(-) (limited to 'src/arch/x86/tlb.hh') diff --git a/src/arch/x86/tlb.hh b/src/arch/x86/tlb.hh index 2467bc472..f67a93d8d 100644 --- a/src/arch/x86/tlb.hh +++ b/src/arch/x86/tlb.hh @@ -67,8 +67,7 @@ #include "config/full_system.hh" #include "mem/mem_object.hh" #include "mem/request.hh" -#include "params/X86DTB.hh" -#include "params/X86ITB.hh" +#include "params/X86TLB.hh" #include "sim/faults.hh" #include "sim/tlb.hh" #include "sim/sim_object.hh" @@ -82,8 +81,6 @@ namespace X86ISA static const unsigned StoreCheck = 1 << NUM_SEGMENTREGS; - class TLB; - class TLB : public BaseTLB { protected: @@ -91,14 +88,9 @@ namespace X86ISA typedef std::list EntryList; - bool _allowNX; uint32_t configAddress; public: - bool allowNX() const - { - return _allowNX; - } typedef X86TLBParams Params; TLB(const Params *p); @@ -140,45 +132,19 @@ namespace X86ISA public: - TlbEntry * insert(Addr vpn, TlbEntry &entry); - - // Checkpointing - virtual void serialize(std::ostream &os); - virtual void unserialize(Checkpoint *cp, const std::string §ion); - }; - - class ITB : public TLB - { - public: - typedef X86ITBParams Params; - ITB(const Params *p) : TLB(p) - { - _allowNX = false; - } - - Fault translateAtomic(RequestPtr req, ThreadContext *tc); + Fault translateAtomic(RequestPtr req, ThreadContext *tc, + bool write = false, bool execute = false); void translateTiming(RequestPtr req, ThreadContext *tc, - Translation *translation); + Translation *translation, + bool write = false, bool execute = false); - friend class DTB; - }; - - class DTB : public TLB - { - public: - typedef X86DTBParams Params; - DTB(const Params *p) : TLB(p) - { - _allowNX = true; - } - Fault translateAtomic(RequestPtr req, ThreadContext *tc, bool write); - void translateTiming(RequestPtr req, ThreadContext *tc, - Translation *translation, bool write); #if FULL_SYSTEM Tick doMmuRegRead(ThreadContext *tc, Packet *pkt); Tick doMmuRegWrite(ThreadContext *tc, Packet *pkt); #endif + TlbEntry * insert(Addr vpn, TlbEntry &entry); + // Checkpointing virtual void serialize(std::ostream &os); virtual void unserialize(Checkpoint *cp, const std::string §ion); -- cgit v1.2.3