summaryrefslogtreecommitdiff
path: root/src/arch/x86/tlb.hh
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2009-04-08 22:21:27 -0700
committerGabe Black <gblack@eecs.umich.edu>2009-04-08 22:21:27 -0700
commit7b5a96f06b530db35637aca6f9d0f7a2ddfa6e60 (patch)
tree4c212f665de2628eac6f84d389de7a79b6d0b933 /src/arch/x86/tlb.hh
parent08043c777f1f05f5e14581950013461f328965be (diff)
downloadgem5-7b5a96f06b530db35637aca6f9d0f7a2ddfa6e60.tar.xz
tlb: Don't separate the TLB classes into an instruction TLB and a data TLB
Diffstat (limited to 'src/arch/x86/tlb.hh')
-rw-r--r--src/arch/x86/tlb.hh48
1 files changed, 7 insertions, 41 deletions
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<TlbEntry *> 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 &section);
- };
-
- 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 &section);