gem5  v22.1.0.0
Public Member Functions | Private Types | Private Attributes | List of all members
gem5::MultiLevelPageTable< EntryTypes > Class Template Reference

#include <multi_level_page_table.hh>

Inheritance diagram for gem5::MultiLevelPageTable< EntryTypes >:
gem5::EmulationPageTable gem5::Serializable

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 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. More...
 
const Entrylookup (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...
 
TranslationGenPtr translateRange (Addr vaddr, Addr size)
 
Fault translate (const RequestPtr &req)
 Perform a translation on the memory request, fills in paddr field of req. More...
 
const std::string externalize () const
 Dump all items in the pTable, to a concatenation of strings of the form Addr:Entry;. 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 gem5::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

Systemsystem
 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 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. More...
 
static void generateCheckpointOut (const std::string &cpt_dir, std::ofstream &outstream)
 Generate a checkpoint file so that the serialization can be routed to it. More...
 
- Public Attributes inherited from gem5::EmulationPageTable
bool shared
 
- Protected Types inherited from gem5::EmulationPageTable
typedef std::unordered_map< Addr, EntryPTable
 
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
 

Detailed Description

template<class ... EntryTypes>
class gem5::MultiLevelPageTable< EntryTypes >

Definition at line 186 of file multi_level_page_table.hh.

Member Typedef Documentation

◆ Final

template<class ... EntryTypes>
typedef LastType<EntryTypes...>::type gem5::MultiLevelPageTable< EntryTypes >::Final
private

Definition at line 188 of file multi_level_page_table.hh.

Constructor & Destructor Documentation

◆ MultiLevelPageTable()

template<class ... EntryTypes>
gem5::MultiLevelPageTable< EntryTypes >::MultiLevelPageTable ( const std::string &  __name,
uint64_t  _pid,
System _sys,
Addr  _pageSize 
)
inline

Definition at line 201 of file multi_level_page_table.hh.

◆ ~MultiLevelPageTable()

template<class ... EntryTypes>
gem5::MultiLevelPageTable< EntryTypes >::~MultiLevelPageTable ( )
inline

Definition at line 206 of file multi_level_page_table.hh.

Member Function Documentation

◆ basePtr()

template<class ... EntryTypes>
Addr gem5::MultiLevelPageTable< EntryTypes >::basePtr ( )
inline

◆ initState()

template<class ... EntryTypes>
void gem5::MultiLevelPageTable< EntryTypes >::initState ( )
inlineoverridevirtual

◆ map()

template<class ... EntryTypes>
void gem5::MultiLevelPageTable< EntryTypes >::map ( Addr  vaddr,
Addr  paddr,
int64_t  size,
uint64_t  flags = 0 
)
inlineoverridevirtual

Maps a virtual memory region to a physical memory region.

Parameters
vaddrThe starting virtual address of the region.
paddrThe starting physical address where the region is mapped.
sizeThe length of the region.
flagsGeneric 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.

◆ remap()

template<class ... EntryTypes>
void gem5::MultiLevelPageTable< EntryTypes >::remap ( Addr  vaddr,
int64_t  size,
Addr  new_vaddr 
)
inlineoverridevirtual

◆ serialize()

template<class ... EntryTypes>
void gem5::MultiLevelPageTable< EntryTypes >::serialize ( CheckpointOut cp) const
inlineoverridevirtual

Serialize an object.

Output an object's state into the current checkpoint section.

Parameters
cpCheckpoint state

Since, the page table is stored in system memory which is serialized separately, we will serialize just the base pointer

Implements gem5::Serializable.

Definition at line 281 of file multi_level_page_table.hh.

References gem5::MultiLevelPageTable< EntryTypes >::_basePtr, gem5::paramOut(), and gem5::EmulationPageTable::serialize().

◆ unmap()

template<class ... EntryTypes>
void gem5::MultiLevelPageTable< EntryTypes >::unmap ( Addr  vaddr,
int64_t  size 
)
inlineoverridevirtual

◆ unserialize()

template<class ... EntryTypes>
void gem5::MultiLevelPageTable< EntryTypes >::unserialize ( CheckpointIn cp)
inlineoverridevirtual

Unserialize an object.

Read an object's state from the current checkpoint section.

Parameters
cpCheckpoint state

Implements gem5::Serializable.

Definition at line 292 of file multi_level_page_table.hh.

References gem5::MultiLevelPageTable< EntryTypes >::_basePtr, gem5::paramIn(), and gem5::EmulationPageTable::unserialize().

Member Data Documentation

◆ _basePtr

template<class ... EntryTypes>
Addr gem5::MultiLevelPageTable< EntryTypes >::_basePtr
private

◆ system

template<class ... EntryTypes>
System* gem5::MultiLevelPageTable< EntryTypes >::system
private

The documentation for this class was generated from the following file:

Generated on Wed Dec 21 2022 10:23:27 for gem5 by doxygen 1.9.1