|
ETISS 0.11.2
ExtendableTranslatingInstructionSetSimulator(version0.11.2)
|
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. | |
| uint64_t | GetByName (std::string const name) const |
| Get the bit field value with its name. | |
| void | SetFlagByName (std::string name, uint64_t val) |
| Set the bit field value with its name. | |
| void | ClearFlagByName (std::string name) |
| Clear the bit field value with its name. | |
| void | Dump () |
| Dump the details of the PTE entry. | |
| 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 96 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 85 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 104 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 84 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 48 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 81 of file PTE.h.
References ppn_val_.
Referenced by etiss::mm::MMU::Translate().

|
inlineprivate |
Definition at line 94 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 65 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 24 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 101 of file PTE.h.
Referenced by CheckBit(), ClearBit(), Dump(), Get(), GetByName(), SetBit(), and Update().