mem-ruby: warns on masked functional writes
authorTiago Mück <tiago.muck@arm.com>
Fri, 17 Jul 2020 15:49:31 +0000 (10:49 -0500)
committerTiago Mück <tiago.muck@arm.com>
Thu, 11 Feb 2021 17:05:01 +0000 (17:05 +0000)
It's not expected to issue masked functional writes or to receive
functional writes to an address with a pending masked write.

Change-Id: Ibc8ba5f642ff72f897e3a50011c0da6d3000b741
Signed-off-by: Tiago Mück <tiago.muck@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/41133
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
src/mem/ruby/slicc_interface/RubyRequest.cc

index f2099dbd3938c9cd44c68baf79559e89b3d98b96..3cafabed51cdba991e10dc8144cd9517b3e76d51 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2019 ARM Limited
+ * Copyright (c) 2019,2021 ARM Limited
  * All rights reserved.
  *
  * The license below extends only to copyright in the software and shall
@@ -82,6 +82,13 @@ RubyRequest::functionalWrite(Packet *pkt)
     if (!data)
       return false;
 
+    if (pkt->isMaskedWrite() || m_pkt->isMaskedWrite()) {
+        warn("Skiping functional write to/from a masked write packet"
+            " (addr: %#x, other addr: %#x).\n", m_PhysicalAddress,
+              pkt->getAddr());
+        return false;
+    }
+
     Addr wBase = pkt->getAddr();
     Addr wTail = wBase + pkt->getSize();
     Addr mBase = m_PhysicalAddress;