From f20db37ca17245d5d20302a1ac1da347de5c3607 Mon Sep 17 00:00:00 2001 From: Michal Idziorek Date: Mon, 1 Dec 2014 23:33:31 +0100 Subject: very buggy fork, execve and exit --- kernel/kernel.c | 44 +++++++++++++------------------------------- 1 file changed, 13 insertions(+), 31 deletions(-) (limited to 'kernel/kernel.c') diff --git a/kernel/kernel.c b/kernel/kernel.c index a0aaa7f..641c442 100644 --- a/kernel/kernel.c +++ b/kernel/kernel.c @@ -84,12 +84,20 @@ void kernel_main(uint32_t initial_stack, int mp) // int_init(0x08); + // + // Scan the PCI Bus + // + // We are interested in the E1000 Network Adapter in particular + // Its driver will be hopefully implemented one day ;) TODO + // + //pci_init(); + + // // Gather Info about other processors. (APs) // ACPI or MP // // - /* smp_processors procdata; @@ -97,48 +105,22 @@ void kernel_main(uint32_t initial_stack, int mp) if(!mp_find(&procdata)) panic(FOOLOS_MODULE_NAME,"ACPI and MP search failed! I do not want to continue!"); */ - - task_init(); //; this will never return! - - - // load and run foolshell - // we will come back into the kernel only on interrupts... -/* - - static char *argv[]={"/bin/foolshell",NULL}; - static char *env[]={"PATH=/bin","PWD=/home/miguel","PS1=$ ",NULL}; - syscall_execve("/bin/foolshell",argv,env); - */ - - // // Start the other Processors (also before paging for some reason!) // //smp_log_procdata(&procdata); //smp_start_aps(&procdata,0x80000); // starts at 0x80000 // but it will be copied over mbr - - - // - // Scan the PCI Bus - // - // We are interested in the E1000 Network Adapter in particular - // Its driver will be hopefully implemented one day ;) TODO - // - //pci_init(); // // Initialize Multitasking // - // For now this starts three "tasks" which are scheduled - // round robin style. - // + + task_init(); //; this will never return! - //task_init(); + + - // Just hang around here, if its reached. - // we do our tasks anyway. on the next clock tick. - // while(1); } -- cgit v1.2.3