table_walker.cc (9180:ee8d7a51651d) | table_walker.cc (9258:baa17ba80e06) |
---|---|
1/* 2 * Copyright (c) 2010 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 --- 40 unchanged lines hidden (view full) --- 49#include "sim/system.hh" 50 51using namespace ArmISA; 52 53TableWalker::TableWalker(const Params *p) 54 : MemObject(p), port(this, params()->sys), drainEvent(NULL), 55 tlb(NULL), currState(NULL), pending(false), 56 masterId(p->sys->getMasterId(name())), | 1/* 2 * Copyright (c) 2010 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 --- 40 unchanged lines hidden (view full) --- 49#include "sim/system.hh" 50 51using namespace ArmISA; 52 53TableWalker::TableWalker(const Params *p) 54 : MemObject(p), port(this, params()->sys), drainEvent(NULL), 55 tlb(NULL), currState(NULL), pending(false), 56 masterId(p->sys->getMasterId(name())), |
57 numSquashable(p->num_squash_per_cycle), |
|
57 doL1DescEvent(this), doL2DescEvent(this), doProcessEvent(this) 58{ 59 sctlr = 0; 60} 61 62TableWalker::~TableWalker() 63{ 64 ; --- 114 unchanged lines hidden (view full) --- 179} 180 181void 182TableWalker::processWalkWrapper() 183{ 184 assert(!currState); 185 assert(pendingQueue.size()); 186 currState = pendingQueue.front(); | 58 doL1DescEvent(this), doL2DescEvent(this), doProcessEvent(this) 59{ 60 sctlr = 0; 61} 62 63TableWalker::~TableWalker() 64{ 65 ; --- 114 unchanged lines hidden (view full) --- 180} 181 182void 183TableWalker::processWalkWrapper() 184{ 185 assert(!currState); 186 assert(pendingQueue.size()); 187 currState = pendingQueue.front(); |
187 pendingQueue.pop_front(); 188 pending = true; 189 processWalk(); | 188 189 190 if (!currState->transState->squashed()) { 191 // We've got a valid request, lets process it 192 pending = true; 193 pendingQueue.pop_front(); 194 processWalk(); 195 return; 196 } 197 198 199 // If the instruction that we were translating for has been 200 // squashed we shouldn't bother. 201 unsigned num_squashed = 0; 202 ThreadContext *tc = currState->tc; 203 assert(currState->transState->squashed()); 204 while ((num_squashed < numSquashable) && currState && 205 currState->transState->squashed()) { 206 pendingQueue.pop_front(); 207 num_squashed++; 208 209 DPRINTF(TLB, "Squashing table walk for address %#x\n", currState->vaddr); 210 211 // finish the translation which will delete the translation object 212 currState->transState->finish(new UnimpFault("Squashed Inst"), 213 currState->req, currState->tc, currState->mode); 214 215 // delete the current request 216 delete currState; 217 218 // peak at the next one 219 if (pendingQueue.size()) 220 currState = pendingQueue.front(); 221 else 222 currState = NULL; 223 } 224 225 // if we've still got pending translations schedule more work 226 nextWalk(tc); 227 currState = NULL; |
190} 191 192Fault 193TableWalker::processWalk() 194{ 195 Addr ttbr = 0; 196 197 // If translation isn't enabled, we shouldn't be here --- 575 unchanged lines hidden --- | 228} 229 230Fault 231TableWalker::processWalk() 232{ 233 Addr ttbr = 0; 234 235 // If translation isn't enabled, we shouldn't be here --- 575 unchanged lines hidden --- |