Newer
Older
ubixos-old / src / sys / mm / pagefault.c
@fsdfs fsdfs on 10 Aug 2005 519 bytes updates + kmalloc() and kfree() stubs
#include <mm/vmm.h>
#include <ubixos/sched.h>
#include <ubixos/kpanic.h>
static spinLock_t pageFaultSpinLock = SPIN_LOCK_INITIALIZER;

void LoadPageIntoMemory(mMap *page);

void vmm_pageFault2(uInt32 memAddr, uInt32 eip, uInt32 esp)
{
	kTask_t *tmp = _current;
	mMap *m = tmp->FirstPage;

	for( ; m != NULL ; m = m->Next)
	{
		if(m->pageAddr == memAddr)
		{
			LoadPageIntoMemory(m);
			return;
		}
	}
	kpanic("pagefault: Requested a page which does not exist\n");
	
}

void LoadPageIntoMemory(mMap *page)
{
	return;
}