Phoenix
Object-oriented orthogonally persistent operating system
Public Member Functions | Static Public Member Functions
vm::VaddrDecoder Class Reference

Helper class to extract components (LAT tables entries indices and offset in a page) from a virtual address. More...

#include <md_vm.h>

List of all members.

Public Member Functions

 VaddrDecoder (vaddr_t va=0)
 Construct decoder object from virtual address.
LatEntryIdx GetEntryIndex (u32 tableLvl)
 Get entry index in a specifiedLatEntrytable of the given virtual address.
vaddr_t GetPageOffset ()
 Get offset in a page for a given virtual address.

Static Public Member Functions

static u32 GetTableSize (u32 UNUSED tableLvl)
 Get size of specifiedLatEntrytable.

Detailed Description

Helper class to extract components (LAT tables entries indices and offset in a page) from a virtual address.

Defines the layout of LAT tables hierarchy and virtual address fields layout.


Constructor & Destructor Documentation

vm::VaddrDecoder::VaddrDecoder ( vaddr_t  va = 0) [inline]

Construct decoder object from virtual address.


Member Function Documentation

LatEntryIdx vm::VaddrDecoder::GetEntryIndex ( u32  tableLvl) [inline]

Get entry index in a specifiedLatEntrytable of the given virtual address.

Parameters:
tableLvlLAT table level.
Returns:
Index of the entry in the specifiedLatEntrytable corresponding to the given virtual address.
vaddr_t vm::VaddrDecoder::GetPageOffset ( ) [inline]

Get offset in a page for a given virtual address.

static u32 vm::VaddrDecoder::GetTableSize ( u32 UNUSED  tableLvl) [inline, static]

Get size of specifiedLatEntrytable.

Parameters:
tableLvlNull-based table level starting from least significant (e.g. page table, page directory, ...).
Returns:
Number of entries in a specified table.

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines