UbixOS  2.0
vmm_memory.c File Reference
#include <vmm/vmm.h>
#include <sys/io.h>
#include <ubixos/kpanic.h>
#include <lib/kprintf.h>
#include <lib/kmalloc.h>
#include <ubixos/vitals.h>
#include <ubixos/spinlock.h>
#include <assert.h>
#include <i386/cpu.h>
Include dependency graph for vmm_memory.c:

Go to the source code of this file.

Functions

int adjustCowCounter (uInt32 baseAddr, int adjustment)
 
int countMemory ()
 
int freePage (uint32_t pageAddr)
 
uint32_t vmm_findFreePage (pidType pid)
 
void vmm_freeProcessPages (pidType pid)
 
int vmm_memMapInit ()
 

Variables

int numPages = 0x0
 
mMapvmmMemoryMap = (mMap *) VMM_MMAP_ADDR_RMODE
 

Function Documentation

◆ adjustCowCounter()

int adjustCowCounter ( uInt32  baseAddr,
int  adjustment 
)

Definition at line 303 of file vmm_memory.c.

References assert, PAGE_SIZE, and spinLock().

Here is the call graph for this function:

◆ countMemory()

int countMemory ( )

Definition at line 109 of file vmm_memory.c.

References inportByte(), and outportByte().

Referenced by vmm_memMapInit().

Here is the call graph for this function:

◆ freePage()

int freePage ( uint32_t  pageAddr)

Definition at line 262 of file vmm_memory.c.

References assert, spinLock(), and vmmMemoryMap.

Referenced by vmm_unmapPage().

Here is the call graph for this function:

◆ vmm_findFreePage()

uint32_t vmm_findFreePage ( pidType  pid)

Definition at line 221 of file vmm_memory.c.

References kpanic(), spinLock(), and sysID.

Referenced by elf_load_file(), execFile(), freebsd6_mmap(), kmod_load(), ldEnable(), sys_mmap(), sysExec(), vmm_allocPageTable(), vmm_getFreeKernelPage(), and vmm_pagingInit().

Here is the call graph for this function:

◆ vmm_freeProcessPages()

void vmm_freeProcessPages ( pidType  pid)

Definition at line 342 of file vmm_memory.c.

References PD_BASE_ADDR, and spinLock().

Referenced by systemTask().

Here is the call graph for this function:

◆ vmm_memMapInit()

int vmm_memMapInit ( )

Definition at line 57 of file vmm_memory.c.

References countMemory(), mMap::cowCounter, memNotavail, numPages, PAGE_SIZE, mMap::pageAddr, mMap::pid, mMap::status, VMM_MMAP_ADDR_RMODE, vmmID, and vmmMemoryMap.

Referenced by vmm_init().

Here is the call graph for this function:

Variable Documentation

◆ numPages

int numPages = 0x0

Definition at line 45 of file vmm_memory.c.

Referenced by vmm_memMapInit(), and vmm_pagingInit().

◆ vmmMemoryMap

mMap* vmmMemoryMap = (mMap *) VMM_MMAP_ADDR_RMODE

Definition at line 47 of file vmm_memory.c.

Referenced by freePage(), vmm_memMapInit(), and vmm_pagingInit().