Javier Bueno Hedo has uploaded this change for review. (
https://gem5-review.googlesource.com/c/public/gem5/+/16543
Change subject: arch: Add lookUp to BaseTLB
......................................................................
arch: Add lookUp to BaseTLB
lookUp performs a non-timed translation lookUp. A parameter controls
wether a pt walk is allowed to solve the translation request.
Change-Id: I07e4a4f1ecf8e5b5874fad80fc20b45f9dbbda00
---
M src/arch/generic/tlb.cc
M src/arch/generic/tlb.hh
2 files changed, 30 insertions(+), 0 deletions(-)
diff --git a/src/arch/generic/tlb.cc b/src/arch/generic/tlb.cc
index aebdd4b..8c6815a 100644
--- a/src/arch/generic/tlb.cc
+++ b/src/arch/generic/tlb.cc
@@ -71,3 +71,10 @@
{
warn("Demapping pages in the generic TLB is unnecessary.\n");
}
+
+Fault
+GenericTLB::lookUp(const RequestPtr &req, ThreadContext *tc, Mode mode,
+ bool walk)
+{
+ return translateAtomic(req, tc, mode);
+}
diff --git a/src/arch/generic/tlb.hh b/src/arch/generic/tlb.hh
index 91f8f86..a1d9b0a 100644
--- a/src/arch/generic/tlb.hh
+++ b/src/arch/generic/tlb.hh
@@ -103,6 +103,25 @@
}
/**
+ * Do an untimed address look up. If the entry exists for the requested
+ * address, the physical address is updated in the corresponding
Request
+ * object. If the entry does not exist, a PT walk is done only if the
+ * parameter 'walk' is true. If 'walk' is false and the entry does not
+ * exist, a fault is returned and the state of the TLB is not modified.
+ *
+ * @param req Request to updated in-place.
+ * @param tc Thread context that created the request.
+ * @param mode Request type (read/write/execute).
+ * @param walk Do a pt walk if needed.
+ * @return A fault on failure, NoFault otherwise.
+ */
+ virtual Fault
+ lookUp(const RequestPtr &req, ThreadContext *tc, Mode mode, bool walk)
+ {
+ panic("Not implemented.\n");
+ }
+
+ /**
* Do post-translation physical address finalization.
*
* This method is used by some architectures that need
@@ -161,6 +180,10 @@
Fault finalizePhysical(
const RequestPtr &req, ThreadContext *tc, Mode mode) const
override;
+
+ Fault lookUp(
+ const RequestPtr &req, ThreadContext *tc,
+ Mode mode, bool walk) override;
};
#endif // __ARCH_GENERIC_TLB_HH__
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/16543
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: I07e4a4f1ecf8e5b5874fad80fc20b45f9dbbda00
Gerrit-Change-Number: 16543
Gerrit-PatchSet: 1
Gerrit-Owner: Javier Bueno Hedo <[email protected]>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev