summaryrefslogtreecommitdiff
path: root/src/sim
diff options
context:
space:
mode:
Diffstat (limited to 'src/sim')
-rw-r--r--src/sim/tlb.cc6
-rw-r--r--src/sim/tlb.hh16
2 files changed, 20 insertions, 2 deletions
diff --git a/src/sim/tlb.cc b/src/sim/tlb.cc
index de6779839..7292a69e0 100644
--- a/src/sim/tlb.cc
+++ b/src/sim/tlb.cc
@@ -48,3 +48,9 @@ GenericTLB::translate(RequestPtr req, ThreadContext * tc, bool)
return NoFault;
#endif
}
+
+void
+GenericTLB::demapPage(Addr vaddr, uint64_t asn)
+{
+ warn("Demapping pages in the generic TLB is unnecessary.\n");
+}
diff --git a/src/sim/tlb.hh b/src/sim/tlb.hh
index b5e341185..011cc1144 100644
--- a/src/sim/tlb.hh
+++ b/src/sim/tlb.hh
@@ -39,13 +39,25 @@
class ThreadContext;
class Packet;
-class GenericTLB : public SimObject
+class BaseTLB : public SimObject
{
protected:
- GenericTLB(const Params *p) : SimObject(p)
+ BaseTLB(const Params *p) : SimObject(p)
{}
public:
+ virtual void demapPage(Addr vaddr, uint64_t asn) = 0;
+};
+
+class GenericTLB : public BaseTLB
+{
+ protected:
+ GenericTLB(const Params *p) : BaseTLB(p)
+ {}
+
+ public:
+ void demapPage(Addr vaddr, uint64_t asn);
+
Fault translate(RequestPtr req, ThreadContext *tc, bool=false);
};