summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/cpu/memtest/memtest.cc2
-rw-r--r--src/mem/packet.hh4
2 files changed, 4 insertions, 2 deletions
diff --git a/src/cpu/memtest/memtest.cc b/src/cpu/memtest/memtest.cc
index 6e8c5d0bf..019b4328c 100644
--- a/src/cpu/memtest/memtest.cc
+++ b/src/cpu/memtest/memtest.cc
@@ -344,6 +344,7 @@ MemTest::tick()
req->getPaddr(), blockAddr(req->getPaddr()), *result);
PacketPtr pkt = new Packet(req, MemCmd::ReadReq, Packet::Broadcast);
+ pkt->setSrc(0);
pkt->dataDynamicArray(new uint8_t[req->getSize()]);
MemTestSenderState *state = new MemTestSenderState(result);
pkt->senderState = state;
@@ -373,6 +374,7 @@ MemTest::tick()
req->getPaddr(), blockAddr(req->getPaddr()), data & 0xff);
PacketPtr pkt = new Packet(req, MemCmd::WriteReq, Packet::Broadcast);
+ pkt->setSrc(0);
uint8_t *pkt_data = new uint8_t[req->getSize()];
pkt->dataDynamicArray(pkt_data);
memcpy(pkt_data, &data, req->getSize());
diff --git a/src/mem/packet.hh b/src/mem/packet.hh
index 80da045ef..fc1c283ed 100644
--- a/src/mem/packet.hh
+++ b/src/mem/packet.hh
@@ -384,7 +384,7 @@ class Packet : public FastAlloc
Packet(Packet *origPkt)
: data(NULL), staticData(false), dynamicData(false), arrayData(false),
addr(origPkt->addr), size(origPkt->size),
- dest(origPkt->dest),
+ src(origPkt->src), dest(origPkt->dest),
addrSizeValid(origPkt->addrSizeValid), srcValid(origPkt->srcValid),
snoopFlags(origPkt->snoopFlags),
time(curTick),
@@ -440,7 +440,7 @@ class Packet : public FastAlloc
*/
void convertAtomicToTimingResponse()
{
- dest = src;
+ dest = getSrc();
srcValid = false;
}