From 7d70967abaf1ce3a09433620dc41ed48c2fc0db0 Mon Sep 17 00:00:00 2001 From: Nikos Nikoleris Date: Tue, 21 Feb 2017 12:06:37 +0000 Subject: arm: Add CMO support for Non-Cacheable memory Cache Maintainance operations to the point of coherence are treated as normal cahceable requests and clean and/or invalidate the caches of all PEs. Change-Id: Ia4a749c2318fe29c8601848b034b8315c4186c8a Reviewed-by: Andreas Sandberg Reviewed-on: https://gem5-review.googlesource.com/5056 Maintainer: Andreas Sandberg Reviewed-by: Jason Lowe-Power --- src/arch/arm/tlb.cc | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/arch/arm/tlb.cc b/src/arch/arm/tlb.cc index 6f7998db2..de7ebf8b6 100644 --- a/src/arch/arm/tlb.cc +++ b/src/arch/arm/tlb.cc @@ -1007,7 +1007,10 @@ TLB::translateFs(RequestPtr req, ThreadContext *tc, Mode mode, if ((req->isInstFetch() && (!sctlr.i)) || ((!req->isInstFetch()) && (!sctlr.c))){ - req->setFlags(Request::UNCACHEABLE | Request::STRICT_ORDER); + if (!req->isCacheMaintenance()) { + req->setFlags(Request::UNCACHEABLE); + } + req->setFlags(Request::STRICT_ORDER); } if (!is_fetch) { assert(flags & MustBeOne); @@ -1033,11 +1036,12 @@ TLB::translateFs(RequestPtr req, ThreadContext *tc, Mode mode, req->setFlags(Request::SECURE); // @todo: double check this (ARM ARM issue C B3.2.1) - if (long_desc_format || sctlr.tre == 0) { - req->setFlags(Request::UNCACHEABLE | Request::STRICT_ORDER); - } else { - if (nmrr.ir0 == 0 || nmrr.or0 == 0 || prrr.tr0 != 0x2) - req->setFlags(Request::UNCACHEABLE | Request::STRICT_ORDER); + if (long_desc_format || sctlr.tre == 0 || nmrr.ir0 == 0 || + nmrr.or0 == 0 || prrr.tr0 != 0x2) { + if (!req->isCacheMaintenance()) { + req->setFlags(Request::UNCACHEABLE); + } + req->setFlags(Request::STRICT_ORDER); } // Set memory attributes @@ -1091,7 +1095,7 @@ TLB::translateFs(RequestPtr req, ThreadContext *tc, Mode mode, static_cast(te->mtype), isStage2); setAttr(te->attributes); - if (te->nonCacheable) + if (te->nonCacheable && !req->isCacheMaintenance()) req->setFlags(Request::UNCACHEABLE); // Require requests to be ordered if the request goes to -- cgit v1.2.3