Deleted Added
sdiff udiff text old ( 4450:54dbcf524f0b ) new ( 4451:bfb7c7c0b7ea )
full compact
1/*
2 * Copyright (c) 2006 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

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

103 delete oldPkt;
104 }
105
106 void partialWriteFix(Port *port)
107 {
108 assert(!partialWriteFixed);
109 assert(expectResponse);
110
111 int pbs = port->peerBlockSize();
112 partialWriteFixed = true;
113 PacketDataPtr data;
114
115 data = new uint8_t[pbs];
116 PacketPtr funcPkt = new Packet(pkt->req, MemCmd::ReadReq,
117 Packet::Broadcast, pbs);
118
119 funcPkt->dataStatic(data);
120 port->sendFunctional(funcPkt);
121 assert(funcPkt->result == Packet::Success);
122 delete funcPkt;
123
124 oldPkt = pkt;
125 memcpy(data + oldPkt->getOffset(pbs), pkt->getPtr<uint8_t>(),
126 pkt->getSize());
127 pkt = new Packet(oldPkt->req, MemCmd::WriteInvalidateReq,
128 Packet::Broadcast, pbs);
129 pkt->dataDynamicArray(data);
130 pkt->senderState = oldPkt->senderState;

--- 135 unchanged lines hidden ---