pagetable_walker.cc (13892:0182a0601f66) | pagetable_walker.cc (14096:bde52fccbf0f) |
---|---|
1/* 2 * Copyright (c) 2012 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 --- 191 unchanged lines hidden (view full) --- 200 DPRINTF(PageTableWalker, "Squashing table walk for address %#x\n", 201 currState->req->getVaddr()); 202 203 // finish the translation which will delete the translation object 204 currState->translation->finish( 205 std::make_shared<UnimpFault>("Squashed Inst"), 206 currState->req, currState->tc, currState->mode); 207 | 1/* 2 * Copyright (c) 2012 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 --- 191 unchanged lines hidden (view full) --- 200 DPRINTF(PageTableWalker, "Squashing table walk for address %#x\n", 201 currState->req->getVaddr()); 202 203 // finish the translation which will delete the translation object 204 currState->translation->finish( 205 std::make_shared<UnimpFault>("Squashed Inst"), 206 currState->req, currState->tc, currState->mode); 207 |
208 // delete the current request 209 delete currState; | 208 // delete the current request if there are no inflight packets. 209 // if there is something in flight, delete when the packets are 210 // received and inflight is zero. 211 if (currState->numInflight() == 0) { 212 delete currState; 213 } else { 214 currState->squash(); 215 } |
210 211 // check the next translation request, if it exists 212 if (currStates.size()) 213 currState = currStates.front(); 214 else 215 currState = NULL; 216 } 217 if (currState && !currState->wasStarted()) --- 374 unchanged lines hidden (view full) --- 592 593bool 594Walker::WalkerState::recvPacket(PacketPtr pkt) 595{ 596 assert(pkt->isResponse()); 597 assert(inflight); 598 assert(state == Waiting); 599 inflight--; | 216 217 // check the next translation request, if it exists 218 if (currStates.size()) 219 currState = currStates.front(); 220 else 221 currState = NULL; 222 } 223 if (currState && !currState->wasStarted()) --- 374 unchanged lines hidden (view full) --- 598 599bool 600Walker::WalkerState::recvPacket(PacketPtr pkt) 601{ 602 assert(pkt->isResponse()); 603 assert(inflight); 604 assert(state == Waiting); 605 inflight--; |
606 if (squashed) { 607 // if were were squashed, return true once inflight is zero and 608 // this WalkerState will be freed there. 609 return (inflight == 0); 610 } |
|
600 if (pkt->isRead()) { 601 // should not have a pending read it we also had one outstanding 602 assert(!read); 603 604 // @todo someone should pay for this 605 pkt->headerDelay = pkt->payloadDelay = 0; 606 607 state = nextState; --- 65 unchanged lines hidden (view full) --- 673 retrying = true; 674 writes.push_back(write); 675 inflight--; 676 return; 677 } 678 } 679} 680 | 611 if (pkt->isRead()) { 612 // should not have a pending read it we also had one outstanding 613 assert(!read); 614 615 // @todo someone should pay for this 616 pkt->headerDelay = pkt->payloadDelay = 0; 617 618 state = nextState; --- 65 unchanged lines hidden (view full) --- 684 retrying = true; 685 writes.push_back(write); 686 inflight--; 687 return; 688 } 689 } 690} 691 |
692unsigned 693Walker::WalkerState::numInflight() const 694{ 695 return inflight; 696} 697 |
|
681bool 682Walker::WalkerState::isRetrying() 683{ 684 return retrying; 685} 686 687bool 688Walker::WalkerState::isTiming() 689{ 690 return timing; 691} 692 693bool 694Walker::WalkerState::wasStarted() 695{ 696 return started; 697} 698 699void | 698bool 699Walker::WalkerState::isRetrying() 700{ 701 return retrying; 702} 703 704bool 705Walker::WalkerState::isTiming() 706{ 707 return timing; 708} 709 710bool 711Walker::WalkerState::wasStarted() 712{ 713 return started; 714} 715 716void |
717Walker::WalkerState::squash() 718{ 719 squashed = true; 720} 721 722void |
|
700Walker::WalkerState::retry() 701{ 702 retrying = false; 703 sendPackets(); 704} 705 706Fault 707Walker::WalkerState::pageFault(bool present) --- 16 unchanged lines hidden --- | 723Walker::WalkerState::retry() 724{ 725 retrying = false; 726 sendPackets(); 727} 728 729Fault 730Walker::WalkerState::pageFault(bool present) --- 16 unchanged lines hidden --- |