summaryrefslogtreecommitdiff
path: root/src/arch/arm/tlb.hh
diff options
context:
space:
mode:
authorAli Saidi <Ali.Saidi@ARM.com>2010-10-01 16:03:27 -0500
committerAli Saidi <Ali.Saidi@ARM.com>2010-10-01 16:03:27 -0500
commit521d68c82a2399bfe32f282aa58708103369b99c (patch)
treee1856347d34b43c3064cfbc898f92284527616d2 /src/arch/arm/tlb.hh
parent518b5e5b1c71259ce0badc29f98db46a73c59442 (diff)
downloadgem5-521d68c82a2399bfe32f282aa58708103369b99c.tar.xz
ARM: Implement functional virtual to physical address translation
for debugging and program introspection.
Diffstat (limited to 'src/arch/arm/tlb.hh')
-rw-r--r--src/arch/arm/tlb.hh18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/arch/arm/tlb.hh b/src/arch/arm/tlb.hh
index eec52d9d2..caccad873 100644
--- a/src/arch/arm/tlb.hh
+++ b/src/arch/arm/tlb.hh
@@ -97,7 +97,13 @@ class TLB : public BaseTLB
#endif
void nextnlu() { if (++nlu >= size) nlu = 0; }
- TlbEntry *lookup(Addr vpn, uint8_t asn);
+ /** Lookup an entry in the TLB
+ * @param vpn virtual address
+ * @param asn context id/address space id to use
+ * @param functional if the lookup should modify state
+ * @return pointer to TLB entrry if it exists
+ */
+ TlbEntry *lookup(Addr vpn, uint8_t asn, bool functional = false);
// Access Stats
mutable Stats::Scalar read_hits;
@@ -154,6 +160,16 @@ class TLB : public BaseTLB
static bool validVirtualAddress(Addr vaddr);
+ /**
+ * Do a functional lookup on the TLB (for debugging)
+ * and don't modify any internal state
+ * @param tc thread context to get the context id from
+ * @param vaddr virtual address to translate
+ * @param pa returned physical address
+ * @return if the translation was successful
+ */
+ bool translateFunctional(ThreadContext *tc, Addr vaddr, Addr &paddr);
+
/** Accessor functions for memory attributes for last accessed TLB entry
*/
void