mem: Fix guest corruption when caches handle uncacheable accesses
[gem5.git] / src / mem / coherent_bus.hh
index b5f0cdee530f3eadab7cf2285ffc1de4ed8bfd70..61406608b5a39b8d6fcc7eab127806376f1d4b0b 100644 (file)
@@ -63,6 +63,7 @@
  * The coherent bus can be used as a template for modelling QPI,
 * HyperTransport, ACE and coherent OCP buses, and is typically used
  * for the L1-to-L2 buses and as the main system interconnect.
+ * @sa  \ref gem5MemorySystem "gem5 Memory System"
  */
 class CoherentBus : public BaseBus
 {
@@ -70,9 +71,12 @@ class CoherentBus : public BaseBus
   protected:
 
     /**
-     * Declare the single layer of this bus.
+     * Declare the three layers of this bus, one for requests, one
+     * for responses, and one for snoop responses
      */
-    Layer layer;
+    Layer<SlavePort> reqLayer;
+    Layer<MasterPort> respLayer;
+    Layer<SlavePort> snoopRespLayer;
 
     /**
      * Declaration of the coherent bus slave port type, one will be
@@ -136,7 +140,7 @@ class CoherentBus : public BaseBus
          * Get the maximum block size as seen by the bus.
          */
         virtual unsigned deviceBlockSize() const
-        { return bus.findBlockSize(); }
+        { return bus.deviceBlockSize(); }
 
     };
 
@@ -207,7 +211,7 @@ class CoherentBus : public BaseBus
         // take the max of it. This might need to be changed a bit if we ever
         // support multiple block sizes.
         virtual unsigned deviceBlockSize() const
-        { return bus.findBlockSize(); }
+        { return bus.deviceBlockSize(); }
 
     };
 
@@ -295,7 +299,7 @@ class CoherentBus : public BaseBus
 
     CoherentBus(const CoherentBusParams *p);
 
-    unsigned int drain(Event *de);
+    unsigned int drain(DrainManager *dm);
 };
 
 #endif //__MEM_COHERENT_BUS_HH__