1/* 2 * Copyright (c) 2006 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; --- 102 unchanged lines hidden (view full) --- 111 ranges.push_back(RangeSize(pioAddr, pioSize)); 112 return ranges; 113} 114 115 116DmaPort::DmaPort(MemObject *dev, System *s, Tick min_backoff, Tick max_backoff, 117 bool recv_snoops) 118 : Port(dev->name() + "-dmaport", dev), device(dev), sys(s), |
119 masterId(s->getMasterId(dev->name())), |
120 pendingCount(0), actionInProgress(0), drainEvent(NULL), 121 backoffTime(0), minBackoffDelay(min_backoff), 122 maxBackoffDelay(max_backoff), inRetry(false), recvSnoops(recv_snoops), 123 backoffEvent(this) 124{ } 125 126bool 127DmaPort::recvTiming(PacketPtr pkt) --- 55 unchanged lines hidden (view full) --- 183 184 return true; 185} 186 187DmaDevice::DmaDevice(const Params *p) 188 : PioDevice(p), dmaPort(NULL) 189{ } 190 |
191unsigned int 192DmaDevice::drain(Event *de) 193{ 194 unsigned int count; 195 count = pioPort->drain(de) + dmaPort->drain(de); 196 if (count) 197 changeState(Draining); 198 else --- 50 unchanged lines hidden (view full) --- 249 250 DmaReqState *reqState = new DmaReqState(event, this, size, delay); 251 252 253 DPRINTF(DMA, "Starting DMA for addr: %#x size: %d sched: %d\n", addr, size, 254 event ? event->scheduled() : -1 ); 255 for (ChunkGenerator gen(addr, size, peerBlockSize()); 256 !gen.done(); gen.next()) { |
257 Request *req = new Request(gen.addr(), gen.size(), flag, masterId); |
258 PacketPtr pkt = new Packet(req, cmd, Packet::Broadcast); 259 260 // Increment the data pointer on a write 261 if (data) 262 pkt->dataStatic(data + gen.complete()); 263 264 pkt->senderState = reqState; 265 --- 118 unchanged lines hidden --- |