mem-cache: Create an address aware TempCacheBlk
[gem5.git] / src / mem / snoop_filter.hh
old mode 100755 (executable)
new mode 100644 (file)
index 407b6f7..85cc75e
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013-2015 ARM Limited
+ * Copyright (c) 2013-2016 ARM Limited
  * All rights reserved
  *
  * The license below extends only to copyright in the software and shall
@@ -45,9 +45,9 @@
 #ifndef __MEM_SNOOP_FILTER_HH__
 #define __MEM_SNOOP_FILTER_HH__
 
+#include <unordered_map>
 #include <utility>
 
-#include "base/hashmap.hh"
 #include "mem/packet.hh"
 #include "mem/port.hh"
 #include "mem/qport.hh"
@@ -141,9 +141,9 @@ class SnoopFilter : public SimObject {
      * reqLookupResult.
      *
      * @param will_retry    This request will retry on this bus / snoop filter
-     * @param cpkt          Request packet, merely for sanity checking
+     * @param addr          Packet address, merely for sanity checking
      */
-    void finishRequest(bool will_retry, const Packet* cpkt);
+    void finishRequest(bool will_retry, Addr addr, bool is_secure);
 
     /**
      * Handle an incoming snoop from below (the master port). These
@@ -218,7 +218,7 @@ class SnoopFilter : public SimObject {
     /**
      * HashMap of SnoopItems indexed by line address
      */
-    typedef m5::hash_map<Addr, SnoopItem> SnoopFilterCache;
+    typedef std::unordered_map<Addr, SnoopItem> SnoopFilterCache;
 
     /**
      * Simple factory methods for standard return values.
@@ -282,6 +282,14 @@ class SnoopFilter : public SimObject {
     /** Max capacity in terms of cache blocks tracked, for sanity checking */
     const unsigned maxEntryCount;
 
+    /**
+     * Use the lower bits of the address to keep track of the line status
+     */
+    enum LineStatus {
+        /** block holds data from the secure memory space */
+        LineSecure = 0x01,
+    };
+
     /** Statistics */
     Stats::Scalar totRequests;
     Stats::Scalar hitSingleRequests;