Phoenix
Object-oriented orthogonally persistent operating system
Public Member Functions
vm::LatEntry Class Reference

Class representing LAT table entry. More...

#include <md_vm.h>

List of all members.

Public Member Functions

 LatEntry (vaddr_t va, void *table, u32 tableLvl=0)
 Create entry by a table and virtual address.
 LatEntry (void *entry, u32 tableLvl=0)
 Create entry by direct pointer.
void Set (vaddr_t va, void *table, u32 tableLvl=0)
 Set entry by a table and virtual address.
void Set (void *entry, u32 tableLvl=0)
 Set entry by direct pointer.
bool IsAccessed ()
 Check if the page mapped by the entry was accessed since last flag reset.
bool SetAccessed (bool flag=true)
 Set or clear accessed flag for an entry.
bool IsDirty ()
 Check if the page mapped by the entry was modified since last flag reset.
bool SetDirty (bool flag=true)
 Set or clear dirty flag for an entry.
bool CheckFlag (LatEntryFlags flag)
 Check specified flag inLatEntryentry.
bool SetFlag (LatEntryFlags flag, bool setIt=true)
 Set or clear specified flag inLatEntryentry.
long SetFlags (long flags)
 SetLatEntryentry flags.
paddr_t GetAddress ()
 Get physical address pointed by the entry.
paddr_t SetAddress (paddr_t pa)
 Set physical address pointed by the entry.
void Clear ()
 Clear mapping provided by the entry.
 operator paddr_t ()
 Cast entry to physical address.
LatEntryoperator= (paddr_t pa)
 Set physical address pointed by the entry.
 operator void * ()
 Cast entry to pointer.
ProcCtxId GetProcCtxId ()
 Get process context identifier.
ProcCtxId SetProcCtxId (ProcCtxId pcid)
 Set process context identifier.
void Activate ()
 Switches current address space to the specified root.

Detailed Description

Class representing LAT table entry.


Constructor & Destructor Documentation

vm::LatEntry::LatEntry ( vaddr_t  va,
void *  table,
u32  tableLvl = 0 
) [inline]

Create entry by a table and virtual address.

The entry in the table selected accordingly to virtual address provided.

Parameters:
vaVirtual address.
tablePointer to the table.
tableLvlNull-based table level starting from least significant (e.g. page table, page directory, ...).
vm::LatEntry::LatEntry ( void *  entry,
u32  tableLvl = 0 
) [inline]

Create entry by direct pointer.

Parameters:
entryPointer to the entry.
tableLvlLevel of the table which contains the entry.

Member Function Documentation

void vm::LatEntry::Activate ( ) [inline]

Switches current address space to the specified root.

Entry must be new address space root entry.

bool vm::LatEntry::CheckFlag ( LatEntryFlags  flag) [inline]

Check specified flag inLatEntryentry.

Parameters:
flagFlag to check.
Returns:
Specified flag value.
void vm::LatEntry::Clear ( ) [inline]

Clear mapping provided by the entry.

paddr_t vm::LatEntry::GetAddress ( ) [inline]

Get physical address pointed by the entry.

ProcCtxId vm::LatEntry::GetProcCtxId ( ) [inline]

Get process context identifier.

Not all architectures support this parameter. Zero returned on unsupported architectures. The entry must beLatEntrytables root entry.

Returns:
Process context identifier associated with the given root entry.
bool vm::LatEntry::IsAccessed ( ) [inline]

Check if the page mapped by the entry was accessed since last flag reset.

Returns:
true if the page was accessed.
bool vm::LatEntry::IsDirty ( ) [inline]

Check if the page mapped by the entry was modified since last flag reset.

Returns:
true if the page was modified.
vm::LatEntry::operator paddr_t ( ) [inline]

Cast entry to physical address.

The same effect as from GetAddress.

Returns:
Physical address pointed by the entry.
vm::LatEntry::operator void * ( ) [inline]

Cast entry to pointer.

Returns:
Pointer to the entry in a table.
LatEntry& vm::LatEntry::operator= ( paddr_t  pa) [inline]

Set physical address pointed by the entry.

The same effect as from SetAddress.

Parameters:
paPhysical address to set.
Returns:
Reference to itself.
void vm::LatEntry::Set ( void *  entry,
u32  tableLvl = 0 
) [inline]

Set entry by direct pointer.

Parameters:
entryPointer to the entry.
tableLvlLevel of the table which contains the entry.
void vm::LatEntry::Set ( vaddr_t  va,
void *  table,
u32  tableLvl = 0 
) [inline]

Set entry by a table and virtual address.

The entry in the table selected accordingly to virtual address provided.

Parameters:
vaVirtual address.
tablePointer to the table.
tableLvlNull-based table level starting from least significant (e.g. page table, page directory, ...).
bool vm::LatEntry::SetAccessed ( bool  flag = true) [inline]

Set or clear accessed flag for an entry.

Parameters:
flagValue to set in the flag.
Returns:
Previous value of the flag.
paddr_t vm::LatEntry::SetAddress ( paddr_t  pa) [inline]

Set physical address pointed by the entry.

Parameters:
paPhysical address to set.
Returns:
Previous value of physical address in the entry.
bool vm::LatEntry::SetDirty ( bool  flag = true) [inline]

Set or clear dirty flag for an entry.

Parameters:
flagValue to set in the flag.
Returns:
Previous value of the flag.
bool vm::LatEntry::SetFlag ( LatEntryFlags  flag,
bool  setIt = true 
) [inline]

Set or clear specified flag inLatEntryentry.

Parameters:
flagFlag to set or clear. Corresponding machine-dependent flag will be affected.
setItSet the flag if true, clear otherwise.
Returns:
Previous flag state.
long vm::LatEntry::SetFlags ( long  flags) [inline]

SetLatEntryentry flags.

Parameters:
flagsFlags which must be set. Any number of flags defined by LatEntryFlags can be specified. Corresponding machine-dependent flags will be set, flags which were not specified will be cleared.
Returns:
Previous combination of the flags.
ProcCtxId vm::LatEntry::SetProcCtxId ( ProcCtxId  pcid) [inline]

Set process context identifier.

Not all architectures support this parameter. The value is ignored on unsupported architectures. The entry must beLatEntrytables root entry.

Returns:
Process context identifier associated with the given root entry.

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