abstract_mem.cc (13486:d69584f27c78) | abstract_mem.cc (13853:7ec6a25d2bc1) |
---|---|
1/* 2 * Copyright (c) 2010-2012,2017 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 --- 44 unchanged lines hidden (view full) --- 53#include "debug/MemoryAccess.hh" 54#include "mem/packet_access.hh" 55#include "sim/system.hh" 56 57using namespace std; 58 59AbstractMemory::AbstractMemory(const Params *p) : 60 MemObject(p), range(params()->range), pmemAddr(NULL), | 1/* 2 * Copyright (c) 2010-2012,2017 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 --- 44 unchanged lines hidden (view full) --- 53#include "debug/MemoryAccess.hh" 54#include "mem/packet_access.hh" 55#include "sim/system.hh" 56 57using namespace std; 58 59AbstractMemory::AbstractMemory(const Params *p) : 60 MemObject(p), range(params()->range), pmemAddr(NULL), |
61 backdoor(params()->range, nullptr, 62 (MemBackdoor::Flags)(MemBackdoor::Readable | 63 MemBackdoor::Writeable)), |
|
61 confTableReported(p->conf_table_reported), inAddrMap(p->in_addr_map), 62 kvmMap(p->kvm_map), _system(NULL) 63{ 64} 65 66void 67AbstractMemory::init() 68{ 69 assert(system()); 70 71 if (size() % _system->getPageBytes() != 0) 72 panic("Memory Size not divisible by page size\n"); 73} 74 75void 76AbstractMemory::setBackingStore(uint8_t* pmem_addr) 77{ | 64 confTableReported(p->conf_table_reported), inAddrMap(p->in_addr_map), 65 kvmMap(p->kvm_map), _system(NULL) 66{ 67} 68 69void 70AbstractMemory::init() 71{ 72 assert(system()); 73 74 if (size() % _system->getPageBytes() != 0) 75 panic("Memory Size not divisible by page size\n"); 76} 77 78void 79AbstractMemory::setBackingStore(uint8_t* pmem_addr) 80{ |
81 // If there was an existing backdoor, let everybody know it's going away. 82 if (backdoor.ptr()) 83 backdoor.invalidate(); 84 85 // The back door can't handle interleaved memory. 86 backdoor.ptr(range.interleaved() ? nullptr : pmem_addr); 87 |
|
78 pmemAddr = pmem_addr; 79} 80 81void 82AbstractMemory::regStats() 83{ 84 MemObject::regStats(); 85 --- 368 unchanged lines hidden --- | 88 pmemAddr = pmem_addr; 89} 90 91void 92AbstractMemory::regStats() 93{ 94 MemObject::regStats(); 95 --- 368 unchanged lines hidden --- |