Example #1
0
/*
 * Kernel C code entry point.
 * Initializes kernel subsystems, mounts filesystems,
 * and spawns init process.
 */
void Main(struct Boot_Info* bootInfo)
{
    Init_BSS();
    Init_Screen();
    Init_Mem(bootInfo);
    Init_CRC32();
    Init_TSS();
    Init_Interrupts();
    Init_Scheduler();
    Init_Traps();
    Init_Timer();
    Init_Keyboard();
    Init_DMA();
    Init_Floppy();
    Init_IDE();
    Init_PFAT();

    Mount_Root_Filesystem();

    Set_Current_Attr(ATTRIB(BLACK, GREEN|BRIGHT));
    Print("Welcome to GeekOS!\n");
    Set_Current_Attr(ATTRIB(BLACK, GRAY));




    Spawn_Init_Process();

    /* Now this thread is done. */
    Exit(0);
}
Example #2
0
/*
 * Kernel C code entry point.
 * Initializes kernel subsystems, mounts filesystems,
 * and spawns init process.
 */
void Main(struct Boot_Info* bootInfo)
{
    Init_BSS();
    Init_Screen();
    Init_Mem(bootInfo);
    Init_CRC32();
    Init_TSS();
    Init_Interrupts();
    Init_Scheduler();
    Init_Traps();
    Init_Timer();
    Init_Keyboard();


    Set_Current_Attr(ATTRIB(BLACK, GREEN|BRIGHT));
    Print("Welcome to GeekOS!\n");
    Set_Current_Attr(ATTRIB(BLACK, GRAY));
	


/*    TODO("Start a kernel thread to echo pressed keys and print counts");*/
	Start_Kernel_Thread(&funct_eigen, 0, PRIORITY_NORMAL, false);


    /* Now this thread is done. */
    Exit(0);
}
Example #3
0
void Main(struct Boot_Info *bootInfo) {
    Init_BSS();
    Init_Screen();
    Init_Mem(bootInfo);
    Init_CRC32();
    Init_TSS();

    lockKernel();
    Init_Interrupts(0);
    Init_SMP();
    TODO_P(PROJECT_VIRTUAL_MEMORY_A,
           "initialize virtual memory page tables.");
    Init_Scheduler(0, (void *)KERN_STACK);
    Init_Traps();
    Init_Local_APIC(0);
    Init_Timer();

    Init_Keyboard();
    Init_DMA();
    /* Init_Floppy(); *//* floppy initialization hangs on virtualbox */
    Init_IDE();
    Init_PFAT();
    Init_GFS2();
    Init_GOSFS();
    Init_CFS();
    Init_Alarm();

    Release_SMP();

    /* Initialize Networking */
    Init_Network_Devices();
    Init_ARP_Protocol();
    Init_IP();
    Init_Routing();
    Init_Sockets();
    Init_RIP();
    /* End networking subsystem init */

    /* Initialize Sound */
    Init_Sound_Devices();
    /* End sound init */

    Mount_Root_Filesystem();

    TODO_P(PROJECT_VIRTUAL_MEMORY_A, "initialize page file.");

    Set_Current_Attr(ATTRIB(BLACK, GREEN | BRIGHT));
    Print("Welcome to GeekOS!\n");
    Set_Current_Attr(ATTRIB(BLACK, GRAY));

    TODO_P(PROJECT_SOUND, "play startup sound");

    Spawn_Init_Process();

    /* it's time to shutdown the system */
    Hardware_Shutdown();

    /* we should not get here */
}
Example #4
0
int 
main(int argc,char **argv)
{
	FILE *fp;
	char ch;

	enum request request;
	request = REQ_VIEW_MAIN;
	
	
	fp = fopen("config","r+");
	if(fp == NULL)
		T_ERR("cannot read the file config!\nplease checkout the file is exist\n");
	
	argvs = argv;

	load_command(fp);
	fclose(fp);
	convert_command();
	
	command_type = parser_option(argc, argv);
	if(command_type == -1)
		exit(1);
	
	g_current = 0;
	g_change = 0;
#if CURSES_MOD == 1
	Init_Screen();
	mvwaddstr(stdscr,LINES/2,COLS/2,"Loading......");
#endif 
	
#if CURSES_MOD == 1
	while(view_control(request))
	{
		 ch = wgetch(status_win);
		 request = get_request(ch);
	}
#endif

#if CURSES_MOD == 1
	getch();
#endif

#if CURSES_MOD == 1
	quit(0);
#endif 

	return 0;
}
Example #5
0
/*
 * Kernel C code entry point.
 * Initializes kernel subsystems, mounts filesystems,
 * and spawns init process.
 */
void Main(struct Boot_Info *bootInfo) {



    Init_BSS();
    Init_Screen();
    Init_Mem(bootInfo);
    Init_CRC32();
    Init_TSS();
    Init_Interrupts();
    Init_Scheduler();
    Init_Traps();
    Init_Timer();
    Init_Keyboard();
    Init_DMA();
    Init_Floppy();
    Init_IDE();
    Init_PFAT();
    Init_GFS2();
    Init_GOSFS();
    Init_Alarm();

    /* Initialize Networking */
    Init_Network_Devices();
    Init_ARP_Protocol();
    Init_IP();
    Init_Routing();
    Init_Sockets();
    Init_RIP();
    /* End networking subsystem init */

    Mount_Root_Filesystem();

    Set_Current_Attr(ATTRIB(BLACK, GREEN | BRIGHT));
    Print("Welcome to GeekOS!\n");
    Set_Current_Attr(ATTRIB(BLACK, GRAY));

    Spawn_Init_Process();

    /* Now this thread is done. */
    Exit(0);
}
Example #6
0
/*
 * Kernel C code entry point.
 * Initializes kernel subsystems, mounts filesystems,
 * and spawns init process.
 */
void Main(struct Boot_Info* bootInfo)
{
    Init_BSS();
    Init_Screen();
    Init_Mem(bootInfo);
    Init_CRC32();
    Init_TSS();
    Init_Interrupts();
    Init_Scheduler();
    Init_Traps();
    Init_Timer();
    Init_Keyboard();

    Set_Current_Attr(ATTRIB(BLACK, GREEN|BRIGHT));
    Print("Welcome to GeekOS!\n");
    Set_Current_Attr(ATTRIB(BLACK, GRAY));
    Start_Kernel_Thread(Print_Key_Pressed, 0, PRIORITY_NORMAL, false);

    /* Now this thread is done. */
    Exit(0);
}
Example #7
0
void Main(struct Boot_Info *bootInfo) {
    Init_BSS();
    Init_Screen();
    Init_Mem(bootInfo);
    Init_CRC32();
    TODO_P(PROJECT_PERCPU, "Initialize PERCPU");
    Init_TSS();

    /* by modifying begin_int_atomic to autolock if not locked when interrupts are disabled, 
       this lockKernel() became duplicative */
    /* lockKernel(); */
    Init_Interrupts(0);
    Print("Init_SMP\n");
    Init_SMP();
    Print("/Init_SMP\n");
    TODO_P(PROJECT_VIRTUAL_MEMORY_A,
           "initialize virtual memory page tables.");
    Init_Scheduler(0, (void *)KERN_STACK);
    Init_Traps();
    Init_Local_APIC(0);
    Init_Timer();

    Init_Keyboard();
    Init_DMA();
    /* Init_Floppy(); *//* floppy initialization hangs on virtualbox */
    Init_IDE();
    Init_PFAT();
    if(Init_GFS2)
        Init_GFS2();
    if(Init_GFS3)
        Init_GFS3();
    Init_GOSFS();
    Init_CFS();
    Init_Alarm();
    Init_Serial();

    Print("the global lock is %sheld.\n",
          Kernel_Is_Locked()? "" : "not ");

    Release_SMP();

    /* Initialize Networking */
    /* 
       Init_Network_Devices();
       Init_ARP_Protocol();
       Init_IP();
       Init_Routing();
       Init_Sockets();
       Init_RIP();
     */
    /* End networking subsystem init */

    /* Initialize Sound */
    Init_Sound_Devices();
    /* End sound init */

    Mount_Root_Filesystem();

    TODO_P(PROJECT_VIRTUAL_MEMORY_A, "initialize page file.");

    Set_Current_Attr(ATTRIB(BLACK, GREEN | BRIGHT));
    Print("Welcome to GeekOS!\n");
    Set_Current_Attr(ATTRIB(BLACK, GRAY));

    TODO_P(PROJECT_SOUND, "play startup sound");

    TODO_P(PROJECT_SERIAL,
           "Initialize the serial console and start the shell.");

    Spawn_Init_Process();

    /* it's time to shutdown the system because Init exited. */
    Hardware_Shutdown();

    /* we should not get here */
}