From 94561dd5268d139b721561166cbce94170701c2c Mon Sep 17 00:00:00 2001 From: Andreas Sandberg Date: Mon, 7 Jan 2013 13:05:40 -0500 Subject: arch: Add support for invalidating TLBs when draining This patch adds support for the memInvalidate() drain method. TLB flushing is requested by calling the virtual flushAll() method on the TLB. Note: This patch renames invalidateAll() to flushAll() on x86 and SPARC to make the interface consistent across all supported architectures. --- src/sim/tlb.hh | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/sim') diff --git a/src/sim/tlb.hh b/src/sim/tlb.hh index aadf047bf..95a252e16 100644 --- a/src/sim/tlb.hh +++ b/src/sim/tlb.hh @@ -64,6 +64,11 @@ class BaseTLB : public SimObject public: virtual void demapPage(Addr vaddr, uint64_t asn) = 0; + /** + * Remove all entries from the TLB + */ + virtual void flushAll() = 0; + /** * Get the table walker master port if present. This is used for * migrating port connections during a CPU takeOverFrom() @@ -75,6 +80,8 @@ class BaseTLB : public SimObject */ virtual BaseMasterPort* getMasterPort() { return NULL; } + void memInvalidate() { flushAll(); } + class Translation { public: -- cgit v1.2.3