XenevaOS
Loading...
Searching...
No Matches
Functions | Variables
pmmngr.cpp File Reference
#include <Mm/pmmngr.h>
#include <Mm/vmmngr.h>
#include <Hal/x86_64_lowlevel.h>
#include <Hal/x86_64_cpu.h>
#include <aucon.h>
#include <efi.h>
#include <string.h>
#include <Hal/serial.h>
#include <stdint.h>
Include dependency graph for pmmngr.cpp:

Functions

void AuPmmngrInitBitmap (size_t BSize, void *Buffer)
 
bool AuPmmngrBitmapCheck (uint64_t index)
 
bool AuPmmngrBitmapSet (uint64_t index, bool value)
 
void AuPmmngrLockPage (uint64_t Address)
 
void AuPmmngrLockPages (void *Address, size_t Size)
 
void AuPmmngrUnreservePage (void *Address)
 
void AuPmmngrInitialize (KERNEL_BOOT_INFO *info)
 
void * AuPmmngrAlloc ()
 
void * AuPmmngrAllocBlocks (int num)
 
void AuPmmngrFree (void *Address)
 
void AuPmmngrFreeBlocks (void *Addr, int Count)
 
uint64_t P2V (uint64_t addr)
 P2V – Physical to Virtual conversion.
 
uint64_t V2P (uint64_t vaddr)
 V2P – Virtual to Physical conversion.
 
void AuPmmngrMoveHigher ()
 AuPmmngrMoveHigher – moves the kernel to higher half of memory.
 
uint64_t AuPmmngrGetFreeMem ()
 
uint64_t AuPmmngrGetTotalMem ()
 

Variables

uint64_t _FreeMemory
 
uint64_t _ReservedMemory
 
uint64_t _UsedMemory
 
uint64_t _RamBitmapIndex
 
uint64_t _TotalRam
 
uint64_t _BitmapSize
 
bool _HigherHalf
 
bool debugon
 
uint8_tBitmapBuffer
 

Function Documentation

◆ AuPmmngrAlloc()

void * AuPmmngrAlloc ( )

◆ AuPmmngrAllocBlocks()

void * AuPmmngrAllocBlocks ( int  num)

◆ AuPmmngrBitmapCheck()

bool AuPmmngrBitmapCheck ( uint64_t  index)

◆ AuPmmngrBitmapSet()

bool AuPmmngrBitmapSet ( uint64_t  index,
bool  value 
)

◆ AuPmmngrFree()

void AuPmmngrFree ( void *  Address)

◆ AuPmmngrFreeBlocks()

void AuPmmngrFreeBlocks ( void *  Addr,
int  Count 
)

◆ AuPmmngrGetFreeMem()

uint64_t AuPmmngrGetFreeMem ( )

◆ AuPmmngrGetTotalMem()

uint64_t AuPmmngrGetTotalMem ( )

◆ AuPmmngrInitBitmap()

void AuPmmngrInitBitmap ( size_t  BSize,
void *  Buffer 
)

◆ AuPmmngrInitialize()

void AuPmmngrInitialize ( KERNEL_BOOT_INFO info)

◆ AuPmmngrLockPage()

void AuPmmngrLockPage ( uint64_t  Address)

◆ AuPmmngrLockPages()

void AuPmmngrLockPages ( void *  Address,
size_t  Size 
)

◆ AuPmmngrMoveHigher()

void AuPmmngrMoveHigher ( void  )

AuPmmngrMoveHigher – moves the kernel to higher half of memory.

◆ AuPmmngrUnreservePage()

void AuPmmngrUnreservePage ( void *  Address)

◆ P2V()

uint64_t P2V ( uint64_t  addr)

P2V – Physical to Virtual conversion.

Parameters
addr– Address to convert

◆ V2P()

uint64_t V2P ( uint64_t  vaddr)

V2P – Virtual to Physical conversion.

Parameters
vaddr– Address to convert

Variable Documentation

◆ _BitmapSize

uint64_t _BitmapSize

◆ _FreeMemory

uint64_t _FreeMemory

BSD 2-Clause License

Copyright (c) 2022-2023, Manas Kamal Choudhury All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

◆ _HigherHalf

bool _HigherHalf

◆ _RamBitmapIndex

uint64_t _RamBitmapIndex

◆ _ReservedMemory

uint64_t _ReservedMemory

◆ _TotalRam

uint64_t _TotalRam

◆ _UsedMemory

uint64_t _UsedMemory

◆ BitmapBuffer

uint8_t* BitmapBuffer

◆ debugon

bool debugon