/*
- * 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
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;
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;
};
}
}
- /**
- * 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:
/**
Event *getChunkEvent()
{
++count;
- return new DmaChunkEvent(this);
+ return new EventFunctionWrapper([this]{ chunkComplete(); }, name(),
+ true);
}
};
/** 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;