misc: missing override specifier
[gem5.git] / src / dev / dma_device.hh
index 4e66b34565a6a08f456dec7480e79b9725e38eec..f556e14e30e97ec14dd4fccdfe8b06b2c8167e02 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012-2013, 2015 ARM Limited
+ * Copyright (c) 2012-2013, 2015, 2017 ARM Limited
  * All rights reserved.
  *
  * The license below extends only to copyright in the software and shall
@@ -123,7 +123,7 @@ class DmaPort : public MasterPort, public Drainable
     std::deque<PacketPtr> transmitList;
 
     /** Event used to schedule a future sending from the transmit list. */
-    EventWrapper<DmaPort, &DmaPort::sendDma> sendEvent;
+    EventFunctionWrapper sendEvent;
 
     /** Number of outstanding packets the dma port has. */
     uint32_t pendingCount;
@@ -179,8 +179,8 @@ class DmaDevice : public PioDevice
 
     unsigned int cacheBlockSize() const { return sys->cacheLineSize(); }
 
-    BaseMasterPort &getMasterPort(const std::string &if_name,
-                                  PortID idx = InvalidPortID) override;
+    Port &getPort(const std::string &if_name,
+                  PortID idx=InvalidPortID) override;
 
 };
 
@@ -240,22 +240,6 @@ class DmaCallback : public Drainable
         }
     }
 
-    /**
-     * Event invoked by DmaDevice on completion of each chunk.
-     */
-    class DmaChunkEvent : public Event
-    {
-      private:
-        DmaCallback *callback;
-
-      public:
-        DmaChunkEvent(DmaCallback *cb)
-          : Event(Default_Pri, AutoDelete), callback(cb)
-        { }
-
-        void process() { callback->chunkComplete(); }
-    };
-
   public:
 
     /**
@@ -265,7 +249,8 @@ class DmaCallback : public Drainable
     Event *getChunkEvent()
     {
         ++count;
-        return new DmaChunkEvent(this);
+        return new EventFunctionWrapper([this]{ chunkComplete(); }, name(),
+                                        true);
     }
 };
 
@@ -494,9 +479,15 @@ class DmaReadFifo : public Drainable, public Serializable
     /** Handle pending requests that have been flagged as done. */
     void handlePending();
 
-    /** Try to issue new DMA requests */
+    /** Try to issue new DMA requests or bypass DMA requests*/
     void resumeFill();
 
+    /** Try to issue new DMA requests during normal execution*/
+    void resumeFillTiming();
+
+    /** Try to bypass DMA requests in KVM execution mode */
+    void resumeFillFunctional();
+
   private: // Internal state
     Fifo<uint8_t> buffer;