abstract_mem.cc (9293:df7c3f99ebca) | abstract_mem.cc (9405:c0a0593510db) |
---|---|
1/* 2 * Copyright (c) 2010-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 --- 289 unchanged lines hidden (view full) --- 298 299#define TRACE_PACKET(A) 300 301#endif 302 303void 304AbstractMemory::access(PacketPtr pkt) 305{ | 1/* 2 * Copyright (c) 2010-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 --- 289 unchanged lines hidden (view full) --- 298 299#define TRACE_PACKET(A) 300 301#endif 302 303void 304AbstractMemory::access(PacketPtr pkt) 305{ |
306 assert(pkt->getAddr() >= range.start && 307 (pkt->getAddr() + pkt->getSize() - 1) <= range.end); | 306 assert(AddrRange(pkt->getAddr(), 307 pkt->getAddr() + pkt->getSize() - 1).isSubset(range)); |
308 309 if (pkt->memInhibitAsserted()) { 310 DPRINTF(MemoryAccess, "mem inhibited on 0x%x: not responding\n", 311 pkt->getAddr()); 312 return; 313 } 314 | 308 309 if (pkt->memInhibitAsserted()) { 310 DPRINTF(MemoryAccess, "mem inhibited on 0x%x: not responding\n", 311 pkt->getAddr()); 312 return; 313 } 314 |
315 uint8_t *hostAddr = pmemAddr + pkt->getAddr() - range.start; | 315 uint8_t *hostAddr = pmemAddr + pkt->getAddr() - range.start(); |
316 317 if (pkt->cmd == MemCmd::SwapReq) { 318 TheISA::IntReg overwrite_val; 319 bool overwrite_mem; 320 uint64_t condition_val64; 321 uint32_t condition_val32; 322 323 if (!pmemAddr) --- 55 unchanged lines hidden (view full) --- 379 if (pkt->needsResponse()) { 380 pkt->makeResponse(); 381 } 382} 383 384void 385AbstractMemory::functionalAccess(PacketPtr pkt) 386{ | 316 317 if (pkt->cmd == MemCmd::SwapReq) { 318 TheISA::IntReg overwrite_val; 319 bool overwrite_mem; 320 uint64_t condition_val64; 321 uint32_t condition_val32; 322 323 if (!pmemAddr) --- 55 unchanged lines hidden (view full) --- 379 if (pkt->needsResponse()) { 380 pkt->makeResponse(); 381 } 382} 383 384void 385AbstractMemory::functionalAccess(PacketPtr pkt) 386{ |
387 assert(pkt->getAddr() >= range.start && 388 (pkt->getAddr() + pkt->getSize() - 1) <= range.end); | 387 assert(AddrRange(pkt->getAddr(), 388 pkt->getAddr() + pkt->getSize() - 1).isSubset(range)); |
389 | 389 |
390 uint8_t *hostAddr = pmemAddr + pkt->getAddr() - range.start; | 390 uint8_t *hostAddr = pmemAddr + pkt->getAddr() - range.start(); |
391 392 if (pkt->isRead()) { 393 if (pmemAddr) 394 memcpy(pkt->getPtr<uint8_t>(), hostAddr, pkt->getSize()); 395 TRACE_PACKET("Read"); 396 pkt->makeResponse(); 397 } else if (pkt->isWrite()) { 398 if (pmemAddr) --- 17 unchanged lines hidden --- | 391 392 if (pkt->isRead()) { 393 if (pmemAddr) 394 memcpy(pkt->getPtr<uint8_t>(), hostAddr, pkt->getSize()); 395 TRACE_PACKET("Read"); 396 pkt->makeResponse(); 397 } else if (pkt->isWrite()) { 398 if (pmemAddr) --- 17 unchanged lines hidden --- |