/*
- * Copyright (c) 2011-2013 ARM Limited
+ * Copyright (c) 2011-2013, 2015 ARM Limited
* All rights reserved
*
* The license below extends only to copyright in the software and shall
DPRINTF(Bridge, "recvTimingReq: %s addr 0x%x\n",
pkt->cmdString(), pkt->getAddr());
- // we should not see a timing request if we are already in a retry
- assert(!retryReq);
+ // sink inhibited packets without further action, also discard any
+ // packet that is not a read or a write
+ if (pkt->memInhibitAsserted() ||
+ !(pkt->isWrite() || pkt->isRead())) {
+ assert(!pkt->needsResponse());
+ pendingDelete.reset(pkt);
+ return true;
+ }
+
+ // we should not get a new request after committing to retry the
+ // current one, but unfortunately the CPU violates this rule, so
+ // simply ignore it for now
+ if (retryReq)
+ return false;
DPRINTF(Bridge, "Response queue size: %d outresp: %d\n",
transmitList.size(), outstandingResponses);
retryReq = true;
} else {
// look at the response queue if we expect to see a response
- bool expects_response = pkt->needsResponse() &&
- !pkt->memInhibitAsserted();
+ bool expects_response = pkt->needsResponse();
if (expects_response) {
if (respQueueFull()) {
DPRINTF(Bridge, "Response queue full\n");
/** Max queue size for reserved responses. */
unsigned int respQueueLimit;
+ /**
+ * Upstream caches need this packet until true is returned, so
+ * hold it for deletion until a subsequent call
+ */
+ std::unique_ptr<Packet> pendingDelete;
+
/**
* Is this side blocked from accepting new response packets.
*
DPRINTF(DRAM, "recvTimingReq: request %s addr %lld size %d\n",
pkt->cmdString(), pkt->getAddr(), pkt->getSize());
- // simply drop inhibited packets and clean evictions
- if (pkt->memInhibitAsserted() ||
- pkt->cmd == MemCmd::CleanEvict) {
- DPRINTF(DRAM, "Inhibited packet or clean evict -- Dropping it now\n");
+ // sink inhibited packets without further action
+ if (pkt->memInhibitAsserted()) {
pendingDelete.reset(pkt);
return true;
}
bool
DRAMSim2::recvTimingReq(PacketPtr pkt)
{
- // we should never see a new request while in retry
- assert(!retryReq);
-
+ // sink inhibited packets without further action
if (pkt->memInhibitAsserted()) {
- // snooper will supply based on copy of packet
- // still target's responsibility to delete packet
pendingDelete.reset(pkt);
return true;
}
+ // we should not get a new request after committing to retry the
+ // current one, but unfortunately the CPU violates this rule, so
+ // simply ignore it for now
+ if (retryReq)
+ return false;
+
// if we cannot accept we need to send a retry once progress can
// be made
bool can_accept = nbrOutstanding() < wrapper.queueSize();
bool
SimpleMemory::recvTimingReq(PacketPtr pkt)
{
+ // sink inhibited packets without further action
if (pkt->memInhibitAsserted()) {
- // snooper will supply based on copy of packet
- // still target's responsibility to delete packet
pendingDelete.reset(pkt);
return true;
}
- // we should never get a new request after committing to retry the
- // current one, the bus violates the rule as it simply sends a
- // retry to the next one waiting on the retry list, so simply
- // ignore it
+ // we should not get a new request after committing to retry the
+ // current one, but unfortunately the CPU violates this rule, so
+ // simply ignore it for now
if (retryReq)
return false;