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

#include <multi_level_page_table.hh>

Inheritance diagram for MultiLevelPageTable< EntryTypes >:
EmulationPageTable 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 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 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...
 
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

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 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, EntryPTable
 
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
 

Detailed Description

template<class ... EntryTypes>
class MultiLevelPageTable< EntryTypes >

Definition at line 179 of file multi_level_page_table.hh.

Member Typedef Documentation

◆ Final

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

Definition at line 181 of file multi_level_page_table.hh.

Constructor & Destructor Documentation

◆ MultiLevelPageTable()

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

Definition at line 194 of file multi_level_page_table.hh.

◆ ~MultiLevelPageTable()

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

Definition at line 199 of file multi_level_page_table.hh.

Member Function Documentation

◆ basePtr()

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

◆ initState()

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

◆ map()

template<class ... EntryTypes>
void 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 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.

◆ remap()

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

◆ serialize()

template<class ... EntryTypes>
void 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 Serializable.

Definition at line 274 of file multi_level_page_table.hh.

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

◆ unmap()

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

◆ unserialize()

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

Unserialize an object.

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

Parameters
cpCheckpoint state

Implements Serializable.

Definition at line 285 of file multi_level_page_table.hh.

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

Member Data Documentation

◆ _basePtr

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

◆ system

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

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

Generated on Wed Sep 30 2020 14:02:28 for gem5 by doxygen 1.8.17