mem_checker_monitor.cc (12637:bfc3cb9c7e6c) | mem_checker_monitor.cc (13377:2e04ce7d3fd4) |
---|---|
1/* 2 * Copyright (c) 2012-2014 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 --- 150 unchanged lines hidden (view full) --- 159 std::unique_ptr<uint8_t[]> pkt_data; 160 MemCheckerMonitorSenderState* state = NULL; 161 162 if (expects_response && is_write) { 163 // On receipt of a request, only need to allocate pkt_data if this is a 164 // write. For reads, we have no data yet, so it doesn't make sense to 165 // allocate. 166 pkt_data.reset(new uint8_t[size]); | 1/* 2 * Copyright (c) 2012-2014 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 --- 150 unchanged lines hidden (view full) --- 159 std::unique_ptr<uint8_t[]> pkt_data; 160 MemCheckerMonitorSenderState* state = NULL; 161 162 if (expects_response && is_write) { 163 // On receipt of a request, only need to allocate pkt_data if this is a 164 // write. For reads, we have no data yet, so it doesn't make sense to 165 // allocate. 166 pkt_data.reset(new uint8_t[size]); |
167 memcpy(pkt_data.get(), pkt->getConstPtr<uint8_t*>(), size); | 167 pkt->writeData(pkt_data.get()); |
168 } 169 170 // If a cache miss is served by a cache, a monitor near the memory 171 // would see a request which needs a response, but this response 172 // would not come back from the memory. Therefore 173 // we additionally have to check the inhibit flag. 174 if (expects_response && (is_read || is_write)) { 175 state = new MemCheckerMonitorSenderState(0); --- 72 unchanged lines hidden (view full) --- 248 std::unique_ptr<uint8_t[]> pkt_data; 249 MemCheckerMonitorSenderState* received_state = NULL; 250 251 if (is_read) { 252 // On receipt of a response, only need to allocate pkt_data if this is 253 // a read. For writes, we have already given the MemChecker the data on 254 // the request, so it doesn't make sense to allocate on write. 255 pkt_data.reset(new uint8_t[size]); | 168 } 169 170 // If a cache miss is served by a cache, a monitor near the memory 171 // would see a request which needs a response, but this response 172 // would not come back from the memory. Therefore 173 // we additionally have to check the inhibit flag. 174 if (expects_response && (is_read || is_write)) { 175 state = new MemCheckerMonitorSenderState(0); --- 72 unchanged lines hidden (view full) --- 248 std::unique_ptr<uint8_t[]> pkt_data; 249 MemCheckerMonitorSenderState* received_state = NULL; 250 251 if (is_read) { 252 // On receipt of a response, only need to allocate pkt_data if this is 253 // a read. For writes, we have already given the MemChecker the data on 254 // the request, so it doesn't make sense to allocate on write. 255 pkt_data.reset(new uint8_t[size]); |
256 memcpy(pkt_data.get(), pkt->getConstPtr<uint8_t*>(), size); | 256 pkt->writeData(pkt_data.get()); |
257 } 258 259 if (is_read || is_write) { 260 received_state = 261 dynamic_cast<MemCheckerMonitorSenderState*>(pkt->senderState); 262 263 // Restore initial sender state 264 panic_if(received_state == NULL, --- 109 unchanged lines hidden --- | 257 } 258 259 if (is_read || is_write) { 260 received_state = 261 dynamic_cast<MemCheckerMonitorSenderState*>(pkt->senderState); 262 263 // Restore initial sender state 264 panic_if(received_state == NULL, --- 109 unchanged lines hidden --- |