From 6875e8d8391035edf8fc4a8fdb29f614a527b0bc Mon Sep 17 00:00:00 2001 From: Ali Saidi Date: Thu, 8 Jun 2006 19:43:50 -0400 Subject: add nacked result and a function to swizzle nacked packet into something that can be sent out again implement ability for i/o devices to handle src/dev/io_device.cc: src/dev/io_device.hh: implement ability for i/o devices to handle src/mem/packet.hh: add nacked result and a function to swizzle nacked packet into something that can be sent out again --HG-- extra : convert_revision : fa42b01f4ab21562d37bd6bf6f4d7f69a94f0e86 --- src/dev/io_device.hh | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'src/dev/io_device.hh') diff --git a/src/dev/io_device.hh b/src/dev/io_device.hh index 3cb18c9fa..195ca0fb7 100644 --- a/src/dev/io_device.hh +++ b/src/dev/io_device.hh @@ -121,10 +121,22 @@ class PioPort : public Port struct DmaReqState : public Packet::SenderState { + /** Event to call on the device when this transaction (all packets) + * complete. */ Event *completionEvent; + + /** Where we came from for some sanity checking. */ + Port *outPort; + + /** Total number of bytes that this transaction involves. */ + Addr totBytes; + + /** Number of bytes that have been acked for this transaction. */ + Addr numBytes; + bool final; - DmaReqState(Event *ce, bool f) - : completionEvent(ce), final(f) + DmaReqState(Event *ce, Port *p, Addr tb) + : completionEvent(ce), outPort(p), totBytes(tb), numBytes(0) {} }; @@ -155,7 +167,7 @@ class DmaPort : public Port virtual void getDeviceAddressRanges(AddrRangeList &resp, AddrRangeList &snoop) { resp.clear(); snoop.clear(); } - void sendDma(Packet *pkt); + void sendDma(Packet *pkt, bool front = false); public: DmaPort(DmaDevice *dev, Platform *p); -- cgit v1.2.3