49 #ifndef __MEM_ABSTRACT_MEMORY_HH__ 50 #define __MEM_ABSTRACT_MEMORY_HH__ 54 #include "params/AbstractMemory.hh" 87 assert(req->hasContextId());
88 return (contextId == req->contextId());
92 contextId(req->contextId())
151 if (lockedAddrList.empty()) {
153 bool isLLSC = pkt->
isLLSC();
155 req->setExtraData(0);
160 return checkLockedAddrList(pkt);
173 void regStats()
override;
218 void init()
override;
226 bool isNull()
const {
return params()->null; }
234 void setBackingStore(uint8_t* pmem_addr);
240 {
return lockedAddrList; }
263 return dynamic_cast<const Params *
>(_params);
283 return pmemAddr + addr - range.
start();
344 #endif //__MEM_ABSTRACT_MEMORY_HH__
bool matchesContext(const RequestPtr &req) const
virtual ~AbstractMemory()
void addLockedAddr(LockedAddr addr)
Add a locked address to allow for checkpointing.
std::shared_ptr< Request > RequestPtr
LockedAddr(Addr _addr, int _cid)
Locked address class that represents a physical address and a context id.
bool writeOK(PacketPtr pkt)
bool isConfReported() const
Should this memory be passed to the kernel and part of the OS physical memory layout.
A vector of scalar stats.
const ContextID contextId
RequestPtr req
A pointer to the original request.
Stats::Vector bytesWritten
Number of bytes written to this memory.
Stats::Vector numOther
Number of other requests.
The AddrRange class encapsulates an address range, and supports a number of tests to check if two ran...
static Addr mask(Addr paddr)
const std::list< LockedAddr > & getLockedAddrList() const
Get the list of locked addresses to allow checkpointing.
AbstractMemoryParams Params
The ClockedObject class extends the SimObject with a clock and accessor functions to relate ticks to ...
bool isNull() const
See if this is a null memory that should never store data and always return zero. ...
ClockedObject declaration and implementation.
std::list< LockedAddr > lockedAddrList
LockedAddr(const RequestPtr &req)
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Stats::Formula bwTotal
Total bandwidth from this memory.
Stats::Vector bytesRead
Number of total bytes read from this memory.
A Packet is used to encapsulate a transfer between two objects in the memory system (e...
Stats::Vector bytesInstRead
Number of instruction bytes read from this memory.
Addr start() const
Get the start address.
const Params * params() const
Stats::Vector numWrites
Number of write requests.
System * system() const
read the system pointer Implemented for completeness with the setter
uint8_t * toHostAddr(Addr addr) const
Transform a gem5 address space address into its physical counterpart in the host address space...
const AbstractMemory & mem
Stats::Formula bwRead
Read bandwidth from this memory.
uint64_t size() const
Get the memory size.
System * _system
Pointer to the System object.
const ContextID InvalidContextID
An abstract memory represents a contiguous block of physical memory, with an associated address range...
Addr start() const
Get the start address of the range.
bool isInAddrMap() const
Some memories are used as shadow memories or should for other reasons not be part of the global addre...
Addr size() const
Get the size of the address range.
bool isKvmMap() const
When shadow memories are in use, KVM may want to make one or the other, but cannot map both into the ...
void system(System *sys)
Set the system pointer on this memory This can't be done via a python parameter because the system ne...
Stats::Formula bwWrite
Write bandwidth from this memory.
Stats::Formula bwInstRead
Read bandwidth from this memory.
int ContextID
Globally unique thread context ID.
const FlagsType init
This Stat is Initialized.
const bool confTableReported
static const Addr Addr_Mask
Stats::Vector numReads
Number of read requests.