1/* 2 * Copyright (c) 2013, 2018-2019 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 --- 73 unchanged lines hidden (view full) --- 82 SMMUv3 &_smmu, SMMUv3SlaveInterface &_ifc) 83 : 84 SMMUProcess(name, _smmu), 85 ifc(_ifc) 86{ 87 // Decrease number of pending translation slots on the slave interface 88 assert(ifc.xlateSlotsRemaining > 0); 89 ifc.xlateSlotsRemaining--; |
90 91 ifc.pendingMemAccesses++; |
92 reinit(); 93} 94 95SMMUTranslationProcess::~SMMUTranslationProcess() 96{ 97 // Increase number of pending translation slots on the slave interface |
98 assert(ifc.pendingMemAccesses > 0); 99 ifc.pendingMemAccesses--; 100 101 // If no more SMMU memory accesses are pending, |
102 // signal SMMU Slave Interface as drained |
103 if (ifc.pendingMemAccesses == 0) { |
104 ifc.signalDrainDone(); 105 } 106} 107 108void 109SMMUTranslationProcess::beginTransaction(const SMMUTranslRequest &req) 110{ 111 request = req; --- 1119 unchanged lines hidden (view full) --- 1231 1; 1232 1233 doSemaphoreDown(yield, smmu.masterPortSem); 1234 doDelay(yield, Cycles(numMasterBeats)); 1235 doSemaphoreUp(smmu.masterPortSem); 1236 1237 1238 smmu.translationTimeDist.sample(curTick() - recvTick); |
1239 ifc.xlateSlotsRemaining++; |
1240 if (!request.isAtsRequest && request.isWrite) 1241 ifc.wrBufSlotsRemaining += 1242 (request.size + (ifc.portWidth-1)) / ifc.portWidth; 1243 1244 smmu.scheduleSlaveRetries(); 1245 1246 1247 SMMUAction a; --- 31 unchanged lines hidden (view full) --- 1279 a.delay = 0; 1280 yield(a); 1281 } 1282} 1283 1284void 1285SMMUTranslationProcess::completePrefetch(Yield &yield) 1286{ |
1287 ifc.xlateSlotsRemaining++; 1288 |
1289 SMMUAction a; 1290 a.type = ACTION_TERMINATE; 1291 a.pkt = NULL; 1292 a.ifc = &ifc; 1293 a.delay = 0; 1294 yield(a); 1295} 1296 --- 181 unchanged lines hidden --- |