gem5 v24.0.0.0
Loading...
Searching...
No Matches
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.
 
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 Entrylookup (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

Systemsystem
 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, 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()

◆ 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

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().

◆ unmap()

◆ 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

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().

Member Data Documentation

◆ _basePtr

◆ system


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

Generated on Tue Jun 18 2024 16:24:12 for gem5 by doxygen 1.11.0