Deal with invalidations intersecting outstanding upgrades.
[gem5.git] / src / mem / port.hh
index 75afc04e623b810a7ac9d6ec8d9e9b46a3325dfb..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("??"); }
+    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()
@@ -245,7 +250,7 @@ class Port
 
     /** Internal helper function for read/writeBlob().
      */
-    void blobHelper(Addr addr, uint8_t *p, int size, Packet::Command cmd);
+    void blobHelper(Addr addr, uint8_t *p, int size, MemCmd cmd);
 };
 
 /** A simple functional port that is only meant for one way communication to
@@ -261,8 +266,10 @@ class FunctionalPort : public Port
     {}
 
   protected:
-    virtual bool recvTiming(PacketPtr pkt) { panic("FuncPort is UniDir"); }
-    virtual Tick recvAtomic(PacketPtr pkt) { panic("FuncPort is UniDir"); }
+    virtual bool recvTiming(PacketPtr pkt) { panic("FuncPort is UniDir");
+        M5_DUMMY_RETURN }
+    virtual Tick recvAtomic(PacketPtr pkt) { panic("FuncPort is UniDir");
+        M5_DUMMY_RETURN }
     virtual void recvFunctional(PacketPtr pkt) { panic("FuncPort is UniDir"); }
     virtual void recvStatusChange(Status status) {}