changeset f050b8cf4754 in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=f050b8cf4754
description:
        arm: Don't consult the TLB test iface for functional translations

        Don't consult the TLB test interface for PA's returned by functional
        translations by the AT instruction. We implement this by chaning the
        ISA code to synthesize 0-length functional reads for the TLB lookup.
        The TLB then bypasses the final PA check in the tester if the size is
        zero.

        Change-Id: I2487b7f829cea88c37e229e9fc7a4543aced961b
        Signed-off-by: Andreas Sandberg <[email protected]>
        Reviewed-by: Curtis Dunham <[email protected]>

diffstat:

 src/arch/arm/isa.cc |  4 ++--
 src/arch/arm/tlb.cc |  2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diffs (33 lines):

diff -r 3210a0b99c88 -r f050b8cf4754 src/arch/arm/isa.cc
--- a/src/arch/arm/isa.cc       Mon Jul 11 10:39:30 2016 +0100
+++ b/src/arch/arm/isa.cc       Mon Jul 11 10:39:56 2016 +0100
@@ -1520,7 +1520,7 @@
               // can't be an atomic translation because that causes problems
               // with unexpected atomic snoop requests.
               warn("Translating via MISCREG(%d) in functional mode! Fix 
Me!\n", misc_reg);
-              Request req(0, val, 1, flags,  Request::funcMasterId,
+              Request req(0, val, 0, flags,  Request::funcMasterId,
                           tc->pcState().pc(), tc->contextId());
               fault = tc->getDTBPtr()->translateFunctional(&req, tc, mode, 
tranType);
               TTBCR ttbcr = readMiscRegNoEffect(MISCREG_TTBCR);
@@ -1765,7 +1765,7 @@
                 // can't be an atomic translation because that causes problems
                 // with unexpected atomic snoop requests.
                 warn("Translating via MISCREG(%d) in functional mode! Fix 
Me!\n", misc_reg);
-                req->setVirt(0, val, 1, flags,  Request::funcMasterId,
+                req->setVirt(0, val, 0, flags,  Request::funcMasterId,
                                tc->pcState().pc());
                 req->setContext(tc->contextId());
                 fault = tc->getDTBPtr()->translateFunctional(req, tc, mode,
diff -r 3210a0b99c88 -r f050b8cf4754 src/arch/arm/tlb.cc
--- a/src/arch/arm/tlb.cc       Mon Jul 11 10:39:30 2016 +0100
+++ b/src/arch/arm/tlb.cc       Mon Jul 11 10:39:56 2016 +0100
@@ -1423,7 +1423,7 @@
 Fault
 TLB::testTranslation(RequestPtr req, Mode mode, TlbEntry::DomainType domain)
 {
-    if (!test) {
+    if (!test || !req->hasSize() || req->getSize() == 0) {
         return NoFault;
     } else {
         return test->translationCheck(req, isPriv, mode, domain);
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to