diff --git a/src/sys/init/Makefile b/src/sys/init/Makefile index ca78be4..0a0cf04 100644 --- a/src/sys/init/Makefile +++ b/src/sys/init/Makefile @@ -6,7 +6,7 @@ include ../Makefile.inc # Objects -OBJS = main.o +OBJS = start.o main.o all: $(OBJS) diff --git a/src/sys/init/main.c b/src/sys/init/main.c index 62dd107..e945e67 100644 --- a/src/sys/init/main.c +++ b/src/sys/init/main.c @@ -46,9 +46,6 @@ #include #include -static char kernelStack[8192]; /* Stack Space For Our Kernel */ - - /***************************************************************************************** Desc: The Kernels Descriptor table: 0x00 - Dummy Entry @@ -121,49 +118,11 @@ return(0x0); } -/************************************************************************ - -Function: _start(); -Description: This Is The Kernels Main Entry Point From Here We Must - Re-Setup Our GDT And Set All Registers To Their Default - Values So We Are Sure Of No Error When The OS Boots Up Also - We Have To Quickly Set Up Our Interrupt Table Because We Do - Not Have Any Fault Protection Yet - -Notes: - -02/17/03 - I'm Unhappy With The Infinite Loop I Decided To Do If The Call - To Main Returns I Think I Shall Change It To A Kernel Panic - At A Later Date Then Reboot The Machine - -************************************************************************/ -void _start() { - asm volatile( - "lgdtl (loadGDT) \n" - "movw $0x10,%%ax \n" /* Select Ring 0 Data Segment */ - "movw %%ax,%%ds \n" /* Set Default Segment */ - "movw %%ax,%%es \n" /* "" "" */ - "movw %%ax,%%fs \n" /* "" "" */ - "movw %%ax,%%gs \n" /* "" "" */ - "movw %%ax,%%ss \n" /* "" "" */ - "movl %1,%%esp \n" /* Set Default Stack Pointer Its The End Of First Page */ - "movl %1,%%ebp \n" - "mov $0x18,%%ax \n" /* Set Up Dummy LDT */ - "lldt %%ax \n" /* Load The Dummy LDT */ - "mov $0x20,%%ax \n" /* Set Up Dummy TSS */ - "ltr %%ax \n" /* Load The Dummy TSS */ - "ljmp $0x08,$next \n" /* This is to make sure we are in ring-0 */ - "next: \n" - : - : "r" (ubixGDT), "p" (kernelStack+8192) - : "%eax" - ); - main(); - kpanic("Error: kernel main returned.\n"); - } - /*** $Log$ + Revision 1.58 2004/07/20 19:43:37 reddawg + *** empty log message *** + Revision 1.57 2004/07/19 02:08:28 reddawg Cleaned out the rest of debuging code also temporarily disabled the ip stack to improve boot time