gem5
v20.1.0.0
|
#include <multi_level_page_table.hh>
Public Member Functions | |
MultiLevelPageTable (const std::string &__name, uint64_t _pid, System *_sys, Addr pageSize) | |
~MultiLevelPageTable () | |
void | initState () override |
Addr | basePtr () |
void | map (Addr vaddr, Addr paddr, int64_t size, uint64_t flags=0) override |
Maps a virtual memory region to a physical memory region. More... | |
void | remap (Addr vaddr, int64_t size, Addr new_vaddr) override |
void | unmap (Addr vaddr, int64_t size) override |
void | serialize (CheckpointOut &cp) const override |
Serialize an object. More... | |
void | unserialize (CheckpointIn &cp) override |
Unserialize an object. More... | |
Public Member Functions inherited from EmulationPageTable | |
EmulationPageTable (const std::string &__name, uint64_t _pid, Addr _pageSize) | |
uint64_t | pid () const |
virtual | ~EmulationPageTable () |
const std::string | name () const |
Addr | pageAlign (Addr a) |
Addr | pageOffset (Addr a) |
virtual bool | isUnmapped (Addr vaddr, int64_t size) |
Check if any pages in a region are already allocated. More... | |
const Entry * | lookup (Addr vaddr) |
Lookup function. More... | |
bool | translate (Addr vaddr, Addr &paddr) |
Translate function. More... | |
bool | translate (Addr vaddr) |
Simplified translate function (just check for translation) More... | |
Fault | translate (const RequestPtr &req) |
Perform a translation on the memory request, fills in paddr field of req. More... | |
void | getMappings (std::vector< std::pair< Addr, Addr >> *addr_mappings) |
void | serialize (CheckpointOut &cp) const override |
Serialize an object. More... | |
void | unserialize (CheckpointIn &cp) override |
Unserialize an object. More... | |
Public Member Functions inherited from Serializable | |
Serializable () | |
virtual | ~Serializable () |
void | serializeSection (CheckpointOut &cp, const char *name) const |
Serialize an object into a new section. More... | |
void | serializeSection (CheckpointOut &cp, const std::string &name) const |
void | unserializeSection (CheckpointIn &cp, const char *name) |
Unserialize an a child object. More... | |
void | unserializeSection (CheckpointIn &cp, const std::string &name) |
Private Types | |
typedef LastType< EntryTypes... >::type | Final |
Private Attributes | |
System * | system |
Pointer to System object. More... | |
Addr | _basePtr |
Physical address to the last level of the page table. More... | |
Additional Inherited Members | |
Public Types inherited from EmulationPageTable | |
enum | MappingFlags : uint32_t { Clobber = 1, Uncacheable = 4, ReadOnly = 8 } |
Static Public Member Functions inherited from Serializable | |
static const std::string & | currentSection () |
Gets the fully-qualified name of the active section. More... | |
static void | serializeAll (const std::string &cpt_dir) |
Serializes all the SimObjects. More... | |
static void | unserializeGlobals (CheckpointIn &cp) |
Public Attributes inherited from EmulationPageTable | |
bool | shared |
Protected Types inherited from EmulationPageTable | |
typedef std::unordered_map< Addr, Entry > | PTable |
typedef PTable::iterator | PTableItr |
Protected Attributes inherited from EmulationPageTable | |
PTable | pTable |
const Addr | pageSize |
const Addr | offsetMask |
const uint64_t | _pid |
const std::string | _name |
Definition at line 179 of file multi_level_page_table.hh.
|
private |
Definition at line 181 of file multi_level_page_table.hh.
|
inline |
Definition at line 194 of file multi_level_page_table.hh.
|
inline |
Definition at line 199 of file multi_level_page_table.hh.
|
inline |
Definition at line 210 of file multi_level_page_table.hh.
References MultiLevelPageTable< EntryTypes >::_basePtr.
|
inlineoverridevirtual |
Reimplemented from EmulationPageTable.
Definition at line 202 of file multi_level_page_table.hh.
References MultiLevelPageTable< EntryTypes >::_basePtr, EmulationPageTable::pageSize, EmulationPageTable::shared, and MultiLevelPageTable< EntryTypes >::system.
|
inlineoverridevirtual |
Maps a virtual memory region to a physical memory region.
vaddr | The starting virtual address of the region. |
paddr | The starting physical address where the region is mapped. |
size | The length of the region. |
flags | Generic mapping flags that can be set by or-ing values from MappingFlags enum. |
Reimplemented from EmulationPageTable.
Definition at line 213 of file multi_level_page_table.hh.
References MultiLevelPageTable< EntryTypes >::_basePtr, DPRINTF, EmulationPageTable::map(), ArmISA::offset, EmulationPageTable::pageSize, System::physProxy, EmulationPageTable::ReadOnly, MultiLevelPageTable< EntryTypes >::system, EmulationPageTable::Uncacheable, and MipsISA::vaddr.
|
inlineoverridevirtual |
Reimplemented from EmulationPageTable.
Definition at line 233 of file multi_level_page_table.hh.
References MultiLevelPageTable< EntryTypes >::_basePtr, ArmISA::offset, EmulationPageTable::pageSize, System::physProxy, EmulationPageTable::remap(), MultiLevelPageTable< EntryTypes >::system, and MipsISA::vaddr.
|
inlineoverridevirtual |
Serialize an object.
Output an object's state into the current checkpoint section.
cp | Checkpoint state |
Since, the page table is stored in system memory which is serialized separately, we will serialize just the base pointer
Implements Serializable.
Definition at line 274 of file multi_level_page_table.hh.
References MultiLevelPageTable< EntryTypes >::_basePtr, paramOut(), and EmulationPageTable::serialize().
|
inlineoverridevirtual |
Reimplemented from EmulationPageTable.
Definition at line 256 of file multi_level_page_table.hh.
References MultiLevelPageTable< EntryTypes >::_basePtr, DPRINTF, fatal_if, ArmISA::offset, EmulationPageTable::pageSize, System::physProxy, MultiLevelPageTable< EntryTypes >::system, EmulationPageTable::unmap(), and MipsISA::vaddr.
|
inlineoverridevirtual |
Unserialize an object.
Read an object's state from the current checkpoint section.
cp | Checkpoint state |
Implements Serializable.
Definition at line 285 of file multi_level_page_table.hh.
References MultiLevelPageTable< EntryTypes >::_basePtr, paramIn(), and EmulationPageTable::unserialize().
|
private |
Physical address to the last level of the page table.
Definition at line 191 of file multi_level_page_table.hh.
Referenced by MultiLevelPageTable< EntryTypes >::basePtr(), MultiLevelPageTable< EntryTypes >::initState(), MultiLevelPageTable< EntryTypes >::map(), MultiLevelPageTable< EntryTypes >::remap(), MultiLevelPageTable< EntryTypes >::serialize(), MultiLevelPageTable< EntryTypes >::unmap(), and MultiLevelPageTable< EntryTypes >::unserialize().
|
private |
Pointer to System object.
Definition at line 186 of file multi_level_page_table.hh.
Referenced by MultiLevelPageTable< EntryTypes >::initState(), MultiLevelPageTable< EntryTypes >::map(), MultiLevelPageTable< EntryTypes >::remap(), and MultiLevelPageTable< EntryTypes >::unmap().