diff --git a/src/bin/login/main.c b/src/bin/login/main.c index b3964f1..68891f0 100644 --- a/src/bin/login/main.c +++ b/src/bin/login/main.c @@ -98,12 +98,13 @@ } /* we need to move this into the libc for getpwent(), etc */ - +/* foo = auth("root", "user"); if(foo != -1) printf("yay\n"); else printf("damn\n"); +*/ login: printf("\nUbixOS/IA-32 (devel.ubixos.com) (console)"); diff --git a/src/lib/libc_old/stdio/fopen.c b/src/lib/libc_old/stdio/fopen.c index 1e34488..a1bab44 100644 --- a/src/lib/libc_old/stdio/fopen.c +++ b/src/lib/libc_old/stdio/fopen.c @@ -32,7 +32,7 @@ FILE *fopen(const char *file,const char *mode) { FILE *fp = malloc(sizeof(FILE)); - printf("PICA"); + //printf("PICA"); fp->fd = 0x0; asm volatile( "int %0\n" @@ -43,6 +43,9 @@ /*** $Log$ + Revision 1.3 2005/10/21 20:07:07 reddawg + Work has resumed + Revision 1.2 2005/10/12 00:13:36 reddawg Removed diff --git a/src/sys/lib/kmalloc.c b/src/sys/lib/kmalloc.c index d563fc8..139dd3c 100644 --- a/src/sys/lib/kmalloc.c +++ b/src/sys/lib/kmalloc.c @@ -299,9 +299,7 @@ return(tmpDesc1->baseAddr); } } - kprintf("No Avail Block!\n"); tmpDesc1 = getEmptyDesc(); - kprintf("C"); //kprintf("no empty desc\n"); if (tmpDesc1 != 0x0) { pages = ((len + 4095)/4096); @@ -395,6 +393,9 @@ /*** $Log$ + Revision 1.3 2006/06/01 03:58:33 reddawg + wondering about this stuff here + Revision 1.2 2005/10/12 00:13:37 reddawg Removed diff --git a/src/sys/vfs/file.c b/src/sys/vfs/file.c index a11648e..1036aef 100644 --- a/src/sys/vfs/file.c +++ b/src/sys/vfs/file.c @@ -122,7 +122,6 @@ void sysFopen(const char *file,char *flags,userFileDescriptor *userFd) { if (userFd == NULL) kprintf("Error: userFd == NULL, File: %s, Line: %i\n",__FILE__,__LINE__); - kprintf("W"); userFd->fd = fopen(file,flags); if (userFd->fd != 0x0) { userFd->fdSize = userFd->fd->size; @@ -144,9 +143,7 @@ return; if (userFd->fd == NULL) return; - kprintf("X"); fread(data,size,1,userFd->fd); - kprintf("Y"); return; } diff --git a/src/sys/vmm/memory.c b/src/sys/vmm/memory.c index b8098be..4a33ad0 100644 --- a/src/sys/vmm/memory.c +++ b/src/sys/vmm/memory.c @@ -185,14 +185,10 @@ ************************************************************************/ uInt32 vmmFindFreePage(pidType pid) { int i = 0x0; - int x = 0x0; - long *page = 0x2000; /* Lets Look For A Free Page */ - if (pid < sysID) { - kprintf("Error: invalid PID %i\n",pid); - //kpanic("Error: invalid PID %i\n",pid); - } + if (pid < sysID) + kpanic("Error: invalid PID %i\n",pid); spinLock(&vmmSpinLock); @@ -204,24 +200,11 @@ */ if ((vmmMemoryMap[i].status == memAvail) && (vmmMemoryMap[i].cowCounter == 0)) { vmmMemoryMap[i].status = memNotavail; - kprintf("Pid: [%i]\n",vmmMemoryMap[i].pid); vmmMemoryMap[i].pid = pid; freePages--; if (systemVitals) systemVitals->freePages = freePages; - //page = vmmMemoryMap[i].pageAddr; - kprintf("i: [%i]",i); - if (i > 642) { - kprintf("Remap time?\n"); - vmm_remapPage(vmmMemoryMap[i].pageAddr,0x2000,KERNEL_PAGE_DEFAULT); - kprintf("BOS!: [0x%X]\n",vmmMemoryMap[i].pageAddr); - for (x = 0; x < 1024;x++) { - page[x] = 0xb0; - } - vmmUnmapPage(0x2000,1); - kprintf("BOE!\n"); - } spinUnlock(&vmmSpinLock); return (vmmMemoryMap[i].pageAddr); } @@ -350,6 +333,9 @@ /*** $Log$ + Revision 1.4 2006/06/01 04:15:32 reddawg + Woot + Revision 1.3 2006/06/01 03:58:33 reddawg wondering about this stuff here diff --git a/src/sys/vmm/paging.c b/src/sys/vmm/paging.c index bf916bb..aab7418 100644 --- a/src/sys/vmm/paging.c +++ b/src/sys/vmm/paging.c @@ -42,7 +42,6 @@ static spinLock_t fkpSpinLock = SPIN_LOCK_INITIALIZER; static spinLock_t rmpSpinLock = SPIN_LOCK_INITIALIZER; -static spinLock_t mlSpinLock = SPIN_LOCK_INITIALIZER; /***************************************************************************************** @@ -165,7 +164,6 @@ short i = 0x0; spinLock(&rmpSpinLock); - //kprintf("S: [0x%X],D: 0x%X",source,dest); if (perms == 0x0) perms = KERNEL_PAGE_DEFAULT; @@ -212,7 +210,6 @@ } /* Set The Source Address In The Destination */ pageTable[destPageTableIndex] = (uInt32) (source | perms); - //kprintf("[0x%X]",pageTable[destPageTableIndex]); /* Reload The Page Table; */ asm volatile( "push %eax \n" @@ -263,7 +260,6 @@ kpanic("vmmRemapPage failed: gfkp-1\n"); vmmClearVirtualPage((uInt32) ((x * (1024 * 4096)) + ((y + c) * 4096))); } - kprintf("Count: %i\n",count); spinUnlock(&fkpSpinLock); return ((void *)((x * (1024 * 4096)) + (y * 4096))); } @@ -383,16 +379,14 @@ int c = 0x0; uInt32 *pageTableSrc = 0x0; - spinLock(&mlSpinLock); + spinLock(&fkpSpinLock); /* Lets Search For A Free Page */ for (x = 960; x < 1024; x++) { /* Set Page Table Address */ pageTableSrc = (uInt32 *) (tablesBaseAddress + (0x1000 * x)); for (y = 0; y < 1024; y++) { - kprintf("Y: %i\n",y); /* Loop Through The Page Table Find An UnAllocated Page */ if ((uInt32) pageTableSrc[y] == (uInt32) 0x0) { - kprintf("IF %i", count); if (count > 1) { for (c = 0; c < count; c++) { if (y + c < 1024) { @@ -402,40 +396,37 @@ } } } - kprintf("Find one? %i\n", c); if (c != -1) { for (c = 0; c < count; c++) { - kprintf("d.d"); vmm_remapPage((uInt32) vmmFindFreePage(sysID), ((x * 0x400000) + ((y + c) * 0x1000)),KERNEL_PAGE_DEFAULT); - kprintf("d"); vmmClearVirtualPage((uInt32) ((x * 0x400000) + ((y + c) * 0x1000))); - kprintf("e"); } - kprintf("HMM?\n"); - spinUnlock(&mlSpinLock); + spinUnlock(&fkpSpinLock); return ((void *)((x * 0x400000) + (y * 0x1000))); } } else { - kprintf("else!"); /* Map A Physical Page To The Virtual Page */ vmm_remapPage((uInt32) vmmFindFreePage(sysID), ((x * 0x400000) + (y * 0x1000)),KERNEL_PAGE_DEFAULT); /* Clear This Page So No Garbage Is There */ vmmClearVirtualPage((uInt32) ((x * 0x400000) + (y * 0x1000))); /* Return The Address Of The Newly Allocate Page */ - spinUnlock(&mlSpinLock); + spinUnlock(&fkpSpinLock); return ((void *)((x * 0x400000) + (y * 0x1000))); } } } } /* If No Free Page Was Found Return NULL */ - spinUnlock(&mlSpinLock); + spinUnlock(&fkpSpinLock); return (0x0); } /*** $Log$ + Revision 1.3 2006/06/01 03:58:33 reddawg + wondering about this stuff here + Revision 1.2 2005/10/12 00:13:38 reddawg Removed