port_proxy.cc (8861:56d011130987) | port_proxy.cc (8949:3fa1ee293096) |
---|---|
1/* 2 * Copyright (c) 2012 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 --- 34 unchanged lines hidden (view full) --- 43void 44PortProxy::blobHelper(Addr addr, uint8_t *p, int size, MemCmd cmd) const 45{ 46 Request req; 47 48 for (ChunkGenerator gen(addr, size, _port.peerBlockSize()); 49 !gen.done(); gen.next()) { 50 req.setPhys(gen.addr(), gen.size(), 0, Request::funcMasterId); | 1/* 2 * Copyright (c) 2012 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 --- 34 unchanged lines hidden (view full) --- 43void 44PortProxy::blobHelper(Addr addr, uint8_t *p, int size, MemCmd cmd) const 45{ 46 Request req; 47 48 for (ChunkGenerator gen(addr, size, _port.peerBlockSize()); 49 !gen.done(); gen.next()) { 50 req.setPhys(gen.addr(), gen.size(), 0, Request::funcMasterId); |
51 Packet pkt(&req, cmd, Packet::Broadcast); | 51 Packet pkt(&req, cmd); |
52 pkt.dataStatic(p); 53 _port.sendFunctional(&pkt); 54 p += gen.size(); 55 } 56} 57 58void 59PortProxy::memsetBlob(Addr addr, uint8_t v, int size) const 60{ 61 // quick and dirty... 62 uint8_t *buf = new uint8_t[size]; 63 64 std::memset(buf, v, size); 65 blobHelper(addr, buf, size, MemCmd::WriteReq); 66 67 delete [] buf; 68} | 52 pkt.dataStatic(p); 53 _port.sendFunctional(&pkt); 54 p += gen.size(); 55 } 56} 57 58void 59PortProxy::memsetBlob(Addr addr, uint8_t v, int size) const 60{ 61 // quick and dirty... 62 uint8_t *buf = new uint8_t[size]; 63 64 std::memset(buf, v, size); 65 blobHelper(addr, buf, size, MemCmd::WriteReq); 66 67 delete [] buf; 68} |