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

Class for creating short temporal mappings for separate pages. More...

#include <vm_mm.h>

Collaboration diagram for vm::QuickMap:

List of all members.

Public Types

enum  { MAX_PAGES = 64 }

Public Member Functions

 QuickMap (Vaddr mapBase, size_t numPages, void **mapPte)
 Construct quick map helper object.
Vaddr Map (Paddr pa, long flags=LAT_EF_PRESENT|LAT_EF_WRITE)
 Map physical address.
void Unmap (Vaddr va)
 Unmap page which was previously mapped by Map method.

Detailed Description

Class for creating short temporal mappings for separate pages.


Member Enumeration Documentation

anonymous enum
Enumerator:
MAX_PAGES 

Maximal number of pages which can be used for quick map.


Constructor & Destructor Documentation

QuickMap::QuickMap ( Vaddr  mapBase,
size_t  numPages,
void **  mapPte 
)

Construct quick map helper object.

Parameters:
mapBaseVirtual address of the first page in the VAS region reserved for quick maps. The region must be a continuous range of one or more pages.
numPagesNumber of pages available in provided VAS region.
mapPteArray of PTEs which correspond to virtual addresses provided in mapBase.

Member Function Documentation

Vaddr QuickMap::Map ( Paddr  pa,
long  flags = LAT_EF_PRESENT | LAT_EF_WRITE 
)

Map physical address.

Parameters:
paPhysical address to map. One page is mapped.
flagsMapping flags for the entry, see LatEntryFlags.
Returns:
Virtual address of mapped page.
void QuickMap::Unmap ( Vaddr  va)

Unmap page which was previously mapped by Map method.

Parameters:
vaVirtual address returned by Map method.

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