summaryrefslogtreecommitdiff
path: root/kernel/kernel.c
diff options
context:
space:
mode:
authorMichal Idziorek <m.i@gmx.at>2014-11-17 14:56:01 +0100
committerMichal Idziorek <m.i@gmx.at>2014-11-17 14:56:01 +0100
commit54d36998da2e98039b960a3a9e6fb82e09717991 (patch)
tree49ab40cafbd33fb3a91df9a4157895e2059f6f55 /kernel/kernel.c
parente1b3206c11baa396edaf49bfb45a2a443717eaa4 (diff)
trying to reactivate multitasking.
Diffstat (limited to 'kernel/kernel.c')
-rw-r--r--kernel/kernel.c31
1 files changed, 16 insertions, 15 deletions
diff --git a/kernel/kernel.c b/kernel/kernel.c
index 6cc4500..5628e84 100644
--- a/kernel/kernel.c
+++ b/kernel/kernel.c
@@ -22,6 +22,8 @@
#include "fs/fs.h"
#include "fs/ext2.h"
+#include "task.h"
+
#ifdef FOOLOS_COMPILE_FLOPPY
#include "floppy.h"
@@ -77,6 +79,11 @@ void kernel_main(uint32_t initial_stack, int mp)
/////////////////// BULLSHIT ABOVE THIS LINE: TODO: CLEANUP
+ //
+ // init system log ringbugger
+ //
+ log_init();
+
//
// The System Time
//
@@ -94,16 +101,11 @@ void kernel_main(uint32_t initial_stack, int mp)
mem_init(0x7c00+1,*((uint16_t *)(0x7c00)));
//
- // init system log ringbugger
- //
- log_init();
-
- //
// init output to screen
//
console_init();
- // self-log message of logger :P
+ // log buffered messages to console
log_log();
//
@@ -135,11 +137,15 @@ void kernel_main(uint32_t initial_stack, int mp)
// Gather Info about other processors. (APs)
// ACPI or MP
//
+ //
+
+ /*
smp_processors procdata;
if(!acpi_find(&procdata))
if(!mp_find(&procdata))
panic(FOOLOS_MODULE_NAME,"ACPI and MP search failed! I do not want to continue!");
+ */
// init spinlocks
init_spinlocks();
@@ -153,14 +159,14 @@ void kernel_main(uint32_t initial_stack, int mp)
//smp_log_procdata(&procdata);
//smp_start_aps(&procdata,0x80000); // starts at 0x80000
// but it will be copied over mbr
-
+
//
// Activate Virtual Memory (paging)
//
// paging (pass the vesa physbase address for identity mapping)
// TODO: we will work on this later (not needed so urgently yet)
//
- // vmem_init(vesa_physbase);
+ //vmem_init(vesa_physbase);
//
// Scan the PCI Bus
@@ -184,20 +190,15 @@ void kernel_main(uint32_t initial_stack, int mp)
// For now this starts three "tasks" which are scheduled
// round robin style.
//
- //task_init();
+ task_init();
//
//vesa_init_doublebuff();
- ext2_check(EXT2_RAM_ADDRESS);
- syscall_execve(15,0,0);
// Just hang around here, if its reached.
// we do our tasks anyway. on the next clock tick.
- while(1)
- {
-
- }
+ while(1);
}