Phoenix
Object-oriented orthogonally persistent operating system
|
This class represents kernel virtual memory manager. More...
#include <vm_mm.h>
Public Types | |
enum | InitState { IS_INITIAL, IS_PREINITIALIZED, IS_INITIALIZING, IS_INITIALIZED } |
State of kernel memory management initialization. More... | |
Public Member Functions | |
Vaddr | PhysToVirt (Paddr pa) |
Convert physical address to corresponding virtual address in persistent physical memory mapping. | |
Page & | GetPage (Paddr pa) |
Get physical page descriptor by the page physical address. | |
Static Public Member Functions | |
static InitState | GetInitState () |
Get current initialization state. | |
static void | PreInitialize (vaddr_t heap, paddr_t defaultLatRoot, vaddr_t quickMap, void **quickMapPte) |
Pre-initialize memory management. | |
static void | Initialize (void *memMap, size_t memMapNumDesc, size_t memMapDescSize, u32 memMapDescVersion) |
Finalize kernel memory management initialization. |
This class represents kernel virtual memory manager.
enum vm::MM::InitState |
State of kernel memory management initialization.
static InitState vm::MM::GetInitState | ( | ) | [inline, static] |
Get current initialization state.
Get physical page descriptor by the page physical address.
pa | Physical address of the page. |
void MM::Initialize | ( | void * | memMap, |
size_t | memMapNumDesc, | ||
size_t | memMapDescSize, | ||
u32 | memMapDescVersion | ||
) | [static] |
Finalize kernel memory management initialization.
memMap | EFI memory map which describes all available memory. |
memMapNumDesc | Number of descriptors in memMap. |
memMapDescSize | One descriptor size in memMap. |
memMapDescVersion | Descriptor version in memMap. |
Convert physical address to corresponding virtual address in persistent physical memory mapping.
pa | Physical address to convert. |
void MM::PreInitialize | ( | vaddr_t | heap, |
paddr_t | defaultLatRoot, | ||
vaddr_t | quickMap, | ||
void ** | quickMapPte | ||
) | [static] |
Pre-initialize memory management.
This method should be called before any memory allocations can be performed in the kernel. This method does not return any value. It will either succeed or cause system fault in case of failure.
heap | Current heap pointer. |
defaultLatRoot | Default LAT root table. |
quickMap | Quick map pages. They are allocated consequentially. |
quickMapPte | Quick map PTEs. |