37 #ifndef __MEM_PAGE_TABLE_HH__
38 #define __MEM_PAGE_TABLE_HH__
41 #include <unordered_map>
43 #include "arch/isa_traits.hh"
44 #include "arch/tlb.hh"
47 #include "config/the_isa.hh"
121 uint64_t flags = 0) = 0;
208 typedef std::unordered_map<Addr, TheISA::TlbEntry>
PTable;
224 uint64_t flags = 0)
override;
260 fatal(
"No architectural page table defined for this ISA.\n");
264 #endif // __MEM_PAGE_TABLE_HH__
Declaration of functional page table.
virtual void unmap(Addr vaddr, int64_t size)=0
virtual void getMappings(std::vector< std::pair< Addr, Addr >> *addr_mappings)
void updateCache(Addr vaddr, TheISA::TlbEntry entry)
Update the page table cache.
virtual void map(Addr vaddr, Addr paddr, int64_t size, uint64_t flags=0)=0
Maps a virtual memory region to a physical memory region.
Declaration of a request, the overall memory request consisting of the parts of the request that are ...
bool isUnmapped(Addr vaddr, int64_t size) override
Check if any pages in a region are already allocated.
FuncPageTable(const std::string &__name, uint64_t _pid, Addr _pageSize=TheISA::PageBytes)
ThreadContext is the external interface to all thread state for anything outside of the CPU...
void map(Addr vaddr, Addr paddr, int64_t size, uint64_t flags=0) override
Maps a virtual memory region to a physical memory region.
std::unordered_map< Addr, TheISA::TlbEntry > PTable
PTable::iterator PTableItr
void remap(Addr vaddr, int64_t size, Addr new_vaddr) override
bool translate(Addr vaddr)
Simplified translate function (just check for translation)
virtual void remap(Addr vaddr, int64_t size, Addr new_vaddr)=0
bool translate(Addr vaddr, Addr &paddr)
Translate function.
void serialize(CheckpointOut &cp) const override
Serialize an object.
Faux page table class indended to stop the usage of an architectural page table, when there is none d...
TlbEntry(Addr asn, Addr _vaddr, Addr _paddr, bool uncacheable, bool read_only)
bool isPowerOf2(const T &n)
Defines global host-dependent types: Counter, Tick, and (indirectly) {int,uint}{8,16,32,64}_t.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
const std::string name() const
Basic support for object serialization.
virtual void initState(ThreadContext *tc)=0
Declaration of base class for page table.
void unserialize(CheckpointIn &cp) override
Unserialize an object.
int floorLog2(unsigned x)
void unmap(Addr vaddr, int64_t size) override
void getMappings(std::vector< std::pair< Addr, Addr >> *addr_maps) override
NoArchPageTable(const std::string &__name, uint64_t _pid, System *_sys, Addr _pageSize=TheISA::PageBytes)
std::ostream CheckpointOut
bool lookup(Addr vaddr, TheISA::TlbEntry &entry) override
Lookup function.
virtual bool lookup(Addr vaddr, TheISA::TlbEntry &entry)=0
Lookup function.
void eraseCacheEntry(Addr vaddr)
Erase an entry from the page table cache.
struct cacheElement pTableCache[3]
void initState(ThreadContext *tc) override
virtual bool isUnmapped(Addr vaddr, int64_t size)=0
Check if any pages in a region are already allocated.
std::shared_ptr< FaultBase > Fault
PageTableBase(const std::string &__name, uint64_t _pid, Addr _pageSize=TheISA::PageBytes)