RubyPort.cc (9508:dde110931867) RubyPort.cc (9542:683991c46ac8)
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

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

146RubyPort::PioPort::recvTimingResp(PacketPtr pkt)
147{
148 // In FS mode, ruby memory will receive pio responses from devices
149 // and it must forward these responses back to the particular CPU.
150 DPRINTF(RubyPort, "Pio response for address %#x\n", pkt->getAddr());
151
152 // First we must retrieve the request port from the sender State
153 RubyPort::SenderState *senderState =
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

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

146RubyPort::PioPort::recvTimingResp(PacketPtr pkt)
147{
148 // In FS mode, ruby memory will receive pio responses from devices
149 // and it must forward these responses back to the particular CPU.
150 DPRINTF(RubyPort, "Pio response for address %#x\n", pkt->getAddr());
151
152 // First we must retrieve the request port from the sender State
153 RubyPort::SenderState *senderState =
154 safe_cast<RubyPort::SenderState *>(pkt->senderState);
154 safe_cast<RubyPort::SenderState *>(pkt->popSenderState());
155 M5Port *port = senderState->port;
156 assert(port != NULL);
155 M5Port *port = senderState->port;
156 assert(port != NULL);
157
158 // pop the sender state from the packet
159 pkt->senderState = senderState->saved;
160 delete senderState;
161
162 port->sendTimingResp(pkt);
163
164 return true;
165}
166
167bool

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

182 // snooper will supply based on copy of packet
183 // still target's responsibility to delete packet
184 delete pkt;
185 return true;
186 }
187
188 // Save the port in the sender state object to be used later to
189 // route the response
157 delete senderState;
158
159 port->sendTimingResp(pkt);
160
161 return true;
162}
163
164bool

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

179 // snooper will supply based on copy of packet
180 // still target's responsibility to delete packet
181 delete pkt;
182 return true;
183 }
184
185 // Save the port in the sender state object to be used later to
186 // route the response
190 pkt->senderState = new SenderState(this, pkt->senderState);
187 pkt->pushSenderState(new SenderState(this));
191
192 // Check for pio requests and directly send them to the dedicated
193 // pio port.
194 if (!isPhysMemAddress(pkt->getAddr())) {
195 assert(ruby_port->pio_port.isConnected());
196 DPRINTF(RubyPort,
197 "Request for address 0x%#x is assumed to be a pio request\n",
198 pkt->getAddr());

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

225 ruby_port->addToRetryList(this);
226 }
227
228 DPRINTF(RubyPort,
229 "Request for address %#x did not issue because %s\n",
230 pkt->getAddr(), RequestStatus_to_string(requestStatus));
231
232 SenderState* senderState = safe_cast<SenderState*>(pkt->senderState);
188
189 // Check for pio requests and directly send them to the dedicated
190 // pio port.
191 if (!isPhysMemAddress(pkt->getAddr())) {
192 assert(ruby_port->pio_port.isConnected());
193 DPRINTF(RubyPort,
194 "Request for address 0x%#x is assumed to be a pio request\n",
195 pkt->getAddr());

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

222 ruby_port->addToRetryList(this);
223 }
224
225 DPRINTF(RubyPort,
226 "Request for address %#x did not issue because %s\n",
227 pkt->getAddr(), RequestStatus_to_string(requestStatus));
228
229 SenderState* senderState = safe_cast<SenderState*>(pkt->senderState);
233 pkt->senderState = senderState->saved;
230 pkt->senderState = senderState->predecessor;
234 delete senderState;
235 return false;
236}
237
238void
239RubyPort::M5Port::recvFunctional(PacketPtr pkt)
240{
241 DPRINTF(RubyPort, "Functional access caught for address %#x\n",

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

300{
301 // Retrieve the request port from the sender State
302 RubyPort::SenderState *senderState =
303 safe_cast<RubyPort::SenderState *>(pkt->senderState);
304 M5Port *port = senderState->port;
305 assert(port != NULL);
306
307 // pop the sender state from the packet
231 delete senderState;
232 return false;
233}
234
235void
236RubyPort::M5Port::recvFunctional(PacketPtr pkt)
237{
238 DPRINTF(RubyPort, "Functional access caught for address %#x\n",

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

297{
298 // Retrieve the request port from the sender State
299 RubyPort::SenderState *senderState =
300 safe_cast<RubyPort::SenderState *>(pkt->senderState);
301 M5Port *port = senderState->port;
302 assert(port != NULL);
303
304 // pop the sender state from the packet
308 pkt->senderState = senderState->saved;
305 pkt->senderState = senderState->predecessor;
309 delete senderState;
310
311 port->hitCallback(pkt);
312
313 //
314 // If we had to stall the M5Ports, wake them up because the sequencer
315 // likely has free resources now.
316 //

--- 197 unchanged lines hidden ---
306 delete senderState;
307
308 port->hitCallback(pkt);
309
310 //
311 // If we had to stall the M5Ports, wake them up because the sequencer
312 // likely has free resources now.
313 //

--- 197 unchanged lines hidden ---