Deal with invalidations intersecting outstanding upgrades.
[gem5.git] / src / mem / port.hh
index fdb5bfab41b0737b468d4490ee7b821b496b1b90..b23de60509ddd6c268d39d72e74612a1e7d186cf 100644 (file)
@@ -120,7 +120,7 @@ class Port
     { portName = name; }
 
     /** Function to set the pointer for the peer port. */
-    void setPeer(Port *port);
+    virtual void setPeer(Port *port);
 
     /** Function to get the pointer to the peer port. */
     Port *getPeer() { return peer; }
@@ -131,6 +131,11 @@ class Port
     /** Function to return the owner of this port. */
     MemObject *getOwner() { return owner; }
 
+    /** Inform the peer port to delete itself and notify it's owner about it's
+     * demise. */
+    void removeConn();
+
+
   protected:
 
     /** These functions are protected because they should only be
@@ -156,10 +161,10 @@ class Port
 
     /** Called by a peer port in order to determine the block size of the
         device connected to this port.  It sometimes doesn't make sense for
-        this function to be called, a DMA interface doesn't really have a
-        block size, so it is defaulted to a panic.
+        this function to be called, so it just returns 0. Anytthing that is
+        concerned with the size should just ignore that.
     */
-    virtual int deviceBlockSize() { panic("??"); M5_DUMMY_RETURN }
+    virtual int deviceBlockSize() { return 0; }
 
     /** The peer port is requesting us to reply with a list of the ranges we
         are responsible for.
@@ -167,7 +172,7 @@ class Port
         @param snoop is a list of ranges snooped
     */
     virtual void getDeviceAddressRanges(AddrRangeList &resp,
-            AddrRangeList &snoop)
+                                        bool &snoop)
     { panic("??"); }
 
   public:
@@ -217,7 +222,7 @@ class Port
     /** Called by the associated device if it wishes to find out the address
         ranges connected to the peer ports devices.
     */
-    void getPeerAddressRanges(AddrRangeList &resp, AddrRangeList &snoop)
+    void getPeerAddressRanges(AddrRangeList &resp, bool &snoop)
     { peer->getDeviceAddressRanges(resp, snoop); }
 
     /** This function is a wrapper around sendFunctional()