ETISS 0.8.0
Extendable Translating Instruction Set Simulator (version 0.8.0)
|
Page Table Entry (PTE) defines the composition of Page Frame Number (PFN) and relavant flags. More...
#include <PTE.h>
Public Member Functions | |
PTE () | |
PTE (uint64_t pte) | |
void | Update (uint64_t new_pte) |
Update the PTE with a new value. More... | |
uint64_t | GetByName (std::string const name) const |
Get the bit field value with its name. More... | |
void | SetFlagByName (std::string name, uint64_t val) |
Set the bit field value with its name. More... | |
void | ClearFlagByName (std::string name) |
Clear the bit field value with its name. More... | |
void | Dump () |
Dump the details of the PTE entry. More... | |
uint64_t | Get () const |
uint64_t | GetPPN () const |
Private Member Functions | |
uint64_t | GenerateMask (uint64_t len) const |
void | SetBit (uint32_t pos) |
void | ClearBit (uint32_t pos) |
bool | CheckBit (uint32_t pos) const |
Private Attributes | |
uint64_t | ppn_val_ |
uint64_t | pte_val_ |
Page Table Entry (PTE) defines the composition of Page Frame Number (PFN) and relavant flags.
A PTE contains page frame number (pfn) and protection flags. PTEFormat is used to record bit field of PFR and flags in PTE raw value.PFN or flags could be read/write with help of PTEFormat, which could be built up by its builder utility.
|
inline |
|
inlineprivate |
Definition at line 134 of file PTE.h.
References pte_val_, and uint64_t.
Referenced by ClearFlagByName().
void etiss::mm::PTE::ClearFlagByName | ( | std::string | name | ) |
Clear the bit field value with its name.
Definition at line 124 of file PTE.cpp.
References ClearBit(), etiss::mm::PTEFormat::Dump(), etiss::FATALERROR, etiss::mm::PTEFormat::GetFormatMap(), etiss::mm::PTEFormat::Instance(), etiss::log(), and uint32_t.
void etiss::mm::PTE::Dump | ( | ) |
Dump the details of the PTE entry.
Definition at line 143 of file PTE.cpp.
References etiss::mm::PTEFormat::DumpBitFild(), GetByName(), etiss::mm::PTEFormat::GetFormatMap(), etiss::mm::PTEFormat::GetPTELength(), etiss::mm::PTEFormat::Instance(), and pte_val_.
Definition at line 122 of file PTE.h.
References uint64_t.
Referenced by GetByName(), and Update().
|
inline |
uint64_t etiss::mm::PTE::GetByName | ( | std::string const | name | ) | const |
Get the bit field value with its name.
Definition at line 87 of file PTE.cpp.
References etiss::mm::PTEFormat::Dump(), etiss::FATALERROR, GenerateMask(), etiss::mm::PTEFormat::GetFormatMap(), etiss::mm::PTEFormat::Instance(), etiss::log(), pte_val_, and uint32_t.
Referenced by Dump().
|
inline |
Definition at line 119 of file PTE.h.
References ppn_val_.
Referenced by etiss::mm::MMU::Translate().
|
inlineprivate |
Definition at line 132 of file PTE.h.
References pte_val_, and uint64_t.
Referenced by SetFlagByName().
void etiss::mm::PTE::SetFlagByName | ( | std::string | name, |
uint64_t | val | ||
) |
Set the bit field value with its name.
Definition at line 104 of file PTE.cpp.
References etiss::mm::PTEFormat::Dump(), etiss::FATALERROR, etiss::mm::PTEFormat::GetFormatMap(), etiss::mm::PTEFormat::Instance(), etiss::log(), SetBit(), uint32_t, and uint64_t.
void etiss::mm::PTE::Update | ( | uint64_t | new_pte | ) |
Update the PTE with a new value.
Definition at line 62 of file PTE.cpp.
References etiss::mm::PTEFormat::Dump(), etiss::FATALERROR, GenerateMask(), etiss::mm::PTEFormat::GetFormatMap(), etiss::mm::PTEFormat::GetPTELength(), etiss::mm::PTEFormat::Instance(), etiss::log(), ppn_val_, and pte_val_.
Referenced by PTE().
|
private |
|
private |
Definition at line 139 of file PTE.h.
Referenced by CheckBit(), ClearBit(), Dump(), Get(), GetByName(), SetBit(), and Update().