vmm.h File Reference

#include <vmm/paging.h>
#include <ubixos/types.h>

Go to the source code of this file.

Data Structures

struct  mMap

Defines

#define memAvail   1
#define memNotavail   2
#define vmmID   -3
#define vmmMemoryMapAddr   0xE6667000

Functions

int adjustCowCounter (uInt32 baseAddr, int adjustment)
int countMemory ()
int freePage (uInt32 pageAddr)
int vmm_init ()
u_int32_t vmmFindFreePage (pidType pid)
void vmmFreeProcessPages (pidType pid)
int vmmMemMapInit ()

Variables

int numPages
mMapvmmMemoryMap


Define Documentation

#define memAvail   1

Definition at line 36 of file vmm.h.

Referenced by adjustCowCounter(), freePage(), vmmFindFreePage(), vmmFreeProcessPages(), and vmmMemMapInit().

#define memNotavail   2

Definition at line 37 of file vmm.h.

Referenced by vmmFindFreePage(), and vmmMemMapInit().

#define vmmID   -3

Definition at line 38 of file vmm.h.

Referenced by adjustCowCounter(), vmmFreeProcessPages(), and vmmMemMapInit().

#define vmmMemoryMapAddr   0xE6667000

Definition at line 39 of file vmm.h.

Referenced by vmm_pagingInit().


Function Documentation

int adjustCowCounter ( uInt32  baseAddr,
int  adjustment 
)

Function: int adjustCowCounter(uInt32 baseAddr,int adjustment);

Description: This Adjust The COW Counter For Page At baseAddr It Will Error If The Count Goes Below 0

Notes:

08/01/02 - I Think If Counter Gets To 0 I Should Free The Page

Definition at line 270 of file vmm_memory.c.

References assert, mMap::cowCounter, freePages, memAvail, mMap::pid, spinLock(), spinUnlock(), mMap::status, systemVitals, vmmCowSpinLock, vmmID, and vmmMemoryMap.

Referenced by freePage(), vmm_pageFault(), vmmCopyVirtualSpace(), and vmmFreeProcessPages().

int countMemory (  ) 

Function: int countMemory(); Description: This Function Counts The Systems Physical Memory Notes:

02/20/2004 - Inspect For Quality And Approved

Definition at line 107 of file vmm_memory.c.

References cr0, inportByte(), and outportByte().

Referenced by vmmMemMapInit().

int freePage ( uInt32  pageAddr  ) 

Function: int freePage(uInt32 pageAddr);

Description: This Function Marks The Page As Free

Notes:

Definition at line 232 of file vmm_memory.c.

References adjustCowCounter(), assert, mMap::cowCounter, freePages, memAvail, mMap::pid, spinLock(), spinUnlock(), mMap::status, systemVitals, vmmMemoryMap, and vmmSpinLock.

Referenced by vmm_remapPage().

int vmm_init (  ) 

Function: int vmm_init()

Description: Initializes the vmm subsystem

Notes:

Definition at line 41 of file vmm_init.c.

References K_PANIC, vmm_pagingInit(), and vmmMemMapInit().

u_int32_t vmmFindFreePage ( pidType  pid  ) 

Function: uInt32 vmmFindFreePage(pid_t pid);

Description: This Returns A Free Physical Page Address Then Marks It Not Available As Well As Setting The PID To The Proccess Allocating This Page Notes:

Definition at line 189 of file vmm_memory.c.

References freePages, kpanic(), memAvail, memNotavail, numPages, mMap::pid, spinLock(), spinUnlock(), status, sysctl_enabled, sysID, systemVitals, TRUE, vmmMemoryMap, and vmmSpinLock.

Referenced by execFile(), kmod_load(), ldEnable(), obreak(), sysExec(), vmm_getFreeMallocPage(), vmm_pageFault(), vmm_pagingInit(), vmm_remapPage(), vmmGetFreeKernelPage(), vmmGetFreePage(), and vmmGetFreeVirtualPage().

void vmmFreeProcessPages ( pidType  pid  ) 

Function: void vmmFreeProcessPages(pid_t pid);

Description: This Function Will Free Up Memory For The Exiting Process

Notes:

08/04/02 - Added Checking For COW Pages First

Definition at line 300 of file vmm_memory.c.

References adjustCowCounter(), mMap::cowCounter, freePages, memAvail, numPages, PAGE_COW, pageEntries, parentPageDirAddr, mMap::pid, spinLock(), spinUnlock(), status, systemVitals, tablesBaseAddress, vmmID, vmmMemoryMap, vmmSpinLock, and x1000.

Referenced by systemTask().

int vmmMemMapInit (  ) 

Function: void vmmMemMapInit(); Description: This Function Initializes The Memory Map For the System Notes:

02/20/2004 - Made It Report Real And Available Memory

Definition at line 60 of file vmm_memory.c.

References countMemory(), freePages, kprintf(), memAvail, memNotavail, numPages, mMap::pageAddr, mMap::pid, mMap::status, status, vmmID, vmmMemoryMap, and x1000.

Referenced by vmm_init().


Variable Documentation

int numPages

Definition at line 47 of file vmm_memory.c.

Referenced by vmm_pagingInit(), vmmFindFreePage(), vmmFreeProcessPages(), and vmmMemMapInit().

mMap* vmmMemoryMap

Definition at line 48 of file vmm_memory.c.

Referenced by adjustCowCounter(), freePage(), kmain(), vmm_pagingInit(), vmmFindFreePage(), vmmFreeProcessPages(), and vmmMemMapInit().


Generated on Sun Dec 3 02:38:08 2006 for UbixOS V2 by  doxygen 1.4.7