diff --git a/src/bin/init/Makefile b/src/bin/init/Makefile index fcce08f..2e8e490 100644 --- a/src/bin/init/Makefile +++ b/src/bin/init/Makefile @@ -25,7 +25,7 @@ # Link The Binary $(BINARY) : $(OBJS) $(CC) $(CFLAGS) -o $@ $(STARTUP) $(LIBRARIES) $(OBJS) - strip $(BINARY) +# strip $(BINARY) # Compile the source files .cc.o: diff --git a/src/bin/init/main.c b/src/bin/init/main.c index a570525..674ef4e 100644 --- a/src/bin/init/main.c +++ b/src/bin/init/main.c @@ -58,14 +58,7 @@ } printf("\nG\n"); i = fork(); - printf("Word\n"); - /* - printf("\nC\n"); - for (i=0;i<100;i++) { - printf("[%i]",i); - } - */ - while (1); + if (0x0 == i) { exec("sys:/ttyd",0x0,0x0); printf("Error: Could not start TTYD\n"); @@ -74,7 +67,6 @@ while (pidStatus(i) > 0x0) sched_yield(); - i = fork(); if (0x0 == i) { printf("Starting Ubix Registry (ubistry)\n"); @@ -118,6 +110,9 @@ /*** $Log$ + Revision 1.22 2004/08/24 05:24:36 reddawg + TCA Is A BONER!!!! + Revision 1.21 2004/08/21 23:47:50 reddawg *** empty log message *** diff --git a/src/lib/libc_old/sys/fork.c b/src/lib/libc_old/sys/fork.c index d36fe6c..daeb8e6 100644 --- a/src/lib/libc_old/sys/fork.c +++ b/src/lib/libc_old/sys/fork.c @@ -33,27 +33,36 @@ pid_t fork() { volatile pid_t pid = 0x0; asm volatile( + /* "pushl %%eax\n" "pushl %%ecx\n" + */ "movl $4,%%eax\n" + /* "push %%ss\n" "movl %%esp,%%ecx\n" "sub $4,%%ecx\n" "pushl %%ecx\n" + */ "int $0x80 \n" + /* "popl %%esp\n" "pop %%ax\n" "popl %%ecx\n" "popl %%eax\n" + */ : : "b" (&pid) ); - + while (1); return(pid); } /*** $Log$ + Revision 1.4 2004/08/02 18:50:13 reddawg + Updates to make some variable volatile to make work with gcc 3.3. However there are still some issues but we have not caused new issues with gcc 2.95 + Revision 1.3 2004/08/01 20:14:18 reddawg Fixens diff --git a/src/sys/init/main.c b/src/sys/init/main.c index 508f3af..69988f1 100644 --- a/src/sys/init/main.c +++ b/src/sys/init/main.c @@ -73,7 +73,7 @@ void test_thread() { int i = 0x0; while (1) { - kprintf("HOLLER\n"); + //kprintf("HOLLER\n"); for (i = 0x0;i<0x1000;i++) asm("hlt"); } } @@ -129,6 +129,9 @@ /*** $Log$ + Revision 1.77 2004/08/24 05:24:37 reddawg + TCA Is A BONER!!!! + Revision 1.76 2004/08/21 23:47:50 reddawg *** empty log message *** diff --git a/src/sys/kernel/fork.c b/src/sys/kernel/fork.c index 6d55528..7c6b6cc 100644 --- a/src/sys/kernel/fork.c +++ b/src/sys/kernel/fork.c @@ -65,17 +65,13 @@ " ret \n" ); -int forkCopyProcess_new(struct i386_frame iframe) { - kprintf("eip: [0x%X]\n",iframe.eip); - while (1); - } int forkCopyProcess(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) { assert(newProcess); assert(_current); - kprintf("[0x%X:0x%X:0x%X]\n",_current->iframe,_current->kernelStack,((uInt32)_current->iframe - (uInt32)_current->kernelStack)); //memcpy(newProcess->kernelStack,_current->kernelStack,0x2000); + //newProcess->iframe = ((uInt32)newProcess->kernelStack + ((uInt32)_current->iframe - (uInt32)_current->kernelStack)); newProcess->iframe->gs = _current->iframe->gs; - newProcess->iframe->fs = _current->iframe->fs; + newProcess->iframe->fs = _current->iframe->gs; newProcess->iframe->es = _current->iframe->es; newProcess->iframe->ds = _current->iframe->ds; newProcess->iframe->ss = 0x10; @@ -92,21 +88,27 @@ newProcess->iframe->flags = eflags; newProcess->iframe->user_esp = esp; newProcess->iframe->user_ss = ss; + //newProcess->iframe->esp = ((uInt32)newProcess->kernelStack - sizeof(struct i386_frame) + 0x2000); /* Create A Copy Of The VM Space For New Task */ newProcess->cr3 = (uInt32)vmmCopyVirtualSpace(newProcess->id); - kprintf("newProcess->id: [%i][0x%X][0x%X][0x%X]\n",newProcess->id,esp,esi,edi); - newProcess->state = FORK; - + kprintf("newProcess->id: [0x%X][0x%X][0x%X][0x%X][0x%X]\n",ss,esp,eip,ebp,newProcess->kernelStack); + newProcess->state = FORK; + while (1); + + //kprintf("DIKI\n"); while (newProcess->state == FORK) sched_yield(); - + //kprintf("WIKI\n"); /* Return Id of Proccess */ return(newProcess->id); } /*** $Log$ + Revision 1.26 2004/08/24 05:24:37 reddawg + TCA Is A BONER!!!! + Revision 1.25 2004/08/21 23:47:50 reddawg *** empty log message *** diff --git a/src/sys/kernel/sched.c b/src/sys/kernel/sched.c index 7a4e448..ff14d7b 100644 --- a/src/sys/kernel/sched.c +++ b/src/sys/kernel/sched.c @@ -60,10 +60,8 @@ /* Yield the next task from the current prio queue */ for (;tmpTask != 0x0; tmpTask = tmpTask->next) { if (tmpTask->state > 0x0) { - /* if (tmpTask->state == FORK) tmpTask->state = READY; - */ return(tmpTask); } } @@ -157,6 +155,10 @@ /* Switch Tasks */ sched_tss->esp0 = _current->kernelStack + 0x2000; + if (_current->id == 4) { + //kprintf("esp0: [0x%X:0x%X]\n",sched_tss->esp0,sched_tss->esp0 - 0x2000); + outportByte(0xE9,0xE9); + } asm volatile( "mov %0,%%eax \n" "mov %%eax,%%cr3 \n" @@ -306,6 +308,9 @@ /*** $Log$ + Revision 1.41 2004/08/24 05:24:37 reddawg + TCA Is A BONER!!!! + Revision 1.40 2004/08/21 23:57:53 reddawg *** empty log message *** diff --git a/src/sys/kernel/systemtask.c b/src/sys/kernel/systemtask.c index 7f635bf..f56b896 100644 --- a/src/sys/kernel/systemtask.c +++ b/src/sys/kernel/systemtask.c @@ -92,7 +92,7 @@ break; } } - kprintf("sysTask\n"); + //kprintf("sysTask\n"); for (i = 0x0;i<0x1000;i++) asm("hlt"); sched_yield(); } @@ -101,6 +101,9 @@ /*** $Log$ + Revision 1.13 2004/08/24 05:24:37 reddawg + TCA Is A BONER!!!! + Revision 1.12 2004/08/14 11:23:02 reddawg Changes diff --git a/src/sys/sys/idt.c b/src/sys/sys/idt.c index 2566cfa..7952497 100644 --- a/src/sys/sys/idt.c +++ b/src/sys/sys/idt.c @@ -280,6 +280,8 @@ uInt32 *stack32 = 0x0; bool isOperand32 = FALSE, isAddress32 = FALSE; struct tssStruct *gpfTSS = (struct tssStruct *)0x4200; + + kpanic("GPF!!!\n"); irqDisable(0x0); @@ -458,6 +460,9 @@ /*** $Log$ + Revision 1.32 2004/08/21 17:36:57 reddawg + updates: converted to software task switching however it is not working yet + Revision 1.31 2004/08/14 11:23:02 reddawg Changes