diff --git a/src/lib/libc_old/sys/Makefile b/src/lib/libc_old/sys/Makefile index 27622ec..5085613 100644 --- a/src/lib/libc_old/sys/Makefile +++ b/src/lib/libc_old/sys/Makefile @@ -6,7 +6,7 @@ include ../../Makefile.inc #Objects -OBJS = mpi.o startsde.o mmap.o error.o getuptime.o gettime.o getdrives.o setuid.o setgid.o getuid.o getgid.o exec.o getpid.o fork.o pidstatus.o getpage.o sched.o auth.o +OBJS = mpi.o startsde.o mmap.o error.o getuptime.o gettime.o getdrives.o setuid.o setgid.o getuid.o getgid.o exec.o getpid.o fork.o pidstatus.o getpage.o sched.o auth.o addmodule.o #Output OUTPUT = sys.so diff --git a/src/sbin/Makefile b/src/sbin/Makefile index f1a82ae..eda9de8 100755 --- a/src/sbin/Makefile +++ b/src/sbin/Makefile @@ -1,4 +1,7 @@ -all: fdisk-bin format-bin disklabel-bin ttyd-bin ubistry-bin +all: fdisk-bin format-bin disklabel-bin ttyd-bin ubistry-bin modprobe-bin + +modprobe-bin: modprobe + (cd modprobe;make) fdisk-bin: fdisk (cd fdisk;make) format-bin: format diff --git a/src/sys/Makefile b/src/sys/Makefile index 2aafaf7..ee1e0cd 100644 --- a/src/sys/Makefile +++ b/src/sys/Makefile @@ -1,7 +1,7 @@ # $Id$ # Kernel Makefile (C) 2002 The UbixOS Project -all: net-code sde-code pci-code ufs-code ubixfs-code vfs-code isa-code kernel-code lib-code vmm-code sys-code boot-code init-code devfs-code mpi-code kmods-code kernel-img generic-code +all: net-code sde-code pci-code ufs-code ubixfs-code vfs-code isa-code kernel-code lib-code vmm-code sys-code boot-code init-code devfs-code mpi-code kernel-img generic-code generic-code: generic (cd generic;make) @@ -57,9 +57,6 @@ ufs-code: ufs (cd ufs;make) -kmods-code: kmods - (cd kmods;make) - kernel-img: compile (/bin/echo "/* " > ./compile/null.c) (date >> ./compile/null.c) diff --git a/src/sys/compile/Makefile b/src/sys/compile/Makefile index 4e6ee65..b1b766a 100644 --- a/src/sys/compile/Makefile +++ b/src/sys/compile/Makefile @@ -9,7 +9,7 @@ OBJS = null.o #Kernel Parts -KPARTS = ../init/*.o ../sys/*.o ../vmm/*.o ../lib/*.o ../kernel/*.o ../isa/*.o ../vfs/*.o ../ubixfs/*.o ../pci/*.o ../sde/*.o ../devfs/*.o ../mpi/*.o ../ufs/*.o +KPARTS = ../init/*.o ../sys/*.o ../vmm/*.o ../lib/*.o ../kernel/*.o ../isa/*.o ../vfs/*.o ../ubixfs/*.o ../pci/*.o ../sde/*.o ../devfs/*.o ../mpi/*.o ../ufs/*.o ../generic/*.o #../graphics/*.o ../ld/*.o -Ttext 0x30000 -Tdata 0x34000 # Link the kernel statically with fixed text+data address @1M diff --git a/src/sys/generic/lists.c b/src/sys/generic/lists.c index a8d4232..2651ba7 100644 --- a/src/sys/generic/lists.c +++ b/src/sys/generic/lists.c @@ -36,6 +36,7 @@ { if(TList->First == NULL) { + kprintf("We're at the front!\n"); TList->First = kItem; TList->Last = kItem; kItem->Previous = NULL; @@ -44,13 +45,11 @@ else { Item_t * FirstItem; - + kprintf("Pushing the others over!\n"); FirstItem = TList->First; kItem->Next = FirstItem; TList->First = kItem; FirstItem->Previous = kItem; - - } return STATUS_SUCCESS; } @@ -178,12 +177,6 @@ /* e = CreateItem(); - SetItemPriority(a, 1); - SetItemPriority(b, 2); - SetItemPriority(c, 3); - SetItemPriority(d, 4); - SetItemPriority(e, 5); - InsertItemAtFront(High, a); InsertItemAtFront(High, b); InsertItemAtFront(High, c); diff --git a/src/sys/include/ubixos/kmod.h b/src/sys/include/ubixos/kmod.h index 795b1a0..26a5aab 100644 --- a/src/sys/include/ubixos/kmod.h +++ b/src/sys/include/ubixos/kmod.h @@ -35,22 +35,25 @@ #define LD_START 0x1000000 typedef struct kmod_struct { - struct kmod_struct *next; - struct kmod_struct *prev; uInt16 id; uInt16 refs; uInt32 address; - char name[128]; + char *name; + char *file; } kmod_t; uInt32 kmod_load(const char *); -uInt32 kmod_add(const char *, const char *name); +uInt32 kmod_add(char *file, char *name); #endif /*** $Log$ + Revision 1.5 2005/08/04 20:35:19 fsdfs + + various updates. mostly kprints, tabbing code to look cleaner + Revision 1.4 2004/09/26 20:46:13 reddawg ok time for bed added kmod_add keeps modules listed now diff --git a/src/sys/kernel/Makefile b/src/sys/kernel/Makefile index 77e4a67..7f8fac7 100644 --- a/src/sys/kernel/Makefile +++ b/src/sys/kernel/Makefile @@ -6,7 +6,7 @@ include ../Makefile.inc # Objects -OBJS = schedyield.o tty.o sys_call.o endtask.o spinlock.o bioscall.o ld.o time.o fork.o syscall.o elf.o systemtask.o exec.o sched.o kpanic.o vitals.o ubthread.o timer.o +OBJS = schedyield.o tty.o sys_call.o endtask.o spinlock.o bioscall.o ld.o time.o fork.o syscall.o elf.o systemtask.o exec.o sched.o kpanic.o vitals.o ubthread.o timer.o kmod.o # ap-boot.o smp.o all: $(OBJS) diff --git a/src/sys/kernel/endtask.c b/src/sys/kernel/endtask.c index c287e47..64b577e 100644 --- a/src/sys/kernel/endtask.c +++ b/src/sys/kernel/endtask.c @@ -43,26 +43,17 @@ Notes: ************************************************************************/ -void endTask(pidType pid) { - kTask_t *tmpTask = 0x0; +void endTask(pidType pid) +{ + kTask_t *tmpTask = 0x0; + sched_setStatus(pid, DEAD); - /* Don't mess with scheduler structures from outside the scheduler! */ - /* Just set status to dead, and let the scheduler clean up itself */ - sched_setStatus(pid,DEAD); - //tmpTask = schedFindTask(pid); - //if (sched_deleteTask(pid) != 0x0) - // kpanic("sched_deleteTask: Failed\n"); - //kprintf("Ending Task: (%i:0x%X)\n",tmpTask->id,tmpTask); - //sched_addDelTask(tmpTask); - //tmpTask->state = DEAD; + if (pid == _current->id) + while(1) + sched_yield(); + sched_yield(); - //tmpTask->term->owner = tmpTask->parentPid; - - if (pid == _current->id) - while(1) sched_yield(); - sched_yield(); - - return; + return; } /*** diff --git a/src/sys/kernel/fork-new.c b/src/sys/kernel/fork-new.c new file mode 100755 index 0000000..0872811 --- /dev/null +++ b/src/sys/kernel/fork-new.c @@ -0,0 +1,137 @@ +/***************************************************************************************** + Copyright (c) 2002-2004 The UbixOS Project + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, are + permitted provided that the following conditions are met: + + Redistributions of source code must retain the above copyright notice, this list of + conditions, the following disclaimer and the list of authors. Redistributions in binary + form must reproduce the above copyright notice, this list of conditions, the following + disclaimer and the list of authors in the documentation and/or other materials provided + with the distribution. Neither the name of the UbixOS Project nor the names of its + contributors may be used to endorse or promote products derived from this software + without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY + EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL + THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR + TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + $Id$ + +*****************************************************************************************/ + +#include +#include +#include +#include +#include +#include +#include +#include + +/***************************************************************************************** + Functoin: static int fork_copyProcess(kTask_t *newProcess, kTask_t *parent) + + Desc: This function will copy a process + + Notes: + +*****************************************************************************************/ +//static int fork_copyProcess(struct taskStruct *newProcess,long ebp,long edi,long esi,long none,long ebx,long ecx,long edx,long eip,long cs,long eflags,long esp,long ss) { + +static int fork_copyProcess(struct taskStruct *newProcess, struct taskStruct *parent) +{ + volatile struct taskStruct * tmpProcPtr = newProcess; + +#ifdef DEBUG + assert(newProcess); + assert(_current); +#endif + + /* Set Up New Tasks Information */ + memcpy(newProcess->oInfo.cwd,_current->oInfo.cwd,1024); + + newProcess->tss.eip = parent->tss.eip; + newProcess->oInfo.vmStart = _current->oInfo.vmStart; + newProcess->term = _current->term; + newProcess->term->owner = newProcess->id; + newProcess->uid = _current->uid; + newProcess->gid = _current->gid; + newProcess->tss.back_link = 0x0; + newProcess->tss.esp0 = _current->tss.esp0; + newProcess->tss.ss0 = 0x10; + newProcess->tss.esp1 = 0x0; + newProcess->tss.ss1 = 0x0; + newProcess->tss.esp2 = 0x0; + newProcess->tss.ss2 = 0x0; + newProcess->tss.eflags = parent->tss.eflags; + newProcess->tss.eax = 0x0; + newProcess->tss.ebx = parent->tss.ebx; + newProcess->tss.ecx = parent->tss.ecx; + newProcess->tss.edx = parent->tss.edx; + newProcess->tss.esi = parent->tss.esi; + newProcess->tss.edi = parent->tss.edi; + newProcess->tss.ebp = parent->tss.ebp; + newProcess->tss.esp = parent->tss.esp; + newProcess->tss.cs = parent->tss.cs & 0xFF; + newProcess->tss.ss = parent->tss.ss & 0xFF; + newProcess->tss.ds = _current->tss.ds & 0xFF; + newProcess->tss.fs = _current->tss.fs & 0xFF; + newProcess->tss.gs = _current->tss.gs & 0xFF; + newProcess->tss.es = _current->tss.es & 0xFF; + newProcess->tss.ldt = 0x18; + newProcess->tss.trace_bitmap = 0x0000; + newProcess->tss.io_map = 0x8000; + /* Create A Copy Of The VM Space For New Task */ + newProcess->tss.cr3 = (uInt32)vmmCopyVirtualSpace(newProcess->id); + newProcess->state = FORK; + + /* Fix gcc optimization problems */ + while (tmpProcPtr->state == FORK) + sched_yield(); + + /* Return Id of Proccess */ + return(newProcess->id); +} + +/***************************************************************************************** + Functoin: void sysFork(); + + Desc: This function will fork a new task + + Notes: + + 08/01/02 - This Seems To Be Working Fine However I'm Not Sure If I + Chose The Best Path To Impliment It I Guess We Will See + What The Future May Bring + +*****************************************************************************************/ +asm( + ".globl sysFork \n" + "sysFork: \n" + " xor %eax,%eax \n" + " call schedNewTask \n" + " testl %eax,%eax \n" + " je fork_ret \n" + " pushl %esi \n" + " pushl %edi \n" + " pushl %ebp \n" + " pushl %eax \n" + " call fork_copyProcess \n" + " movl %eax,(%ebx) \n" + " addl $16,%esp \n" + "fork_ret: \n" + " ret \n" + ); + +/*** + END + ***/ + diff --git a/src/sys/kernel/sched.c b/src/sys/kernel/sched.c index dff3f11..fe5c1fb 100644 --- a/src/sys/kernel/sched.c +++ b/src/sys/kernel/sched.c @@ -65,33 +65,30 @@ ************************************************************************/ -int sched_init() { - taskList = (kTask_t *)kmalloc(sizeof(kTask_t)); - if(taskList == 0x0) - kpanic("Unable to create task list"); +int sched_init() +{ + taskList = (kTask_t *)kmalloc(sizeof(kTask_t)); + if(taskList == 0x0) + kpanic("Unable to create task list"); - taskList->id = nextID++; + taskList->id = nextID++; - /* Print out information on scheduler */ - kprintf("sched0 - Address: [0x%X]\n", taskList); + /* Print out information on scheduler */ + kprintf("sched0 - Address: [0x%X]\n", taskList); - /* Return so we know everything went well */ - return(0x0); - } + /* Return so we know everything went well */ + return(0x0); +} -void sched(){ +void sched() +{ uInt32 memAddr = 0x0; kTask_t *tmpTask = 0x0; kTask_t *delTask = 0x0; - //if (!spinTryLock(&schedulerSpinLock)) - // return; - spinLock(&schedulerSpinLock); - - + spinLock(&schedulerSpinLock); tmpTask = _current->next; - schedStart: /* Yield the next task from the current prio queue */ @@ -107,18 +104,16 @@ delTask = tmpTask; tmpTask = tmpTask->next; - if (delTask->prev != 0x0) - delTask->prev->next = delTask->next; - if (tmpTask->next != 0x0) - delTask->next->prev = delTask->prev; - if (taskList == delTask) - taskList = delTask->next; - - + if (delTask->prev != 0x0) + delTask->prev->next = delTask->next; + if (tmpTask->next != 0x0) + delTask->next->prev = delTask->prev; + if (taskList == delTask) + taskList = delTask->next; vmmFreeProcessPages(delTask->id); if (delTask->imageFd != 0x0) fclose(delTask->imageFd); - kfree(delTask); + kfree(delTask); goto schedStart; } diff --git a/src/sys/kernel/spinlock.c b/src/sys/kernel/spinlock.c index 9d9e283..f17e5a2 100644 --- a/src/sys/kernel/spinlock.c +++ b/src/sys/kernel/spinlock.c @@ -40,11 +40,18 @@ *lock = 0x2; } +void spinLock(spinLock_t *lock) +{ + while (*lock != 0) + sched(); +} + void spinUnlock(spinLock_t *lock) { *lock = 0x0; } +/* int spinTryLock(spinLock_t *lock) { register int locked; @@ -53,26 +60,19 @@ ); return(!locked); } +*/ -void spinLock(spinLock_t *lock) -{ -// while (!spinTryLock(lock)) -// { - while (*lock != 0) - sched_yield(); -// } -} void spinLock_scheduler(spinLock_t *lock) { - //while (!spinTryLock(lock)) while (*lock != 0); } -int spinLockLocked(spinLock_t *lock) { - return(*lock != 0); - } +int spinLockLocked(spinLock_t *lock) +{ + return(*lock != 0); +} /*** diff --git a/src/sys/kernel/syscall.c b/src/sys/kernel/syscall.c index ce97b0c..a0f0933 100644 --- a/src/sys/kernel/syscall.c +++ b/src/sys/kernel/syscall.c @@ -33,8 +33,10 @@ #include #include #include +#include #include #include +#include #include #include #include @@ -93,6 +95,19 @@ char *shell; }; +void sysAddModule(const char *file, const char *name) +{ + kmod_add(file, name); + return; +} + +void sysRmModule() +{ + return; + +} + + void sysAuth(UbixUser *uu) { kprintf("authenticating user %s\n", uu->username); @@ -112,16 +127,6 @@ return; } -void sysAddModule() -{ - return; -} - -void sysRmModule() -{ - return; -} - void sysGetpid(int *pid) { if (pid) diff --git a/src/sys/sys/device.c b/src/sys/sys/device.c index 62feb05..af4ac8c 100644 --- a/src/sys/sys/device.c +++ b/src/sys/sys/device.c @@ -86,7 +86,7 @@ struct device_node *tmpDev = 0x0; spinLock(&deviceSpinLock); -spinLock_scheduler(&deviceSpinLock); + spinLock_scheduler(&deviceSpinLock); for (tmpDev = devices;tmpDev;tmpDev=tmpDev->next) { if ((tmpDev->devInfo->major == major) && (tmpDev->minor == minor)) { diff --git a/src/sys/vmm/getphysicaladdr.c b/src/sys/vmm/getphysicaladdr.c index f7759e2..6eac246 100644 --- a/src/sys/vmm/getphysicaladdr.c +++ b/src/sys/vmm/getphysicaladdr.c @@ -36,7 +36,8 @@ ************************************************************************/ uInt32 vmm_getPhysicalAddr(uInt32 pageAddr) { - int pageDirectoryIndex = 0x0, pageTableIndex = 0x0; + uInt32 pageDirectoryIndex = 0x0; + uInt32 pageTableIndex = 0x0; uInt32 *pageTable = 0x0; //Calculate The Page Directory Index @@ -53,6 +54,12 @@ /*** $Log$ + Revision 1.4 2004/07/28 15:05:43 reddawg + Major: + Pages now have strict security enforcement. + Many null dereferences have been resolved. + When apps loaded permissions set for pages rw and ro + Revision 1.3 2004/07/26 19:15:49 reddawg test code, fixes and the like diff --git a/src/sys/vmm/pagefault.c b/src/sys/vmm/pagefault.c index 092e8d0..a3e74af 100644 --- a/src/sys/vmm/pagefault.c +++ b/src/sys/vmm/pagefault.c @@ -50,83 +50,98 @@ cpu is a waste of resources but for now it prevents errors. *****************************************************************************************/ -void vmm_pageFault(uInt32 memAddr,uInt32 eip,uInt32 esp) { - uInt32 i = 0x0, pageTableIndex = 0x0,pageDirectoryIndex = 0x0; - uInt32 *pageDir = 0x0,*pageTable = 0x0; - uInt32 *src = 0x0,*dst = 0x0; +void vmm_pageFault(uInt32 memAddr,uInt32 eip,uInt32 esp) +{ + uInt32 i = 0x0; + uInt32 pageTableIndex = 0x0; + uInt32 pageDirectoryIndex = 0x0; + uInt32 *pageDir = 0x0; + uInt32 *pageTable = 0x0; + uInt32 *src = 0x0; + uInt32 *dst = 0x0; - /* Try to aquire lock otherwise spin till we do */ - spinLock(&pageFaultSpinLock); + /* Try to aquire lock otherwise spin till we do */ + spinLock(&pageFaultSpinLock); - /* Set page dir pointer to the address of the visable page directory */ - pageDir = (uInt32 *)parentPageDirAddr; + /* Set page dir pointer to the address of the visable page directory */ + pageDir = (uInt32 *)parentPageDirAddr; - /* UBU - This is a temp panic for 0x0 read write later on I will handle this differently */ - if (memAddr == 0x0) { - kprintf("Segfault At Address: [0x%X][0x%X][%i][0x%X]\n",memAddr,esp,_current->id,eip); - kpanic("Error We Wrote To 0x0\n"); - } + /* UBU - This is a temp panic for 0x0 read write later on I will handle this differently */ + if (memAddr == 0x0) + { + kprintf("Segfault At Address: [0x%X][0x%X][%i][0x%X]\n",memAddr,esp,_current->id,eip); + kpanic("Error We Wrote To 0x0\n"); + } - /* Calculate The Page Directory Index */ - pageDirectoryIndex = (memAddr >> 22); + /* Calculate The Page Directory Index */ + pageDirectoryIndex = (memAddr >> 22); - /* Calculate The Page Table Index */ - pageTableIndex = ((memAddr >> 12) & 0x3FF); + /* Calculate The Page Table Index */ + pageTableIndex = ((memAddr >> 12) & 0x3FF); - /* UBU - This is a temporary routine for handling access to a page of a non existant page table */ - if (pageDir[pageDirectoryIndex] == 0x0) { - kprintf("Segfault At Address: [0x%X][0x%X][%i][0x%X], Not A Valid Page Table\n",memAddr,esp,_current->id,eip); - spinUnlock(&pageFaultSpinLock); - endTask(_current->id); - } - else { - /* Set pageTable To Point To Virtual Address Of Page Table */ - pageTable = (uInt32 *)(tablesBaseAddress + (0x1000 * pageDirectoryIndex)); + /* UBU - This is a temporary routine for handling access to a page of a non existant page table */ + if (pageDir[pageDirectoryIndex] == 0x0) + { + spinUnlock(&pageFaultSpinLock); + kprintf("Segfault At Address: [0x%X][0x%X][%i][0x%X], Not A Valid Page Table\n",memAddr,esp,_current->id,eip); + endTask(_current->id); + } + else + { + /* Set pageTable To Point To Virtual Address Of Page Table */ + pageTable = (uInt32 *)(tablesBaseAddress + (0x1000 * pageDirectoryIndex)); - /* Test if this is a COW on page */ - if (((uInt32)pageTable[pageTableIndex] & pageCow) == pageCow) { - /* Set Src To Base Address Of Page To Copy */ - src = (uInt32 *)(memAddr & 0xFFFFF000); - /* Allocate A Free Page For Destination */ - dst = (uInt32 *) vmmGetFreeVirtualPage(_current->id,1); - /* Copy Memory */ - for (i=0;iid,eip); - spinUnlock(&pageFaultSpinLock); - endTask(_current->id); - } - else { - spinUnlock(&pageFaultSpinLock); - /* Need To Create A Routine For Attempting To Access Non Mapped Memory */ - kprintf("Segfault At Address: [0x%X][0x%X][%i][0x%X] Non Mapped\n",memAddr,esp,_current->id,eip); - spinUnlock(&pageFaultSpinLock); - endTask(_current->id); - } - } - asm volatile( - "movl %cr3,%eax\n" - "movl %eax,%cr3\n" - ); + /* Test if this is a COW on page */ + if (((uInt32)pageTable[pageTableIndex] & pageCow) == pageCow) + { + /* Set Src To Base Address Of Page To Copy */ + src = (uInt32 *)(memAddr & 0xFFFFF000); + /* Allocate A Free Page For Destination */ + dst = (uInt32 *) vmmGetFreeVirtualPage(_current->id,1); + /* Copy Memory */ + for (i=0;iid,eip); + spinUnlock(&pageFaultSpinLock); + endTask(_current->id); + } + else + { + /* Need To Create A Routine For Attempting To Access Non Mapped Memory */ + kprintf("Segfault At Address: [0x%X][0x%X][%i][0x%X] Non Mapped\n",memAddr,esp,_current->id,eip); + spinUnlock(&pageFaultSpinLock); + endTask(_current->id); + } + } + asm volatile( + "movl %cr3,%eax\n" + "movl %eax,%cr3\n" + ); - /* Release the spin lock */ - spinUnlock(&pageFaultSpinLock); - return; - } + /* Release the spin lock */ + spinUnlock(&pageFaultSpinLock); + return; +} /*** $Log$ + Revision 1.14 2004/08/25 22:02:41 reddawg + task switching - We now are using software switching to be consistant with the rest of the world because all of this open source freaks gave me a hard time about something I liked. There doesn't seem to be any gain in performance but it is working fine and flawlessly + Revision 1.13 2004/08/24 05:24:37 reddawg TCA Is A BONER!!!! diff --git a/src/sys/vmm/setpageattributes.c b/src/sys/vmm/setpageattributes.c index 17c29d8..018800d 100644 --- a/src/sys/vmm/setpageattributes.c +++ b/src/sys/vmm/setpageattributes.c @@ -35,8 +35,11 @@ Function: void vmmSetPageAttributes(uInt32 pageAddr,int attributes; Description: This Function Will Set The Page Attributes Such As A Read Only Page, Stack Page, COW Page, ETC. -Notes: + READ + WRITE + EXECUTE +Notes: ************************************************************************/ int vmm_setPageAttributes(uInt32 memAddr,uInt16 attributes) { uInt16 directoryIndex = 0x0, tableIndex = 0x0; @@ -69,6 +72,12 @@ /*** $Log$ + Revision 1.4 2004/07/28 15:05:43 reddawg + Major: + Pages now have strict security enforcement. + Many null dereferences have been resolved. + When apps loaded permissions set for pages rw and ro + Revision 1.3 2004/07/20 22:29:55 reddawg assert: remade assert diff --git a/src/sys/vmm/vmminit.c b/src/sys/vmm/vmminit.c index 68fc9f0..af0eb1a 100644 --- a/src/sys/vmm/vmminit.c +++ b/src/sys/vmm/vmminit.c @@ -37,18 +37,23 @@ Notes: *****************************************************************************************/ -int vmm_init() { - if (vmmMemMapInit() != 0x0) { - return (0x1); - } - if (vmm_pagingInit() != 0x0) { - return (0x1); - } - return (0x0); - } +int vmm_init() +{ + if (vmmMemMapInit() != 0x0) + return (0x1); + if (vmm_pagingInit() != 0x0) + return (0x1); + return (0x0); +} /*** $Log$ + Revision 1.4 2004/07/28 15:05:43 reddawg + Major: + Pages now have strict security enforcement. + Many null dereferences have been resolved. + When apps loaded permissions set for pages rw and ro + Revision 1.3 2004/07/09 12:18:19 reddawg Updating Initialization Procedures diff --git a/src/tools/Makefile b/src/tools/Makefile index 2a52069..11e89e0 100644 --- a/src/tools/Makefile +++ b/src/tools/Makefile @@ -38,6 +38,7 @@ format-dsk: (cp ../sys/compile/ubix.elf ./) + (cp ../sbin/modprobe/modprobe ./) (cp ../bin/cat/cat ./) (cp ../bin/init/init ./) (cp ../bin/stat/stat ./) @@ -46,21 +47,22 @@ (cp ../bin/ls/ls ./) (cp ../bin/clock/clock ./) (cp ../lib/libc_old/libc_old.so ./) - (cp ../bin/fdisk/fdisk ./) + (cp ../sbin/fdisk/fdisk ./) (cp ../bin/cp/cp ./) - #(cp ../bin/format/format ./) - (cp ../bin/ubistry/ubistry ./) + #(cp ../sbin/format/format ./) + (cp ../sbin/ubistry/ubistry ./) (cp ../sys/boot/mbr/mbr ./) (cp ../bin/ld/ld.so ./) (cp /lib/libc.so.5 ./) - (cp ../bin/ttyd/ttyd ./) - (./format 50 2000 ${FD_DEVICE} ubix.elf 0 login 3754 init 3754 stat 3754 ubistry 3754 shell 3754 userdb 3754 cat 3754 ls 3754 motd 3754 fdisk 3754 cp 3754 clock 3754 libc_old.so 3754 ld.so 3754 ttyd 3754 ) + (cp ../sbin/ttyd/ttyd ./) + (./format 50 2000 ${FD_DEVICE} ubix.elf 0 login 3754 init 3754 stat 3754 ubistry 3754 shell 3754 userdb 3754 cat 3754 ls 3754 motd 3754 fdisk 3754 cp 3754 clock 3754 libc_old.so 3754 ld.so 3754 ttyd 3754 modprobe 3754 ) #(./format 50 2000 ${FD_DEVICE} ubix.elf 0 login 3754 init 3754 ubistry 3754 shell 3754 userdb 3754 motd 3754 libc_old.so 3754 ld.so 3754 test 3754 libc.so.5 3754) #(./format 263 204361 /dev/md1 ubix.elf 0 format 3754 fdisk 3754 ROM8X14.DPF 3754 init 3754 login 3754 shell 3754 userdb 3754 ls 3754 motd 3754 cp 3754) #(./format 1064 2000 ${FD_DEVICE} shell 3754 clock 3754) #(./format 200 2000 /dev/md1 ubix.elf 0 shell 3754 motd 3754 libc_old.so 3754) (rm -fr ubix.elf) + (rm -fr modprobe) (rm -fr cat) (rm -fr login) (rm -fr init)