1/* |
2 * Copyright (c) 2010-2019 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 9 * licensed hereunder. You may use the software subject to the license 10 * terms below provided that you ensure that this notice is replicated --- 770 unchanged lines hidden (view full) --- 781 pkt->payloadDelay; 782 if (pkt->isRead() && !is_error) { 783 // sanity check 784 assert(pkt->getAddr() == tgt_pkt->getAddr()); 785 assert(pkt->getSize() >= tgt_pkt->getSize()); 786 787 tgt_pkt->setData(pkt->getConstPtr<uint8_t>()); 788 } |
789 790 // this response did not allocate here and therefore 791 // it was not consumed, make sure that any flags are 792 // carried over to cache above 793 tgt_pkt->copyResponderFlags(pkt); |
794 } 795 tgt_pkt->makeTimingResponse(); 796 // if this packet is an error copy that to the new packet 797 if (is_error) 798 tgt_pkt->copyError(pkt); 799 if (tgt_pkt->cmd == MemCmd::ReadResp && 800 (is_invalidate || mshr->hasPostInvalidate())) { 801 // If intermediate cache got ReadRespWithInvalidate, --- 163 unchanged lines hidden (view full) --- 965 name(), pkt->print()); 966 967 uint32_t snoop_delay = 0; 968 969 if (forwardSnoops) { 970 // first propagate snoop upward to see if anyone above us wants to 971 // handle it. save & restore packet src since it will get 972 // rewritten to be relative to cpu-side bus (if any) |
973 if (is_timing) { 974 // copy the packet so that we can clear any flags before 975 // forwarding it upwards, we also allocate data (passing 976 // the pointer along in case of static data), in case 977 // there is a snoop hit in upper levels 978 Packet snoopPkt(pkt, true, true); 979 snoopPkt.setExpressSnoop(); 980 // the snoop packet does not need to wait any additional 981 // time 982 snoopPkt.headerDelay = snoopPkt.payloadDelay = 0; 983 cpuSidePort.sendTimingSnoopReq(&snoopPkt); 984 985 // add the header delay (including crossbar and snoop 986 // delays) of the upward snoop to the snoop delay for this 987 // cache 988 snoop_delay += snoopPkt.headerDelay; 989 |
990 // If this request is a prefetch or clean evict and an upper level 991 // signals block present, make sure to propagate the block 992 // presence to the requester. 993 if (snoopPkt.isBlockCached()) { 994 pkt->setBlockCached(); 995 } 996 // If the request was satisfied by snooping the cache 997 // above, mark the original packet as satisfied too. 998 if (snoopPkt.satisfied()) { 999 pkt->setSatisfied(); 1000 } |
1001 1002 // Copy over flags from the snoop response to make sure we 1003 // inform the final destination 1004 pkt->copyResponderFlags(&snoopPkt); |
1005 } else { |
1006 bool already_responded = pkt->cacheResponding(); |
1007 cpuSidePort.sendAtomicSnoop(pkt); |
1008 if (!already_responded && pkt->cacheResponding()) { |
1009 // cache-to-cache response from some upper cache: 1010 // forward response to original requester 1011 assert(pkt->isResponse()); 1012 } 1013 } 1014 } 1015 1016 bool respond = false; --- 385 unchanged lines hidden --- |