diff --git a/src/sys/armv6/exec.c b/src/sys/armv6/exec.c index abc2539..0a512c4 100644 --- a/src/sys/armv6/exec.c +++ b/src/sys/armv6/exec.c @@ -248,7 +248,7 @@ */ for (x = 0x0;x < (programHeader[i].phMemsz);x += 0x1000) { /* Make readonly and read/write !!! */ - if (vmm_remapPage(vmmFindFreePage(_current->id),((programHeader[i].phVaddr & 0xFFFFF000) + x),PAGE_DEFAULT) == 0x0) + if (vmm_remapPage(vmm_findFreePage(_current->id),((programHeader[i].phVaddr & 0xFFFFF000) + x),PAGE_DEFAULT) == 0x0) K_PANIC("Remap Page Failed"); memset((void *)((programHeader[i].phVaddr & 0xFFFFF000) + x),0x0,0x1000); @@ -274,12 +274,12 @@ /* Set Up Stack Space */ for (x = 1;x < 100;x++) { - vmm_remapPage(vmmFindFreePage(_current->id),STACK_ADDR - (x * 0x1000),PAGE_DEFAULT | PAGE_STACK); + vmm_remapPage(vmm_findFreePage(_current->id),STACK_ADDR - (x * 0x1000),PAGE_DEFAULT | PAGE_STACK); } /* Kernel Stack 0x2000 bytes long */ - vmm_remapPage(vmmFindFreePage(_current->id),0x5BC000,KERNEL_PAGE_DEFAULT | PAGE_STACK); - vmm_remapPage(vmmFindFreePage(_current->id),0x5BB000,KERNEL_PAGE_DEFAULT | PAGE_STACK); + vmm_remapPage(vmm_findFreePage(_current->id),0x5BC000,KERNEL_PAGE_DEFAULT | PAGE_STACK); + vmm_remapPage(vmm_findFreePage(_current->id),0x5BB000,KERNEL_PAGE_DEFAULT | PAGE_STACK); /* Set All The Proper Information For The Task */ _current->tss.back_link = 0x0; @@ -435,7 +435,7 @@ */ for (x = 0x0;x < (programHeader[i].phMemsz);x += 0x1000) { /* Make readonly and read/write !!! */ - if (vmm_remapPage(vmmFindFreePage(_current->id),((programHeader[i].phVaddr & 0xFFFFF000) + x),PAGE_DEFAULT) == 0x0) + if (vmm_remapPage(vmm_findFreePage(_current->id),((programHeader[i].phVaddr & 0xFFFFF000) + x),PAGE_DEFAULT) == 0x0) K_PANIC("Error: Remap Page Failed"); memset((void *)((programHeader[i].phVaddr & 0xFFFFF000) + x),0x0,0x1000); } @@ -613,7 +613,7 @@ */ for (x = 0x0;x < (programHeader[i].phMemsz);x += 0x1000) { /* Make readonly and read/write !!! */ - if (vmm_remapPage(vmmFindFreePage(_current->id),((programHeader[i].phVaddr & 0xFFFFF000) + x),PAGE_DEFAULT) == 0x0) + if (vmm_remapPage(vmm_findFreePage(_current->id),((programHeader[i].phVaddr & 0xFFFFF000) + x),PAGE_DEFAULT) == 0x0) K_PANIC("Error: Remap Page Failed"); memset((void *)((programHeader[i].phVaddr & 0xFFFFF000) + x),0x0,0x1000); } diff --git a/src/sys/i386/fork.c b/src/sys/i386/fork.c index 2a8e12b..54541ed 100644 --- a/src/sys/i386/fork.c +++ b/src/sys/i386/fork.c @@ -91,7 +91,7 @@ kprintf( "Copying Mem Space! [0x%X:0x%X:0x%X:0x%X:0x%X:%i:%i]\n", newProcess->tss.esp0, newProcess->tss.esp, newProcess->tss.ebp, td->frame->tf_esi, td->frame->tf_eip, newProcess->id, _current->id ); - newProcess->tss.cr3 = (uInt32) vmmCopyVirtualSpace( newProcess->id ); + newProcess->tss.cr3 = (uInt32) vmm_copyVirtualSpace( newProcess->id ); //kprintf( "Copied Mem Space!\n" ); newProcess->state = FORK; @@ -166,7 +166,7 @@ /* Create A Copy Of The VM Space For New Task */ kprintf( "Copying Mem Space! [0x%X:0x%X:0x%X:0x%X:0x%X:%i:%i:0x%X]\n", newProcess->tss.esp0, newProcess->tss.esp, newProcess->tss.ebp, esi, eip, newProcess->id, _current->id, newProcess->td.vm_daddr ); - newProcess->tss.cr3 = (uInt32) vmmCopyVirtualSpace( newProcess->id ); + newProcess->tss.cr3 = (uInt32) vmm_copyVirtualSpace( newProcess->id ); //kprintf( "Copied Mem Space!\n" ); newProcess->state = FORK; diff --git a/src/sys/i386/i386_exec.c b/src/sys/i386/i386_exec.c index 8e1db22..9ee9200 100644 --- a/src/sys/i386/i386_exec.c +++ b/src/sys/i386/i386_exec.c @@ -76,7 +76,7 @@ so do not use out side of kernel space *****************************************************************************************/ -uInt32 execThread( void (*tproc)( void ), uInt32 stack, char *arg ) { +uInt32 execThread( void (*tproc)( void ), uint32_t stack, char *arg ) { kTask_t * newProcess = 0x0; /* Find A New Thread */ newProcess = schedNewTask(); @@ -190,7 +190,7 @@ _current->term->owner = _current->id; /* Now We Must Create A Virtual Space For This Proccess To Run In */ - _current->tss.cr3 = (uInt32) vmmCreateVirtualSpace( _current->id ); + _current->tss.cr3 = (uInt32) vmm_createVirtualSpace( _current->id ); kprintf( "_current->tss.cr3: 0x%X", _current->tss.cr3 ); /* To Better Load This Application We Will Switch Over To Its VM Space */ @@ -260,7 +260,7 @@ */ for ( x = 0x0; x < (programHeader[i].phMemsz); x += 0x1000 ) { /* Make readonly and read/write !!! */ - if ( vmm_remapPage( vmmFindFreePage( _current->id ), ((programHeader[i].phVaddr & 0xFFFFF000) + x), PAGE_DEFAULT ) == 0x0 ) + if ( vmm_remapPage( vmm_findFreePage( _current->id ), ((programHeader[i].phVaddr & 0xFFFFF000) + x), PAGE_DEFAULT ) == 0x0 ) K_PANIC( "Remap Page Failed" ); memset( (void *) ((programHeader[i].phVaddr & 0xFFFFF000) + x), 0x0, 0x1000 ); @@ -288,12 +288,12 @@ /* Set Up Stack Space */ //MrOlsen (2016-01-14) FIX: is the stack start supposed to be addressable xhcnage x= 1 to x=0 for ( x = 0; x < 100; x++ ) { - vmm_remapPage( vmmFindFreePage( _current->id ), STACK_ADDR - (x * 0x1000), PAGE_DEFAULT | PAGE_STACK ); + vmm_remapPage( vmm_findFreePage( _current->id ), STACK_ADDR - (x * 0x1000), PAGE_DEFAULT | PAGE_STACK ); } /* Kernel Stack 0x2000 bytes long */ - vmm_remapPage( vmmFindFreePage( _current->id ), 0x5BC000, KERNEL_PAGE_DEFAULT | PAGE_STACK ); - vmm_remapPage( vmmFindFreePage( _current->id ), 0x5BB000, KERNEL_PAGE_DEFAULT | PAGE_STACK ); + vmm_remapPage( vmm_findFreePage( _current->id ), 0x5BC000, KERNEL_PAGE_DEFAULT | PAGE_STACK ); + vmm_remapPage( vmm_findFreePage( _current->id ), 0x5BB000, KERNEL_PAGE_DEFAULT | PAGE_STACK ); /* Set All The Proper Information For The Task */ _current->tss.back_link = 0x0; @@ -497,7 +497,7 @@ */ for ( x = 0x0; x < (round_page( programHeader[i].phMemsz )); x += 0x1000 ) { /* Make readonly and read/write !!! */ - if ( vmm_remapPage( vmmFindFreePage( _current->id ), ((programHeader[i].phVaddr & 0xFFFFF000) + x), PAGE_DEFAULT ) == 0x0 ) { + if ( vmm_remapPage( vmm_findFreePage( _current->id ), ((programHeader[i].phVaddr & 0xFFFFF000) + x), PAGE_DEFAULT ) == 0x0 ) { K_PANIC( "Error: Remap Page Failed" ); } /* else { @@ -804,7 +804,7 @@ */ for ( x = 0x0; x < (programHeader[i].phMemsz); x += 0x1000 ) { /* Make readonly and read/write !!! */ - if ( vmm_remapPage( vmmFindFreePage( _current->id ), ((programHeader[i].phVaddr & 0xFFFFF000) + x), PAGE_DEFAULT ) == 0x0 ) + if ( vmm_remapPage( vmm_findFreePage( _current->id ), ((programHeader[i].phVaddr & 0xFFFFF000) + x), PAGE_DEFAULT ) == 0x0 ) K_PANIC( "Error: Remap Page Failed" ); memset( (void *) ((programHeader[i].phVaddr & 0xFFFFF000) + x), 0x0, 0x1000 ); } diff --git a/src/sys/i386/systemtask.c b/src/sys/i386/systemtask.c index 97ec26c..4663abd 100644 --- a/src/sys/i386/systemtask.c +++ b/src/sys/i386/systemtask.c @@ -108,7 +108,7 @@ if ( tmpTask != 0x0 ) { if ( tmpTask->imageFd != 0x0 ) fclose( tmpTask->imageFd ); - vmmFreeProcessPages( tmpTask->id ); + vmm_freeProcessPages( tmpTask->id ); kfree( tmpTask ); } videoBuffer[0] = systemVitals->sysTicks; diff --git a/src/sys/include/vmm/paging.h b/src/sys/include/vmm/paging.h index b3a1c35..aec6434 100644 --- a/src/sys/include/vmm/paging.h +++ b/src/sys/include/vmm/paging.h @@ -76,14 +76,14 @@ int vmmClearVirtualPage(uInt32 pageAddr); -void vmmUnmapPage(uInt32, int); -void vmmUnmapPages(void *, uInt32); -void *vmmMapFromTask(pidType, void *, uInt32); -void *vmmCopyVirtualSpace(pidType); -void *vmmGetFreePage(pidType); +void vmm_unmapPage(uInt32, int); +void vmm_unmapPages(void *, uInt32); +void *vmm_mapFromTask(pidType, void *, uInt32); +void *vmm_copyVirtualSpace(pidType); +void *vmm_getFreePage(pidType); void *vmmGetFreeKernelPage(pidType pid, uInt16 count); -void *vmmCreateVirtualSpace(pidType); -void *vmmGetFreeVirtualPage(pidType, int, int); +void *vmm_createVirtualSpace(pidType); +void *vmm_getFreeVirtualPage(pidType, int, int); uint32_t vmm_getPhysicalAddr(uint32_t); uint32_t vmm_getRealAddr(uint32_t); diff --git a/src/sys/include/vmm/vmm.h b/src/sys/include/vmm/vmm.h index d1f208b..5695526 100644 --- a/src/sys/include/vmm/vmm.h +++ b/src/sys/include/vmm/vmm.h @@ -93,12 +93,12 @@ extern mMap *vmmMemoryMap; int vmm_init(); -int vmmMemMapInit(); +int vmm_memMapInit(); int countMemory(); -uint32_t vmmFindFreePage( pidType pid ); +uint32_t vmm_findFreePage( pidType pid ); int freePage( uInt32 pageAddr ); int adjustCowCounter( uInt32 baseAddr, int adjustment ); -void vmmFreeProcessPages( pidType pid ); +void vmm_freeProcessPages( pidType pid ); #ifdef __cplusplus diff --git a/src/sys/kernel/elf.c b/src/sys/kernel/elf.c index eb93c3d..455a8e7 100644 --- a/src/sys/kernel/elf.c +++ b/src/sys/kernel/elf.c @@ -158,7 +158,7 @@ */ for (x = 0x0;x < (programHeader[i].phMemsz);x += 0x1000) { /* Make readonly and read/write */ - if (vmm_remapPage(vmmFindFreePage(_current->id),((programHeader[i].phVaddr & 0xFFFFF000) + x + base),PAGE_DEFAULT) == 0x0) + if (vmm_remapPage(vmm_findFreePage(_current->id),((programHeader[i].phVaddr & 0xFFFFF000) + x + base),PAGE_DEFAULT) == 0x0) K_PANIC("Error: Remap Page Failed"); memset((void *)((programHeader[i].phVaddr & 0xFFFFF000) + x + base),0x0,0x1000); } diff --git a/src/sys/kernel/ld.c b/src/sys/kernel/ld.c index a320370..6d4eae0 100644 --- a/src/sys/kernel/ld.c +++ b/src/sys/kernel/ld.c @@ -90,7 +90,7 @@ */ for (x=0;x < (programHeader[i].phMemsz);x += 0x1000) { /* make r/w or ro */ - if ((vmm_remapPage(vmmFindFreePage(_current->id),((programHeader[i].phVaddr & 0xFFFFF000) + x + LD_START),PAGE_DEFAULT)) == 0x0) + if ((vmm_remapPage(vmm_findFreePage(_current->id),((programHeader[i].phVaddr & 0xFFFFF000) + x + LD_START),PAGE_DEFAULT)) == 0x0) K_PANIC("vmmRemapPage: ld"); memset((void *)((programHeader[i].phVaddr & 0xFFFFF000) + x + LD_START),0x0,0x1000); } diff --git a/src/sys/kmods/kmod.c b/src/sys/kmods/kmod.c index db05b80..9d9f698 100644 --- a/src/sys/kmods/kmod.c +++ b/src/sys/kmods/kmod.c @@ -132,7 +132,7 @@ */ for (x=0;x < ((programHeader[i].phMemsz)+4095);x += 0x1000) { /* make r/w or ro */ - if ((vmm_remapPage(vmmFindFreePage(_current->id),((programHeader[i].phVaddr & 0xFFFFF000) + x + LD_START),PAGE_DEFAULT)) == 0x0) + if ((vmm_remapPage(vmm_findFreePage(_current->id),((programHeader[i].phVaddr & 0xFFFFF000) + x + LD_START),PAGE_DEFAULT)) == 0x0) kpanic("vmmRemapPage: ld\n"); memset((void *)((programHeader[i].phVaddr & 0xFFFFF000) + x + LD_START),0x0,0x1000); } diff --git a/src/sys/net/api/tcpip.c b/src/sys/net/api/tcpip.c index 5e4dae9..d29a8d1 100644 --- a/src/sys/net/api/tcpip.c +++ b/src/sys/net/api/tcpip.c @@ -178,21 +178,29 @@ #else /* LWIP_TCPIP_CORE_LOCKING_INPUT */ struct tcpip_msg *msg; +//kprintf("INPKT?\n"); + LWIP_ASSERT("Invalid mbox", sys_mbox_valid_val(mbox)); msg = (struct tcpip_msg *)memp_malloc(MEMP_TCPIP_MSG_INPKT); +//kprintf("INPKT %i\n", __LINE__); if (msg == NULL) { return ERR_MEM; } +//kprintf("INPKT %i\n", __LINE__); msg->type = TCPIP_MSG_INPKT; msg->msg.inp.p = p; msg->msg.inp.netif = inp; msg->msg.inp.input_fn = input_fn; +//kprintf("%s:%i\n", __FILE__, __LINE__); if (sys_mbox_trypost(&mbox, msg) != ERR_OK) { +//kprintf("INPKT %i\n", __LINE__); memp_free(MEMP_TCPIP_MSG_INPKT, msg); +//kprintf("INPKT %i\n", __LINE__); return ERR_MEM; } +//kprintf("INPKT %i\n", __LINE__); return ERR_OK; #endif /* LWIP_TCPIP_CORE_LOCKING_INPUT */ } @@ -212,11 +220,15 @@ tcpip_input(struct pbuf *p, struct netif *inp) { #if LWIP_ETHERNET +kprintf("tcpip_input0\n"); if (inp->flags & (NETIF_FLAG_ETHARP | NETIF_FLAG_ETHERNET)) { +kprintf("tcpip_input1\n"); return tcpip_inpkt(p, inp, ethernet_input); } else #endif /* LWIP_ETHERNET */ +kprintf("tcpip_input2\n"); return tcpip_inpkt(p, inp, ip_input); +kprintf("tcpip_input3\n"); } /** diff --git a/src/sys/net/core/init.c b/src/sys/net/core/init.c index 09ef246..67468ad 100644 --- a/src/sys/net/core/init.c +++ b/src/sys/net/core/init.c @@ -341,39 +341,54 @@ /* Modules initialization */ stats_init(); +kprintf("STATS INIT"); #if !NO_SYS sys_init(); +kprintf("SYS INIT"); #endif /* !NO_SYS */ mem_init(); +kprintf("MEM INIT"); memp_init(); +kprintf("MEMP INIT"); pbuf_init(); +kprintf("PBUF INIT"); netif_init(); +kprintf("NETIF INIT"); #if LWIP_IPV4 ip_init(); +kprintf("IP INIT"); #if LWIP_ARP etharp_init(); +kprintf("ETHARP INIT"); #endif /* LWIP_ARP */ #endif /* LWIP_IPV4 */ #if LWIP_RAW raw_init(); +kprintf("RAW INIT"); #endif /* LWIP_RAW */ #if LWIP_UDP udp_init(); +kprintf("UDP INIT"); #endif /* LWIP_UDP */ #if LWIP_TCP tcp_init(); +kprintf("TCP INIT"); #endif /* LWIP_TCP */ #if LWIP_IGMP igmp_init(); +kprintf("IGMP INIT"); #endif /* LWIP_IGMP */ #if LWIP_DNS dns_init(); +kprintf("DNS INIT"); #endif /* LWIP_DNS */ #if PPP_SUPPORT ppp_init(); +kprintf("PPP INIT"); #endif #if LWIP_TIMERS sys_timeouts_init(); +kprintf("SYS TIMEOUTS INIT"); #endif /* LWIP_TIMERS */ } diff --git a/src/sys/net/net/init.c b/src/sys/net/net/init.c index 759cab8..f60fa5e 100644 --- a/src/sys/net/net/init.c +++ b/src/sys/net/net/init.c @@ -58,6 +58,7 @@ IP4_ADDR(&netmask, 255, 255, 0, 0); netif_add(&netif, &ipaddr, &netmask, &gw, NULL, ethernetif_init, tcpip_input); + netif_set_default(&netif); //netif_set_default(netif_add(&ipaddr, &netmask, &gw, ethernetif_init, tcpip_input)); irqEnable(0x9); diff --git a/src/sys/net/net/sys_arch.c b/src/sys/net/net/sys_arch.c index a5b148c..91ed63a 100644 --- a/src/sys/net/net/sys_arch.c +++ b/src/sys/net/net/sys_arch.c @@ -64,23 +64,32 @@ uint32_t sys_arch_sem_wait(struct sys_sem *sem, uint32_t timeout) { uint32_t time = sys_now(); - kprintf("L2"); + //kprintf("L2"); ubthread_mutex_lock(&(sem->mutex)); + // kprintf("L2.1"); while (sem->signaled <= 0) { if (timeout > 0) { +//kprintf("%s:%i\n", __FILE__, __LINE__); time = cond_wait(&(sem->cond), &(sem->mutex), timeout); + time = 0; +//kprintf("%s:%i\n", __FILE__, __LINE__); if (time == 0) { +//kprintf("%s:%i\n", __FILE__, __LINE__); ubthread_mutex_unlock(&(sem->mutex)); +//kprintf("%s:%i\n", __FILE__, __LINE__); return(0); } } else { - cond_wait(&(sem->cond), &(sem->mutex), 0); +//kprintf("%s:%i\n", __FILE__, __LINE__); + time = cond_wait(&(sem->cond), &(sem->mutex), 0); + timeout = 1; +//kprintf("%s:%i\n", __FILE__, __LINE__); } } sem->signaled--; - kprintf("L3"); + //kprintf("L3"); ubthread_mutex_lock(&(sem->mutex)); kprintf("L3.1"); return (sys_now() - time); @@ -157,10 +166,13 @@ err_t sys_mbox_trypost(sys_mbox_t * mbox, void *msg) { uint32_t res; +kprintf("%s:%i\n", __FILE__, __LINE__); /* SHOULD BE TRY WAIT */ res = sys_arch_sem_wait(&mbox->empty, 0x0); +kprintf("%s:%i\n", __FILE__, __LINE__); if (res == ERR_NOT_READY) return ERR_TIMEOUT; +kprintf("%s:%i\n", __FILE__, __LINE__); kprintf("L6"); ubthread_mutex_lock(&mbox->lock); @@ -480,4 +492,5 @@ sys_sem_signal(mbox->mutex); } + #endif diff --git a/src/sys/net/netif/ethernetif.c b/src/sys/net/netif/ethernetif.c index 43ce193..b9264d0 100644 --- a/src/sys/net/netif/ethernetif.c +++ b/src/sys/net/netif/ethernetif.c @@ -45,6 +45,8 @@ #include #include "net/opt.h" +#include //TMP + #include "net/def.h" #include "net/mem.h" #include "net/pbuf.h" @@ -273,16 +275,23 @@ ethernetif = netif->state; /* move received packet into a new pbuf */ +kprintf("ethernetif_input0\n"); p = low_level_input(netif); +kprintf("ethernetif_input1\n"); /* if no packet could be read, silently ignore this */ if (p != NULL) { +kprintf("ethernetif_input2\n"); +kprintf("netif->input: [0x%X][0x%X]\n", netif->input, tcpip_input); /* pass all packets to ethernet_input, which decides what packets it supports */ if (netif->input(p, netif) != ERR_OK) { +kprintf("ethernetif_input3\n"); LWIP_DEBUGF(NETIF_DEBUG, ("ethernetif_input: IP input error\n")); pbuf_free(p); +kprintf("ethernetif_input4\n"); p = NULL; } } +kprintf("ethernetif_input5\n"); } /** diff --git a/src/sys/pci/lnc.c b/src/sys/pci/lnc.c index 541c68a..a3fa9cd 100644 --- a/src/sys/pci/lnc.c +++ b/src/sys/pci/lnc.c @@ -245,6 +245,9 @@ void lnc_INT() { uint16_t csr0 = 0x0; + irqDisable(9); + asm("sti"); + //kprintf("\nINTR\n"); while ((csr0 = lnc_readCSR32(lnc, CSR0)) & INTR) { //kprintf("CSR0: [0x%X]\n", csr0); @@ -282,14 +285,14 @@ lnc_writeCSR32(lnc, CSR0, 0x7940);//csr0); //kprintf("CSR0.1: [0x%X]\n", lnc_readCSR32(lnc, CSR0)); } - + irqEnable(9); kprintf("INT DONE"); } void lnc_rxINT() { int i = 0; - //kprintf("RINT\n"); + kprintf("RINT0\n"); if (tmpBuf == 0x0) { tmpBuf = (struct nicBuffer *)kmalloc(sizeof(struct nicBuffer)); @@ -298,6 +301,7 @@ else { memset(tmpBuf,0x0,sizeof(struct nicBuffer)); } + kprintf("RINT1\n"); while (lnc_driverOwnsRX(lnc)) { //uint16_t plen = 0 + (uint16_t)lnc->rxRing[lnc->rxPtr].md[2]; @@ -310,11 +314,13 @@ tmpBuf->length = plen; tmpBuf->buffer = (void *)(lnc->rxBuffer + (lnc->rxPtr * lnc->bufferSize)); //(char *)kmalloc(length); + kprintf("RINT2\n"); ethernetif_input(netif_default); + kprintf("RINT3\n"); lnc->rxRing[lnc->rxPtr].md[1] = 0x80; lnc_nextRxPtr(lnc); } - //kprintf("RINT-DONE[%i][0x%X]\n", lnc->rxPtr,lnc->rxRing[lnc->rxPtr].md[1]); + kprintf("RINT-DONE[%i][0x%X]\n", lnc->rxPtr,lnc->rxRing[lnc->rxPtr].md[1]); } diff --git a/src/sys/sde/main.cc b/src/sys/sde/main.cc index 9e50911..9d0c05f 100644 --- a/src/sys/sde/main.cc +++ b/src/sys/sde/main.cc @@ -127,8 +127,8 @@ else { windows = 0x0; } - vmmUnmapPages(buf->buffer,buf->bSize); - vmmUnmapPages(buf->lineOfs,buf->lSize); + vmm_unmapPages(buf->buffer,buf->bSize); + vmm_unmapPages(buf->lineOfs,buf->lSize); // kfree(tmp->buf); kfree(tmp); tmp = 0x0; diff --git a/src/sys/vmm/copyvirtualspace.c b/src/sys/vmm/copyvirtualspace.c index a178895..d8e0092 100644 --- a/src/sys/vmm/copyvirtualspace.c +++ b/src/sys/vmm/copyvirtualspace.c @@ -62,7 +62,7 @@ parentPageDirectory = (uInt32 *) PD_BASE_ADDR; /* Allocate A New Page For The New Page Directory */ - if ((newPageDirectory = (uInt32 *) vmmGetFreeKernelPage(pid, 1)) == 0x0) + if ((newPageDirectory = (uInt32 *) vmm_getFreeKernelPage(pid, 1)) == 0x0) kpanic("Error: newPageDirectory == NULL, File: %s, Line: %i\n", __FILE__, __LINE__); /* Set newPageDirectoryAddress To The Newly Created Page Directories Page */ @@ -89,7 +89,7 @@ parentPageTable = (uInt32 *) (PT_BASE_ADDR + (0x1000 * x)); /* Allocate A New Page Table */ - if ((newPageTable = (uInt32 *) vmmGetFreeKernelPage(pid, 1)) == 0x0) + if ((newPageTable = (uInt32 *) vmm_getFreeKernelPage(pid, 1)) == 0x0) kpanic("Error: newPageTable == NULL, File: %s, Line: %i\n", __FILE__, __LINE__); /* Set Parent And New Pages To COW */ @@ -101,7 +101,7 @@ /* Check To See If Its A Stack Page */ if (((uInt32) parentPageTable[i] & PAGE_STACK) == PAGE_STACK) { /* Alloc A New Page For This Stack Page */ - if ((newStackPage = (uInt32 *) vmmGetFreeKernelPage(pid, 1)) == 0x0) + if ((newStackPage = (uInt32 *) vmm_getFreeKernelPage(pid, 1)) == 0x0) kpanic("Error: newStackPage == NULL, File: %s, Line: %i\n", __FILE__, __LINE__); /* Set Pointer To Parents Stack Page */ @@ -115,7 +115,7 @@ /* Insert New Stack Into Page Table */ newPageTable[i] = (vmm_getPhysicalAddr((uInt32) newStackPage) | PAGE_DEFAULT | PAGE_STACK); /* Unmap From Kernel Space */ - vmmUnmapPage((uInt32) newStackPage, 1); + vmm_unmapPage((uInt32) newStackPage, 1); } else { @@ -140,7 +140,7 @@ /* Put New Page Table Into New Page Directory */ newPageDirectory[x] = (vmm_getPhysicalAddr((uInt32) newPageTable) | PAGE_DEFAULT); /* Unmap Page From Kernel Space But Keep It Marked As Not Avail */ - vmmUnmapPage((uInt32) newPageTable, 1); + vmm_unmapPage((uInt32) newPageTable, 1); } else { newPageDirectory[x] = (uInt32) 0x0; @@ -151,7 +151,7 @@ * Allocate A New Page For The The First Page Table Where We Will Map The * Lower Region */ - if ((newPageTable = (uInt32 *) vmmGetFreeKernelPage(pid, 1)) == 0x0) + if ((newPageTable = (uInt32 *) vmm_getFreeKernelPage(pid, 1)) == 0x0) kpanic("Error: newPageTable == NULL, File: %s, Line: %i\n", __FILE__, __LINE__); /* Flush The Page From Garbage In Memory */ @@ -192,14 +192,14 @@ * First Page After Page Tables * This must be mapped into the page directory before we map all 1024 page directories into the memory space */ - newPageTable = (uInt32 *) vmmGetFreePage(pid); + newPageTable = (uInt32 *) vmm_getFreePage(pid); newPageDirectory[PD_INDEX(PD_BASE_ADDR)] = (uint32_t) (vmm_getPhysicalAddr((uInt32) newPageTable) | PAGE_DEFAULT); newPageTable[0] = (uint32_t) ((uint32_t) (newPageDirectoryAddress) | PAGE_DEFAULT); //MrOlsen (2017-12-15) - kprintf( "PD3: %i - 0x%X - 0x%X\n", PD_INDEX( PD_BASE_ADDR ), newPageDirectoryAddress, newPageTable[0] ); - vmmUnmapPage((uInt32) newPageTable, 1); + vmm_unmapPage((uInt32) newPageTable, 1); /* * @@ -208,7 +208,7 @@ * */ - newPageTable = (uInt32 *) vmmGetFreePage(pid); + newPageTable = (uInt32 *) vmm_getFreePage(pid); newPageDirectory[PD_INDEX(PT_BASE_ADDR)] = (uint32_t) (vmm_getPhysicalAddr((uInt32) newPageTable) | PAGE_DEFAULT); @@ -220,11 +220,11 @@ newPageTable[x] = newPageDirectory[x]; /* Unmap Page From Virtual Space */ - vmmUnmapPage((uInt32) newPageTable, 1); + vmm_unmapPage((uInt32) newPageTable, 1); /* Now We Are Done With The Page Directory So Lets Unmap That Too */ - vmmUnmapPage((uInt32) newPageDirectory, 1); + vmm_unmapPage((uInt32) newPageDirectory, 1); spinUnlock(&cvsSpinLock); diff --git a/src/sys/vmm/createvirtualspace.c b/src/sys/vmm/createvirtualspace.c index 563c2f6..feecaac 100644 --- a/src/sys/vmm/createvirtualspace.c +++ b/src/sys/vmm/createvirtualspace.c @@ -63,7 +63,7 @@ /* Allocate A New Page For The New Page Directory */ - newPageDirectory = (uInt32 *) vmmGetFreePage(pid); + newPageDirectory = (uInt32 *) vmm_getFreePage(pid); /* Set newPageDirectoryAddress To The Newly Created Page Directories Page */ @@ -84,7 +84,7 @@ * Lower Region */ - newPageTable = (uInt32 *) vmmGetFreePage(pid); + newPageTable = (uInt32 *) vmm_getFreePage(pid); /* Flush The Page From Garbage In Memory */ for (x = 0; x < PD_ENTRIES; x++) { @@ -103,7 +103,7 @@ } /* Unmap Page From Virtual Space */ - vmmUnmapPage((uInt32) newPageTable, 1); + vmm_unmapPage((uInt32) newPageTable, 1); /* * @@ -111,14 +111,14 @@ * First Page After Page Tables * This must be mapped into the page directory before we map all 1024 page directories into the memory space */ - newPageTable = (uInt32 *) vmmGetFreePage(pid); + newPageTable = (uInt32 *) vmm_getFreePage(pid); newPageDirectory[PD_INDEX(PD_BASE_ADDR)] = (uint32_t) (vmm_getPhysicalAddr((uInt32) newPageTable) | PAGE_DEFAULT); newPageTable[0] = (uint32_t) ((uint32_t) (newPageDirectoryAddress) | PAGE_DEFAULT); //MrOlsen 2017-12-15 kprintf( "PD3: %i - 0x%X - 0x%X\n", PD_INDEX( PD_BASE_ADDR ), newPageDirectoryAddress, newPageTable[0] ); - vmmUnmapPage((uInt32) newPageTable, 1); + vmm_unmapPage((uInt32) newPageTable, 1); /* * @@ -127,7 +127,7 @@ * */ - newPageTable = (uInt32 *) vmmGetFreePage(pid); + newPageTable = (uInt32 *) vmm_getFreePage(pid); newPageDirectory[PD_INDEX(PT_BASE_ADDR)] = (uint32_t) (vmm_getPhysicalAddr((uInt32) newPageTable) | PAGE_DEFAULT); @@ -139,11 +139,11 @@ newPageTable[x] = newPageDirectory[x]; /* Unmap Page From Virtual Space */ - vmmUnmapPage((uInt32) newPageTable, 1); + vmm_unmapPage((uInt32) newPageTable, 1); /* Now We Are Done With The Page Directory So Lets Unmap That Too */ - vmmUnmapPage((uInt32) newPageDirectory, 1); + vmm_unmapPage((uInt32) newPageDirectory, 1); /* Return Physical Address Of Page Directory */ return (newPageDirectoryAddress); } diff --git a/src/sys/vmm/getfreepage.c b/src/sys/vmm/getfreepage.c index 7a1d6e5..9025909 100644 --- a/src/sys/vmm/getfreepage.c +++ b/src/sys/vmm/getfreepage.c @@ -35,7 +35,7 @@ /************************************************************************ - Function: void *vmmGetFreePage(pidType pid); + Function: void *vmm_getFreePage(pidType pid); Description: Returns A Free Page Mapped To The VM Space @@ -59,10 +59,10 @@ /* Loop Through The Page Table Find An UnAllocated Page */ if ( (uInt32) pageTableSrc[y] == (uInt32) 0x0 ) { /* Map A Physical Page To The Virtual Page */ - if ( (vmm_remapPage( vmmFindFreePage( pid ), ((x * 0x400000) + (y * 0x1000)), KERNEL_PAGE_DEFAULT )) == 0x0 ) - kpanic( "vmmRemapPage: vmmGetFreePage\n" ); + if ( (vmm_remapPage( vmm_findFreePage( pid ), ((x * 0x400000) + (y * 0x1000)), KERNEL_PAGE_DEFAULT )) == 0x0 ) + kpanic( "vmmRemapPage: vmm_getFreePage\n" ); /* Clear This Page So No Garbage Is There */ - vmmClearVirtualPage( (uInt32)( (x * 0x400000) + (y * 0x1000) ) ); + vmm_clearVirtualPage( (uInt32)( (x * 0x400000) + (y * 0x1000) ) ); /* Return The Address Of The Newly Allocate Page */ spinUnlock( &vmmGFPlock ); return ((void *) ((x * 0x400000) + (y * 0x1000))); diff --git a/src/sys/vmm/getfreevirtualpage.c b/src/sys/vmm/getfreevirtualpage.c index 3cbfc62..aefe35d 100644 --- a/src/sys/vmm/getfreevirtualpage.c +++ b/src/sys/vmm/getfreevirtualpage.c @@ -89,7 +89,7 @@ /* If Page Directory Is Not Yet Allocated Allocate It */ if ( (pageDir[pdI] & PAGE_PRESENT) != PAGE_PRESENT ) { - pageDir[pdI] = (uInt32) vmmFindFreePage( _current->id ) | PAGE_DEFAULT; + pageDir[pdI] = (uInt32) vmm_findFreePage( _current->id ) | PAGE_DEFAULT; /* Also Add It To Virtual Space So We Can Make Changes Later */ pageTableSrc = (uInt32 *) (PT_BASE_ADDR + (4096 * 767)); @@ -122,9 +122,9 @@ kprintf( "COW PAGE NOT CLEANED!" ); } else if ( (uInt32) pageTableSrc[y] == (uInt32) 0x0 ) { - if ( (vmm_remapPage( (uInt32) vmmFindFreePage( pid ), ((pdI * (1024 * 4096)) + (y * 4096)), PAGE_DEFAULT )) == 0x0 ) + if ( (vmm_remapPage( (uInt32) vmm_findFreePage( pid ), ((pdI * (1024 * 4096)) + (y * 4096)), PAGE_DEFAULT )) == 0x0 ) kpanic( "vmmRemapPage: getFreeVirtualPage-1: (%i)[0x%X]\n", type, ((pdI * (1024 * 4096)) + (y * 4096)) ); - vmmClearVirtualPage( (uInt32)( (pdI * (1024 * 4096)) + (y * 4096) ) ); + vmm_clearVirtualPage( (uInt32)( (pdI * (1024 * 4096)) + (y * 4096) ) ); } else { kprintf( "-> y: %i, ptI: 0x%X, pdI: 0x%X pTS: 0x%X ??\n", y, ptI, pdI, pageTableSrc[y] ); diff --git a/src/sys/vmm/pagefault.c b/src/sys/vmm/pagefault.c index a722c04..8d63648 100644 --- a/src/sys/vmm/pagefault.c +++ b/src/sys/vmm/pagefault.c @@ -107,7 +107,7 @@ /* Remap In New Page */ pageTable[pageTableIndex] = (uInt32) (vmm_getPhysicalAddr((uInt32) dst) | (memAddr & 0xFFF)); /* Unlink From Memory Map Allocated Page */ - vmmUnmapPage((uInt32) dst, 1); + vmm_unmapPage((uInt32) dst, 1); } else if (pageTable[pageTableIndex] != 0x0) { kprintf("Security failed pagetable not user permission\n"); kprintf("pageDir: [0x%X]\n", pageDir[pageDirectoryIndex]); @@ -117,7 +117,7 @@ endTask(_current->id); } else if (memAddr < (_current->td.vm_dsize + _current->td.vm_daddr)) { kprintf("THIS IS BAD"); - pageTable[pageTableIndex] = (uInt32) vmmFindFreePage(_current->id) | PAGE_DEFAULT; + pageTable[pageTableIndex] = (uInt32) vmm_findFreePage(_current->id) | PAGE_DEFAULT; } else { spinUnlock(&pageFaultSpinLock); /* Need To Create A Routine For Attempting To Access Non Mapped Memory */ diff --git a/src/sys/vmm/paging.c b/src/sys/vmm/paging.c index 885c709..f7bf58e 100644 --- a/src/sys/vmm/paging.c +++ b/src/sys/vmm/paging.c @@ -56,10 +56,10 @@ uint32_t *pageTable = 0x0; /* Allocate A Page Of Memory For Kernels Page Directory */ - kernelPageDirectory = (uint32_t *) vmmFindFreePage( sysID); + kernelPageDirectory = (uint32_t *) vmm_findFreePage( sysID); if (kernelPageDirectory == 0x0) { - K_PANIC("Error: vmmFindFreePage Failed"); + K_PANIC("Error: vmm_findFreePage Failed"); } /* end if */ /* Clear The Memory To Ensure There Is No Garbage */ @@ -68,8 +68,8 @@ } /* end for */ /* Allocate a page for the first 4MB of memory */ - if ((pageTable = (uint32_t *) vmmFindFreePage( sysID)) == 0x0) - K_PANIC("Error: vmmFindFreePage Failed"); + if ((pageTable = (uint32_t *) vmm_findFreePage( sysID)) == 0x0) + K_PANIC("Error: vmm_findFreePage Failed"); /* Make Sure The Page Table Is Clean */ memset(pageTable, 0x0, 0x1000); @@ -95,8 +95,8 @@ kprintf("PD: %i\n", PD_INDEX(VMM_KERN_START)); for (i = PD_INDEX(VMM_KERN_START); i < PD_ENTRIES; i++) { - if ((pageTable = (uint32_t *) vmmFindFreePage( sysID)) == 0x0) - K_PANIC("Error: vmmFindFreePage Failed"); + if ((pageTable = (uint32_t *) vmm_findFreePage( sysID)) == 0x0) + K_PANIC("Error: vmm_findFreePage Failed"); /* Make Sure The Page Table Is Clean */ memset(pageTable, 0x0, 0x1000); @@ -110,8 +110,8 @@ * The First Page Table (4MB) Maps To All Page Directories */ if (kernelPageDirectory[PD_INDEX(PT_BASE_ADDR)] == 0) { - if ((pageTable = (uint32_t *) vmmFindFreePage( sysID)) == 0x0) - K_PANIC("Error: vmmFindFreePage Failed"); + if ((pageTable = (uint32_t *) vmm_findFreePage( sysID)) == 0x0) + K_PANIC("Error: vmm_findFreePage Failed"); kernelPageDirectory[PD_INDEX(PT_BASE_ADDR)] = (uint32_t) ((uint32_t) (pageTable) | KERNEL_PAGE_DEFAULT); } @@ -129,8 +129,8 @@ */ kprintf("PPD3: %i\n", PD_INDEX(PD_BASE_ADDR)); if (kernelPageDirectory[PD_INDEX(PD_BASE_ADDR)] == 0) { - if ((pageTable = (uint32_t *) vmmFindFreePage( sysID)) == 0x0) - K_PANIC("Error: vmmFindFreePage Failed"); + if ((pageTable = (uint32_t *) vmm_findFreePage( sysID)) == 0x0) + K_PANIC("Error: vmm_findFreePage Failed"); kernelPageDirectory[PD_INDEX(PD_BASE_ADDR)] = (uint32_t) ((uint32_t) (pageTable) | KERNEL_PAGE_DEFAULT); } @@ -209,7 +209,7 @@ kprintf("Page Not Present: 0x%X, Source: 0x%X, Dest: 0x%X, dPDI: 0x%X\n", dest, source, dest, destPageDirectoryIndex); /* If Page Table Is Non Existant Then Set It Up */ /* UBU Why does the page table need to be user writable? */ - pageDir[destPageDirectoryIndex] = (uint32_t) vmmFindFreePage(_current->id) | PAGE_DEFAULT; + pageDir[destPageDirectoryIndex] = (uint32_t) vmm_findFreePage(_current->id) | PAGE_DEFAULT; /* Also Add It To Virtual Space So We Can Make Changes Later */ pageTable = (uint32_t *) (PT_BASE_ADDR + (PD_INDEX( PT_BASE_ADDR ) * 0x1000)); /* Table that maps that 4b */ @@ -305,9 +305,9 @@ } if (c != -1) { for (c = 0; c < count; c++) { - if ((vmm_remapPage((uint32_t) vmmFindFreePage(pid), ((x * (1024 * 4096)) + ((y + c) * 4096)), KERNEL_PAGE_DEFAULT)) == 0x0) + if ((vmm_remapPage((uint32_t) vmm_findFreePage(pid), ((x * (1024 * 4096)) + ((y + c) * 4096)), KERNEL_PAGE_DEFAULT)) == 0x0) K_PANIC("vmmRemapPage failed: gfkp-1\n"); - vmmClearVirtualPage((uint32_t) ((x * (1024 * 4096)) + ((y + c) * 4096))); + vmm_clearVirtualPage((uint32_t) ((x * (1024 * 4096)) + ((y + c) * 4096))); } spinUnlock(&fkpSpinLock); return ((void *) ((x * (1024 * 4096)) + (y * 4096))); @@ -316,11 +316,11 @@ else { /* Map A Physical Page To The Virtual Page */ - if ((vmm_remapPage((uint32_t) vmmFindFreePage(pid), ((x * (1024 * 4096)) + (y * 4096)), KERNEL_PAGE_DEFAULT)) == 0x0) + if ((vmm_remapPage((uint32_t) vmm_findFreePage(pid), ((x * (1024 * 4096)) + (y * 4096)), KERNEL_PAGE_DEFAULT)) == 0x0) K_PANIC("vmmRemapPage failed: gfkp-2\n"); /* Clear This Page So No Garbage Is There */ - vmmClearVirtualPage((uint32_t) ((x * (1024 * 4096)) + (y * 4096))); + vmm_clearVirtualPage((uint32_t) ((x * (1024 * 4096)) + (y * 4096))); spinUnlock(&fkpSpinLock); /* Return The Address Of The Newly Allocate Page */ @@ -337,7 +337,7 @@ /************************************************************************ - Function: void vmmClearVirtualPage(uint32_t pageAddr); + Function: void vmm_clearVirtualPage(uint32_t pageAddr); Description: This Will Null Out A Page Of Memory @@ -376,7 +376,7 @@ tI = ((baseAddr - (dI * (1024 * 4096))) / 4096); if (vmm_remapPage(child->tss.cr3, 0x5A00000, KERNEL_PAGE_DEFAULT) == 0x0) - K_PANIC("vmmFailed"); + K_PANIC("vmm_remapPage: Failed"); for (i = 0; i < 0x1000; i++) { if (vmm_remapPage(childPageDir[i], 0x5A01000 + (i * 0x1000), KERNEL_PAGE_DEFAULT) == 0x0) @@ -422,10 +422,10 @@ } - vmmUnmapPage(0x5A00000, 1); + vmm_unmapPage(0x5A00000, 1); for (i = 0; i < 0x1000; i++) { - vmmUnmapPage((0x5A01000 + (i * 0x1000)), 1); + vmm_unmapPage((0x5A01000 + (i * 0x1000)), 1); } return ((void *) ((x * (1024 * 4096)) + (y * 4096) + offset)); @@ -442,10 +442,10 @@ K_PANIC("remap Failed"); //Return The Address Of The Mapped In Memory - vmmUnmapPage(0x5A00000, 1); + vmm_unmapPage(0x5A00000, 1); for (i = 0; i < 0x1000; i++) { - vmmUnmapPage((0x5A01000 + (i * 0x1000)), 1); + vmm_unmapPage((0x5A01000 + (i * 0x1000)), 1); } return ((void *) ((x * (1024 * 4096)) + (y * 4096) + offset)); @@ -485,10 +485,10 @@ } if (c != -1) { for (c = 0; c < count; c++) { - if (vmm_remapPage((uint32_t) vmmFindFreePage( sysID), ((x * 0x400000) + ((y + c) * 0x1000)), KERNEL_PAGE_DEFAULT) == 0x0) + if (vmm_remapPage((uint32_t) vmm_findFreePage( sysID), ((x * 0x400000) + ((y + c) * 0x1000)), KERNEL_PAGE_DEFAULT) == 0x0) K_PANIC("remap Failed"); - vmmClearVirtualPage((uint32_t) ((x * 0x400000) + ((y + c) * 0x1000))); + vmm_clearVirtualPage((uint32_t) ((x * 0x400000) + ((y + c) * 0x1000))); } spinUnlock(&fkpSpinLock); return ((void *) ((x * 0x400000) + (y * 0x1000))); @@ -496,11 +496,11 @@ } else { /* Map A Physical Page To The Virtual Page */ - if (vmm_remapPage((uint32_t) vmmFindFreePage( sysID), ((x * 0x400000) + (y * 0x1000)), KERNEL_PAGE_DEFAULT) == 0x0) + if (vmm_remapPage((uint32_t) vmm_findFreePage( sysID), ((x * 0x400000) + (y * 0x1000)), KERNEL_PAGE_DEFAULT) == 0x0) K_PANIC("Failed"); /* Clear This Page So No Garbage Is There */ - vmmClearVirtualPage((uint32_t) ((x * 0x400000) + (y * 0x1000))); + vmm_clearVirtualPage((uint32_t) ((x * 0x400000) + (y * 0x1000))); /* Return The Address Of The Newly Allocate Page */ spinUnlock(&fkpSpinLock); return ((void *) ((x * 0x400000) + (y * 0x1000))); @@ -589,7 +589,7 @@ if (new > old) { for (i = old; i < new; i += 0x1000) { - if (vmm_remapPage(vmmFindFreePage(_current->id), i, PAGE_DEFAULT) == 0x0) + if (vmm_remapPage(vmm_findFreePage(_current->id), i, PAGE_DEFAULT) == 0x0) K_PANIC("remap Failed"); } td->vm_dsize += btoc(new - old); diff --git a/src/sys/vmm/unmappage.c b/src/sys/vmm/unmappage.c index 7624d38..4282e1e 100644 --- a/src/sys/vmm/unmappage.c +++ b/src/sys/vmm/unmappage.c @@ -31,7 +31,7 @@ /************************************************************************ - Function: void vmmUnmapPage(uInt32 pageAddr,int flags); + Function: void vmm_unmapPage(uInt32 pageAddr,int flags); Description: This Function Will Unmap A Page From The Kernel VM Space The Flags Variable Decides If Its To Free The Page Or Not A Flag Of 0 Will Free It And A Flag Of 1 Will Keep It @@ -79,7 +79,7 @@ /************************************************************************ - Function: void vmmUnmapPages(uInt32 pageAddr,int flags); + Function: void vmm_unmapPages(uInt32 pageAddr,int flags); Description: This Function Will Unmap A Page From The Kernel VM Space The Flags Variable Decides If Its To Free The Page Or Not A Flag Of 0 Will Free It And A Flag Of 1 Will Keep It diff --git a/src/sys/vmm/vmm_init.c b/src/sys/vmm/vmm_init.c index 03b21f6..24ea4ae 100644 --- a/src/sys/vmm/vmm_init.c +++ b/src/sys/vmm/vmm_init.c @@ -39,8 +39,8 @@ */ int vmm_init() { - if (vmmMemMapInit() != 0x0) - K_PANIC("Couldn't Initialize vmmMemMap"); + if (vmm_memMapInit() != 0x0) + K_PANIC("Couldn't Initialize vmm_memMap"); if (vmm_pagingInit() != 0x0) K_PANIC("Couldn't Initialize paging system"); diff --git a/src/sys/vmm/vmm_memory.c b/src/sys/vmm/vmm_memory.c index cb5366c..a88781d 100644 --- a/src/sys/vmm/vmm_memory.c +++ b/src/sys/vmm/vmm_memory.c @@ -48,7 +48,7 @@ /************************************************************************ - Function: void vmmMemMapInit(); + Function: void vmm_memMapInit(); Description: This Function Initializes The Memory Map For the System Notes: @@ -212,7 +212,7 @@ /************************************************************************ - Function: uInt32 vmmFindFreePage(pid_t pid); + Function: uInt32 vmm_findFreePage(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 @@ -425,7 +425,7 @@ vmm_pageFault: deadlock resolved thanks to a propper solution suggested by geist Revision 1.7 2004/07/19 02:04:32 reddawg - memory.c: added spinlocks to vmmFindFreePage and vmmFreePage to prevent two tasks from possibly allocating the same page + memory.c: added spinlocks to vmm_findFreePage and vmmFreePage to prevent two tasks from possibly allocating the same page Revision 1.6 2004/06/14 12:20:54 reddawg notes: many bugs repaired and ld works 100% now.