offset);
break;
}
- delete pkt->req;
- delete pkt;
+ pkt->makeAtomicResponse();
return latency;
}
Tick read(PacketPtr pkt);
Tick write(PacketPtr pkt);
Tick recvMessage(PacketPtr pkt);
+ Tick recvResponse(PacketPtr pkt);
bool
triggerTimerInterrupt()
DPRINTF(IntDev,
"Sending interrupt to APIC ID %d.\n", message.destination);
PacketPtr pkt = buildIntRequest(message.destination, message);
- if (timing)
+ if (timing) {
sendMessageTiming(pkt, latency);
- else
+ } else {
sendMessageAtomic(pkt);
+ }
} else {
DPRINTF(IntDev, "Sending interrupts to APIC IDs:"
"%s%s%s%s%s%s%s%s\n",
return device->recvMessage(pkt);
}
+ Tick recvResponse(PacketPtr pkt)
+ {
+ return device->recvResponse(pkt);
+ }
+
// This is x86 focused, so if this class becomes generic, this would
// need to be moved into a subclass.
void sendMessage(TriggerIntMessage message, bool timing);
return 0;
}
+ virtual Tick
+ recvResponse(PacketPtr pkt)
+ {
+ delete pkt->req;
+ delete pkt;
+ return 0;
+ }
+
virtual void
getIntAddrRange(AddrRangeList &range_list)
{
Tick
MessagePort::sendMessageAtomic(PacketPtr pkt)
{
- return sendAtomic(pkt);
+ Tick latency = sendAtomic(pkt);
+ assert(pkt->isResponse());
+ latency += recvResponse(pkt);
+ return latency;
}