cache.cc (11285:25715951a4b8) cache.cc (11286:2071db8f864b)
1/*
2 * Copyright (c) 2010-2015 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

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

180 // this cache before knowing the store will fail.
181 blk->status |= BlkDirty;
182 DPRINTF(Cache, "%s for %s addr %#llx size %d (write)\n", __func__,
183 pkt->cmdString(), pkt->getAddr(), pkt->getSize());
184 } else if (pkt->isRead()) {
185 if (pkt->isLLSC()) {
186 blk->trackLoadLocked(pkt);
187 }
1/*
2 * Copyright (c) 2010-2015 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

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

180 // this cache before knowing the store will fail.
181 blk->status |= BlkDirty;
182 DPRINTF(Cache, "%s for %s addr %#llx size %d (write)\n", __func__,
183 pkt->cmdString(), pkt->getAddr(), pkt->getSize());
184 } else if (pkt->isRead()) {
185 if (pkt->isLLSC()) {
186 blk->trackLoadLocked(pkt);
187 }
188
189 // all read responses have a data payload
190 assert(pkt->hasRespData());
188 pkt->setDataFromBlock(blk->data, blkSize);
191 pkt->setDataFromBlock(blk->data, blkSize);
192
189 // determine if this read is from a (coherent) cache, or not
190 // by looking at the command type; we could potentially add a
191 // packet attribute such as 'FromCache' to make this check a
192 // bit cleaner
193 if (pkt->cmd == MemCmd::ReadExReq ||
194 pkt->cmd == MemCmd::ReadSharedReq ||
195 pkt->cmd == MemCmd::ReadCleanReq ||
196 pkt->cmd == MemCmd::SCUpgradeFailReq) {

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

791 pkt->req->masterId());
792 pf = new Packet(req, pkt->cmd);
793 pf->allocate();
794 assert(pf->getAddr() == pkt->getAddr());
795 assert(pf->getSize() == pkt->getSize());
796 }
797
798 pkt->makeTimingResponse();
193 // determine if this read is from a (coherent) cache, or not
194 // by looking at the command type; we could potentially add a
195 // packet attribute such as 'FromCache' to make this check a
196 // bit cleaner
197 if (pkt->cmd == MemCmd::ReadExReq ||
198 pkt->cmd == MemCmd::ReadSharedReq ||
199 pkt->cmd == MemCmd::ReadCleanReq ||
200 pkt->cmd == MemCmd::SCUpgradeFailReq) {

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

795 pkt->req->masterId());
796 pf = new Packet(req, pkt->cmd);
797 pf->allocate();
798 assert(pf->getAddr() == pkt->getAddr());
799 assert(pf->getSize() == pkt->getSize());
800 }
801
802 pkt->makeTimingResponse();
799 // for debugging, set all the bits in the response data
800 // (also keeps valgrind from complaining when debugging settings
801 // print out instruction results)
802 std::memset(pkt->getPtr<uint8_t>(), 0xFF, pkt->getSize());
803
803 // request_time is used here, taking into account lat and the delay
804 // charged if the packet comes from the xbar.
805 cpuSidePort->schedTimingResp(pkt, request_time, true);
806
807 // If an outstanding request is in progress (we found an
808 // MSHR) this is set to null
809 pkt = pf;
810 }

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

2036 "%s is passing a Modified line through %s to %#llx, "
2037 "but keeping the block",
2038 name(), pkt->cmdString(), pkt->getAddr());
2039
2040 if (is_timing) {
2041 doTimingSupplyResponse(pkt, blk->data, is_deferred, pending_inval);
2042 } else {
2043 pkt->makeAtomicResponse();
804 // request_time is used here, taking into account lat and the delay
805 // charged if the packet comes from the xbar.
806 cpuSidePort->schedTimingResp(pkt, request_time, true);
807
808 // If an outstanding request is in progress (we found an
809 // MSHR) this is set to null
810 pkt = pf;
811 }

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

2037 "%s is passing a Modified line through %s to %#llx, "
2038 "but keeping the block",
2039 name(), pkt->cmdString(), pkt->getAddr());
2040
2041 if (is_timing) {
2042 doTimingSupplyResponse(pkt, blk->data, is_deferred, pending_inval);
2043 } else {
2044 pkt->makeAtomicResponse();
2044 pkt->setDataFromBlock(blk->data, blkSize);
2045 // packets such as upgrades do not actually have any data
2046 // payload
2047 if (pkt->hasData())
2048 pkt->setDataFromBlock(blk->data, blkSize);
2045 }
2046 }
2047
2048 if (!respond && is_timing && is_deferred) {
2049 // if it's a deferred timing snoop to which we are not
2050 // responding, then we've made a copy of both the request and
2051 // the packet, delete them here
2052 assert(pkt->needsResponse());

--- 639 unchanged lines hidden ---
2049 }
2050 }
2051
2052 if (!respond && is_timing && is_deferred) {
2053 // if it's a deferred timing snoop to which we are not
2054 // responding, then we've made a copy of both the request and
2055 // the packet, delete them here
2056 assert(pkt->needsResponse());

--- 639 unchanged lines hidden ---