1/* 2 * Copyright (c) 2012, 2015, 2017 ARM Limited 3 * All rights reserved. 4 * 5 * The license below extends only to copyright in the software and shall 6 * not be construed as granting a license to any other intellectual 7 * property including but not limited to intellectual property relating 8 * to a hardware implementation of the functionality of the software --- 81 unchanged lines hidden (view full) --- 90 if (state->totBytes == state->numBytes) { 91 if (state->completionEvent) { 92 delay += state->delay; 93 device->schedule(state->completionEvent, curTick() + delay); 94 } 95 delete state; 96 } 97 |
98 // delete the packet |
99 delete pkt; 100 101 // we might be drained at this point, if so signal the drain event 102 if (pendingCount == 0) 103 signalDrainDone(); 104} 105 106bool --- 52 unchanged lines hidden (view full) --- 159 // For simplicity, we return the last request, which would also be 160 // the only request in that case. 161 RequestPtr req = NULL; 162 163 DPRINTF(DMA, "Starting DMA for addr: %#x size: %d sched: %d\n", addr, size, 164 event ? event->scheduled() : -1); 165 for (ChunkGenerator gen(addr, size, sys->cacheLineSize()); 166 !gen.done(); gen.next()) { |
167 168 req = std::make_shared<Request>( 169 gen.addr(), gen.size(), flag, masterId); 170 |
171 req->taskId(ContextSwitchTaskId::DMA); 172 PacketPtr pkt = new Packet(req, cmd); 173 174 // Increment the data pointer on a write 175 if (data) 176 pkt->dataStatic(data + gen.complete()); 177 178 pkt->senderState = reqState; --- 332 unchanged lines hidden --- |