io_device.hh (2665:a124942bacb8) | io_device.hh (2685:a0821abe7132) |
---|---|
1/* 2 * Copyright (c) 2004-2005 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 107 unchanged lines hidden (view full) --- 116 PioPort(PioDevice *dev, Platform *p); 117 118 friend class PioPort::SendEvent; 119}; 120 121 122struct DmaReqState : public Packet::SenderState 123{ | 1/* 2 * Copyright (c) 2004-2005 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 107 unchanged lines hidden (view full) --- 116 PioPort(PioDevice *dev, Platform *p); 117 118 friend class PioPort::SendEvent; 119}; 120 121 122struct DmaReqState : public Packet::SenderState 123{ |
124 /** Event to call on the device when this transaction (all packets) 125 * complete. */ |
|
124 Event *completionEvent; | 126 Event *completionEvent; |
127 128 /** Where we came from for some sanity checking. */ 129 Port *outPort; 130 131 /** Total number of bytes that this transaction involves. */ 132 Addr totBytes; 133 134 /** Number of bytes that have been acked for this transaction. */ 135 Addr numBytes; 136 |
|
125 bool final; | 137 bool final; |
126 DmaReqState(Event *ce, bool f) 127 : completionEvent(ce), final(f) | 138 DmaReqState(Event *ce, Port *p, Addr tb) 139 : completionEvent(ce), outPort(p), totBytes(tb), numBytes(0) |
128 {} 129}; 130 131class DmaPort : public Port 132{ 133 protected: 134 DmaDevice *device; 135 std::list<Packet*> transmitList; --- 14 unchanged lines hidden (view full) --- 150 virtual void recvStatusChange(Status status) 151 { ; } 152 153 virtual void recvRetry() ; 154 155 virtual void getDeviceAddressRanges(AddrRangeList &resp, AddrRangeList &snoop) 156 { resp.clear(); snoop.clear(); } 157 | 140 {} 141}; 142 143class DmaPort : public Port 144{ 145 protected: 146 DmaDevice *device; 147 std::list<Packet*> transmitList; --- 14 unchanged lines hidden (view full) --- 162 virtual void recvStatusChange(Status status) 163 { ; } 164 165 virtual void recvRetry() ; 166 167 virtual void getDeviceAddressRanges(AddrRangeList &resp, AddrRangeList &snoop) 168 { resp.clear(); snoop.clear(); } 169 |
158 void sendDma(Packet *pkt); | 170 void sendDma(Packet *pkt, bool front = false); |
159 160 public: 161 DmaPort(DmaDevice *dev, Platform *p); 162 163 void dmaAction(Packet::Command cmd, Addr addr, int size, Event *event, 164 uint8_t *data = NULL); 165 166 bool dmaPending() { return pendingCount > 0; } --- 154 unchanged lines hidden --- | 171 172 public: 173 DmaPort(DmaDevice *dev, Platform *p); 174 175 void dmaAction(Packet::Command cmd, Addr addr, int size, Event *event, 176 uint8_t *data = NULL); 177 178 bool dmaPending() { return pendingCount > 0; } --- 154 unchanged lines hidden --- |