diff --git a/src/sys/init/main.c b/src/sys/init/main.c index 93a4ec8..d1f251c 100644 --- a/src/sys/init/main.c +++ b/src/sys/init/main.c @@ -1,5 +1,5 @@ /***************************************************************************************** - Copyright (c) 2002 The UbixOS Project + Copyright (c) 2004 The UbixOS Project All rights reserved. Redistribution and use in source and binary forms, with or without modification, are @@ -70,11 +70,11 @@ }; struct { unsigned short limit __attribute__ ((packed)); - union descriptorTableunion *gdt __attribute__ ((packed)); + union descriptorTableUnion *gdt __attribute__ ((packed)); } loadGDT = { (8 * sizeof(union descriptorTableUnion) - 1), ubixGDT }; -int main() { +int main(int argc,char **argv) { // Clear the screen so we have a nice pretty starting place for the os to spew its info clearScreen(); @@ -126,6 +126,7 @@ if (ne2kInit(0x240) != 0x0) { kpanic("Error: Initializing NE2000\n"); } + //netInit(); enableUbixFS(); fdcInit(); initHardDisk(); @@ -138,13 +139,14 @@ if (mount(0x1,0x1,0x0,0x0,"hd","rw") != 0x0) { kprintf("Problem Mounting HD Mount Point\n"); } + execThread(idleTask,(uInt32)(kmalloc(0x2000,sysID)+0x2000),0x0,"Idle Thread"); + execFile("init@sys",0x0,0x0,0x0); kprintf("Free Pages: [%i]\n",freePages); kprintf("MemoryMap: [0x%X]\n",vmmMemoryMap); kprintf("Starting Os\n"); - netInit(); - execThread(idleTask,(uInt32)(kmalloc(0x2000,sysID)+0x2000),0x0,"Idle Thread"); - //execFile("init@sys",0x0,0x0,0x0); - execFile("shell@sys",0x0,0x0,0x0); + //execFile("shell@sys",0x0,0x0,0x0); + kprintf("argc: %i\n",argc); + while (1); irqEnable(0x0); sched(); return(0x0); @@ -166,7 +168,7 @@ At A Later Date Then Reboot The Machine ************************************************************************/ -void _start(void) { +void _start(int argc,char **argv) { asm ("pushl $2; popf"); asm volatile( "lgdtl (loadGDT) \n" @@ -183,20 +185,21 @@ "mov $0x20,%%ax \n" // Set Up Dummy TSS "ltr %%ax \n" // Load The Dummy TSS "ljmp $0x08,$next \n" - "nop\n" - "nop\n" - "next:\n" + "next: \n" : : "r" (ubixGDT), "p" (kernelStack+8192) : "%eax" ); - main(); + main(argc,argv); kpanic("We Should Not Get This Far\n"); } /*** $Log$ + Revision 1.20 2004/05/10 02:23:24 reddawg + Minor Changes To Source Code To Prepare It For Open Source Release + Revision 1.19 2004/05/08 19:06:24 reddawg Going to impliment FSTAB