ETISS 0.8.0
Extendable Translating Instruction Set Simulator (version 0.8.0)
Classes | Typedefs | Enumerations | Functions | Variables
etiss::mm Namespace Reference

Classes

class  DMMUWrapper
 
struct  DMMUWrapperSystem
 
class  MMU
 
class  PTE
 Page Table Entry (PTE) defines the composition of Page Frame Number (PFN) and relavant flags. More...
 
class  PTEFormat
 
class  PTEFormatBuilder
 Sigleton builder utility to build up customized PTE format. More...
 
class  TLB
 

Typedefs

typedef int32_t(* handler_ptr) (int32_t fault, MMU *mmu, uint64_t vma, MM_ACCESS access)
 
typedef std::map< std::string, std::pair< uint32_t, uint32_t > > PTEFormatMap
 Singleton to represent specific PTE format, every PTE uses this singleton to parse raw PTE value into PPN and protection flags, read/write PPN or flags. More...
 

Enumerations

enum  MM_ACCESS { R_ACCESS , W_ACCESS , X_ACCESS }
 

Functions

int32_t tlb_miss_handler (int32_t fault, MMU *mmu, uint64_t vma, MM_ACCESS access)
 
void DUMP_MMU (MMU *mmu)
 
static etiss_int32 iread (void *handle, ETISS_CPU *cpu, etiss_uint64 addr, etiss_uint32 length)
 
static etiss_int32 iwrite (void *handle, ETISS_CPU *cpu, etiss_uint64 addr, etiss_uint8 *buffer, etiss_uint32 length)
 
static etiss_int32 dread (void *handle, ETISS_CPU *cpu, etiss_uint64 addr, etiss_uint8 *buffer, etiss_uint32 length)
 
static etiss_int32 dwrite (void *handle, ETISS_CPU *cpu, etiss_uint64 addr, etiss_uint8 *buffer, etiss_uint32 length)
 
static etiss_int32 dbg_read (void *handle, etiss_uint64 addr, etiss_uint8 *buffer, etiss_uint32 length)
 
static etiss_int32 dbg_write (void *handle, etiss_uint64 addr, etiss_uint8 *buffer, etiss_uint32 length)
 
static void syncTime (void *handle, ETISS_CPU *cpu)
 
static int32_t page_fault_ni_ (int32_t fault, MMU *mmu, uint64_t, MM_ACCESS)
 

Variables

MM_EXPORT const int32_t NOERROR
 
MM_EXPORT const int32_t PTEOVERLAP
 
MM_EXPORT const int32_t TLBMISS
 
MM_EXPORT const int32_t PTENOTEXISTED
 
MM_EXPORT const int32_t TLBISFULL
 
MM_EXPORT const int32_t PROTECTIONVIALATION
 
MM_EXPORT std::string PAGE_FAULT_MSG []
 
MM_EXPORT handler_ptr page_fault_handler []
 

Typedef Documentation

◆ handler_ptr

typedef int32_t(* etiss::mm::handler_ptr) (int32_t fault, MMU *mmu, uint64_t vma, MM_ACCESS access)

Definition at line 72 of file PageFaultVector.h.

◆ PTEFormatMap

typedef std::map<std::string, std::pair<uint32_t, uint32_t> > etiss::mm::PTEFormatMap

Singleton to represent specific PTE format, every PTE uses this singleton to parse raw PTE value into PPN and protection flags, read/write PPN or flags.

Definition at line 62 of file PTEFormat.h.

Enumeration Type Documentation

◆ MM_ACCESS

Enumerator
R_ACCESS 
W_ACCESS 
X_ACCESS 

Definition at line 62 of file PageFaultVector.h.

Function Documentation

◆ dbg_read()

static etiss_int32 etiss::mm::dbg_read ( void *  handle,
etiss_uint64  addr,
etiss_uint8 buffer,
etiss_uint32  length 
)
static

Definition at line 131 of file DMMUWrapper.cpp.

References ETISS_System::dbg_read, ETISS_System::handle, int32_t, length(), etiss::mm::DMMUWrapperSystem::orig, etiss::mm::DMMUWrapperSystem::this_, uint64_t, unlikely, and X_ACCESS.

Referenced by etiss::mm::DMMUWrapper::wrap().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dbg_write()

static etiss_int32 etiss::mm::dbg_write ( void *  handle,
etiss_uint64  addr,
etiss_uint8 buffer,
etiss_uint32  length 
)
static

Definition at line 147 of file DMMUWrapper.cpp.

References ETISS_System::dbg_write, ETISS_System::handle, int32_t, length(), etiss::log(), etiss::mm::DMMUWrapperSystem::orig, etiss::mm::DMMUWrapperSystem::this_, uint64_t, unlikely, etiss::VERBOSE, and W_ACCESS.

Referenced by etiss::mm::DMMUWrapper::wrap().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dread()

static etiss_int32 etiss::mm::dread ( void *  handle,
ETISS_CPU cpu,
etiss_uint64  addr,
etiss_uint8 buffer,
etiss_uint32  length 
)
static

Definition at line 97 of file DMMUWrapper.cpp.

References ETISS_System::dread, ETISS_System::handle, int32_t, length(), etiss::mm::DMMUWrapperSystem::orig, R_ACCESS, etiss::mm::DMMUWrapperSystem::this_, uint64_t, and unlikely.

Referenced by etiss::mm::DMMUWrapper::wrap().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ DUMP_MMU()

void etiss::mm::DUMP_MMU ( MMU mmu)

Definition at line 244 of file MMU.cpp.

References etiss::mm::MMU::Dump().

Referenced by page_fault_ni_().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dwrite()

static etiss_int32 etiss::mm::dwrite ( void *  handle,
ETISS_CPU cpu,
etiss_uint64  addr,
etiss_uint8 buffer,
etiss_uint32  length 
)
static

Definition at line 114 of file DMMUWrapper.cpp.

References ETISS_System::dwrite, ETISS_System::handle, int32_t, length(), etiss::mm::DMMUWrapperSystem::orig, etiss::mm::DMMUWrapperSystem::this_, uint64_t, unlikely, and W_ACCESS.

Referenced by etiss::mm::DMMUWrapper::wrap().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ iread()

static etiss_int32 etiss::mm::iread ( void *  handle,
ETISS_CPU cpu,
etiss_uint64  addr,
etiss_uint32  length 
)
static

Definition at line 59 of file DMMUWrapper.cpp.

References ETISS_System::handle, int32_t, ETISS_System::iread, length(), etiss::log(), etiss::mm::DMMUWrapperSystem::orig, R_ACCESS, etiss::mm::DMMUWrapperSystem::this_, uint64_t, unlikely, and etiss::VERBOSE.

Referenced by etiss::mm::DMMUWrapper::wrap().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ iwrite()

static etiss_int32 etiss::mm::iwrite ( void *  handle,
ETISS_CPU cpu,
etiss_uint64  addr,
etiss_uint8 buffer,
etiss_uint32  length 
)
static

Definition at line 78 of file DMMUWrapper.cpp.

References ETISS_System::handle, int32_t, ETISS_System::iwrite, length(), etiss::log(), etiss::mm::DMMUWrapperSystem::orig, etiss::mm::DMMUWrapperSystem::this_, uint64_t, unlikely, etiss::VERBOSE, and W_ACCESS.

Referenced by etiss::mm::DMMUWrapper::wrap().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ page_fault_ni_()

static int32_t etiss::mm::page_fault_ni_ ( int32_t  fault,
MMU mmu,
uint64_t  ,
MM_ACCESS   
)
static

Definition at line 71 of file PageFaultVector.cpp.

References DUMP_MMU(), etiss::FATALERROR, etiss::log(), NOERROR, and PAGE_FAULT_MSG.

Here is the call graph for this function:

◆ syncTime()

static void etiss::mm::syncTime ( void *  handle,
ETISS_CPU cpu 
)
static

Definition at line 166 of file DMMUWrapper.cpp.

References ETISS_System::handle, etiss::mm::DMMUWrapperSystem::orig, and ETISS_System::syncTime.

Referenced by etiss::mm::DMMUWrapper::wrap().

Here is the caller graph for this function:

◆ tlb_miss_handler()

int32_t etiss::mm::tlb_miss_handler ( int32_t  fault,
MMU mmu,
uint64_t  vma,
MM_ACCESS  access 
)

Definition at line 221 of file MMU.cpp.

References etiss::mm::MMU::HasPageTableWalker(), int32_t, NOERROR, R_ACCESS, W_ACCESS, etiss::mm::MMU::WalkPageTable(), and X_ACCESS.

Referenced by etiss::mm::MMU::MMU().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ NOERROR

MM_EXPORT const int32_t etiss::mm::NOERROR
extern

◆ page_fault_handler

handler_ptr etiss::mm::page_fault_handler

◆ PAGE_FAULT_MSG

std::string etiss::mm::PAGE_FAULT_MSG
Initial value:
= {
"no error occurs",
"page table entry already existed",
"TLB miss",
"evict a non-existed PTE",
"TLB is already full",
"TLB is already full"
}

Definition at line 62 of file PageFaultVector.cpp.

Referenced by page_fault_ni_().

◆ PROTECTIONVIALATION

MM_EXPORT const int32_t etiss::mm::PROTECTIONVIALATION
extern

◆ PTENOTEXISTED

MM_EXPORT const int32_t etiss::mm::PTENOTEXISTED
extern

◆ PTEOVERLAP

MM_EXPORT const int32_t etiss::mm::PTEOVERLAP
extern

◆ TLBISFULL

MM_EXPORT const int32_t etiss::mm::TLBISFULL
extern

◆ TLBMISS

MM_EXPORT const int32_t etiss::mm::TLBMISS
extern