gem5 v24.0.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. | |
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. | |
void | unserialize (CheckpointIn &cp) override |
Unserialize an object. | |
Public Member Functions inherited from gem5::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) |
Addr | pageSize () |
virtual bool | isUnmapped (Addr vaddr, int64_t size) |
Check if any pages in a region are already allocated. | |
const Entry * | lookup (Addr vaddr) |
Lookup function. | |
bool | translate (Addr vaddr, Addr &paddr) |
Translate function. | |
bool | translate (Addr vaddr) |
Simplified translate function (just check for translation) | |
TranslationGenPtr | translateRange (Addr vaddr, Addr size) |
Fault | translate (const RequestPtr &req) |
Perform a translation on the memory request, fills in paddr field of req. | |
const std::string | externalize () const |
Dump all items in the pTable, to a concatenation of strings of the form Addr:Entry;. | |
void | getMappings (std::vector< std::pair< Addr, Addr > > *addr_mappings) |
Public Member Functions inherited from gem5::Serializable | |
Serializable () | |
virtual | ~Serializable () |
void | serializeSection (CheckpointOut &cp, const char *name) const |
Serialize an object into a new section. | |
void | serializeSection (CheckpointOut &cp, const std::string &name) const |
void | unserializeSection (CheckpointIn &cp, const char *name) |
Unserialize an a child object. | |
void | unserializeSection (CheckpointIn &cp, const std::string &name) |
Private Types | |
typedef LastType< EntryTypes... >::type | Final |
Private Attributes | |
System * | system |
Pointer to System object. | |
Addr | _basePtr |
Physical address to the last level of the page table. | |
Additional Inherited Members | |
Public Types inherited from gem5::EmulationPageTable | |
enum | MappingFlags : uint32_t { Clobber = 1 , Uncacheable = 4 , ReadOnly = 8 } |
Static Public Member Functions inherited from gem5::Serializable | |
static const std::string & | currentSection () |
Gets the fully-qualified name of the active section. | |
static void | generateCheckpointOut (const std::string &cpt_dir, std::ofstream &outstream) |
Generate a checkpoint file so that the serialization can be routed to it. | |
Public Attributes inherited from gem5::EmulationPageTable | |
bool | shared |
Protected Types inherited from gem5::EmulationPageTable | |
typedef std::unordered_map< Addr, Entry > | PTable |
typedef PTable::iterator | PTableItr |
Protected Attributes inherited from gem5::EmulationPageTable | |
PTable | pTable |
const Addr | _pageSize |
const Addr | offsetMask |
const uint64_t | _pid |
const std::string | _name |
Definition at line 186 of file multi_level_page_table.hh.
|
private |
Definition at line 188 of file multi_level_page_table.hh.
|
inline |
Definition at line 201 of file multi_level_page_table.hh.
|
inline |
Definition at line 206 of file multi_level_page_table.hh.
|
inline |
Definition at line 217 of file multi_level_page_table.hh.
References gem5::MultiLevelPageTable< EntryTypes >::_basePtr.
|
inlineoverridevirtual |
Reimplemented from gem5::EmulationPageTable.
Definition at line 209 of file multi_level_page_table.hh.
References gem5::MultiLevelPageTable< EntryTypes >::_basePtr, gem5::EmulationPageTable::_pageSize, gem5::EmulationPageTable::shared, and gem5::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 gem5::EmulationPageTable.
Definition at line 220 of file multi_level_page_table.hh.
References gem5::MultiLevelPageTable< EntryTypes >::_basePtr, gem5::EmulationPageTable::_pageSize, DPRINTF, flags, gem5::EmulationPageTable::map(), gem5::ArmISA::offset, gem5::System::physProxy, gem5::EmulationPageTable::ReadOnly, gem5::MultiLevelPageTable< EntryTypes >::system, gem5::EmulationPageTable::Uncacheable, and gem5::MipsISA::vaddr.
|
inlineoverridevirtual |
Reimplemented from gem5::EmulationPageTable.
Definition at line 240 of file multi_level_page_table.hh.
References gem5::MultiLevelPageTable< EntryTypes >::_basePtr, gem5::EmulationPageTable::_pageSize, gem5::ArmISA::offset, gem5::System::physProxy, gem5::EmulationPageTable::remap(), gem5::MultiLevelPageTable< EntryTypes >::system, and gem5::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
Reimplemented from gem5::EmulationPageTable.
Definition at line 281 of file multi_level_page_table.hh.
References gem5::MultiLevelPageTable< EntryTypes >::_basePtr, gem5::paramOut(), and gem5::EmulationPageTable::serialize().
|
inlineoverridevirtual |
Reimplemented from gem5::EmulationPageTable.
Definition at line 263 of file multi_level_page_table.hh.
References gem5::MultiLevelPageTable< EntryTypes >::_basePtr, gem5::EmulationPageTable::_pageSize, DPRINTF, fatal_if, gem5::ArmISA::offset, gem5::System::physProxy, gem5::MultiLevelPageTable< EntryTypes >::system, gem5::EmulationPageTable::unmap(), and gem5::MipsISA::vaddr.
|
inlineoverridevirtual |
Unserialize an object.
Read an object's state from the current checkpoint section.
cp | Checkpoint state |
Reimplemented from gem5::EmulationPageTable.
Definition at line 292 of file multi_level_page_table.hh.
References gem5::MultiLevelPageTable< EntryTypes >::_basePtr, gem5::paramIn(), and gem5::EmulationPageTable::unserialize().
|
private |
Physical address to the last level of the page table.
Definition at line 198 of file multi_level_page_table.hh.
Referenced by gem5::MultiLevelPageTable< EntryTypes >::basePtr(), gem5::MultiLevelPageTable< EntryTypes >::initState(), gem5::MultiLevelPageTable< EntryTypes >::map(), gem5::MultiLevelPageTable< EntryTypes >::remap(), gem5::MultiLevelPageTable< EntryTypes >::serialize(), gem5::MultiLevelPageTable< EntryTypes >::unmap(), and gem5::MultiLevelPageTable< EntryTypes >::unserialize().
|
private |
Pointer to System object.
Definition at line 193 of file multi_level_page_table.hh.
Referenced by gem5::MultiLevelPageTable< EntryTypes >::initState(), gem5::MultiLevelPageTable< EntryTypes >::map(), gem5::MultiLevelPageTable< EntryTypes >::remap(), and gem5::MultiLevelPageTable< EntryTypes >::unmap().