Deleted Added
sdiff udiff text old ( 8922:17f037ad8918 ) new ( 8948:e95ee70f876c )
full compact
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
9 * licensed hereunder. You may use the software subject to the license
10 * terms below provided that you ensure that this notice is replicated
11 * unmodified and in its entirety in all distributions of the software,
12 * modified or unmodified, in source code or in binary form.
13 *
14 * Copyright (c) 2007 The Hewlett-Packard Development Company
15 * All rights reserved.
16 *
17 * The license below extends only to copyright in the software and shall
18 * not be construed as granting a license to any other intellectual
19 * property including but not limited to intellectual property relating
20 * to a hardware implementation of the functionality of the software
21 * licensed hereunder. You may use the software subject to the license

--- 95 unchanged lines hidden (view full) ---

117Walker::WalkerPort::recvTiming(PacketPtr pkt)
118{
119 return walker->recvTiming(pkt);
120}
121
122bool
123Walker::recvTiming(PacketPtr pkt)
124{
125 assert(pkt->isResponse());
126 WalkerSenderState * senderState =
127 dynamic_cast(pkt->senderState);
128 pkt->senderState = senderState->saved;
129 WalkerState * senderWalk = senderState->senderWalk;
130 bool walkComplete = senderWalk->recvPacket(pkt);
131 delete senderState;
132 if (walkComplete) {
133 std::list::iterator iter;
134 for (iter = currStates.begin(); iter != currStates.end(); iter++) {
135 WalkerState * walkerState = *(iter);
136 if (walkerState == senderWalk) {
137 iter = currStates.erase(iter);
138 break;
139 }
140 }
141 delete senderWalk;
142 // Since we block requests when another is outstanding, we
143 // need to check if there is a waiting request to be serviced
144 if (currStates.size()) {
145 WalkerState * newState = currStates.front();
146 if (!newState->wasStarted())
147 newState->startWalk();
148 }
149 }
150 return true;
151}
152
153void
154Walker::WalkerPort::recvRetry()
155{
156 walker->recvRetry();
157}
158
159void
160Walker::recvRetry()
161{

--- 402 unchanged lines hidden (view full) ---

564 RequestPtr request = new Request(topAddr, dataSize, flags, walker->masterId);
565 read = new Packet(request, MemCmd::ReadReq, Packet::Broadcast);
566 read->allocate();
567}
568
569bool
570Walker::WalkerState::recvPacket(PacketPtr pkt)
571{
572 assert(pkt->isResponse());
573 if (!pkt->wasNacked()) {
574 assert(inflight);
575 assert(state == Waiting);
576 assert(!read);
577 inflight--;
578 if (pkt->isRead()) {
579 state = nextState;
580 nextState = Ready;
581 PacketPtr write = NULL;

--- 26 unchanged lines hidden (view full) ---

608 // Let the CPU continue.
609 translation->finish(fault, req, tc, mode);
610 } else {
611 // There was a fault during the walk. Let the CPU know.
612 translation->finish(timingFault, req, tc, mode);
613 }
614 return true;
615 }
616 } else {
617 DPRINTF(PageTableWalker, "Request was nacked. Entering retry state\n");
618 pkt->reinitNacked();
619 if (!walker->sendTiming(this, pkt)) {
620 inflight--;
621 retrying = true;
622 if (pkt->isWrite()) {
623 writes.push_back(pkt);
624 } else {

--- 83 unchanged lines hidden ---