summaryrefslogtreecommitdiff
path: root/src/kernel/core/kmain.c
diff options
context:
space:
mode:
authorAlex AUVOLAT <alexis211@gmail.com>2012-05-01 23:48:56 +0200
committerAlex AUVOLAT <alexis211@gmail.com>2012-05-01 23:48:56 +0200
commit43d0bb8e3997022e5270f7f75f615a47819c929e (patch)
tree937992d286966edecf81b405e414230c85d19bad /src/kernel/core/kmain.c
parente9683297bf480f9590b0e5796f4520fb430e2e03 (diff)
downloadTCE-43d0bb8e3997022e5270f7f75f615a47819c929e.tar.gz
TCE-43d0bb8e3997022e5270f7f75f615a47819c929e.zip
Basic object system - THIS IS STILL A LONG WAY TO GO!!
Diffstat (limited to 'src/kernel/core/kmain.c')
-rw-r--r--src/kernel/core/kmain.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/kernel/core/kmain.c b/src/kernel/core/kmain.c
index 8c36b54..3401107 100644
--- a/src/kernel/core/kmain.c
+++ b/src/kernel/core/kmain.c
@@ -12,6 +12,8 @@
#include <mem/mem.h>
#include <linker/elf.h>
+#include <Object/Object.h>
+
/* The kernel's main procedure. This function is called in loader_.asm.
This function calls the initializer functions for all system parts.
It then loads the modules the kernel was given by the bootloader.
@@ -36,12 +38,13 @@ void kmain(struct multiboot_info_t* mbd, int32_t magic) {
monitor_clear();
+ monitor_write(" -> This is ");
monitor_write(K_OS_NAME);
monitor_write(" version ");
monitor_write(K_OS_VER);
monitor_write(" codename '");
monitor_write(K_OS_CODENAME);
- monitor_write("' starting up :\n");
+ monitor_write("', now starting up :\n");
idt_init();
@@ -52,27 +55,27 @@ void kmain(struct multiboot_info_t* mbd, int32_t magic) {
gdt_init();
paging_cleanup();
- //kheap_init();
timer_init(30);
tasking_init();
+
+ setup_object_system();
- monitor_write("\n\nLoading modules :\n");
for (i = 0; i < mbd->mods_count; i++) {
- monitor_write(" * ");
+ monitor_write("\n * Load multiboot module '");
monitor_write((char*)mods[i].string);
if (elf_check((uint8_t*)mods[i].mod_start)) {
- monitor_write(" : Invalid ELF file\n");
+ monitor_write("' : Invalid ELF file");
} else {
struct process *pr = elf_exec((uint8_t*)mods[i].mod_start, PL_USER);
if (pr == 0) {
- monitor_write(" : Error loading\n");
+ monitor_write("' : Error loading");
} else {
- monitor_write(" : OK, pid="); monitor_writeDec(pr->pid); monitor_write("\n");
+ monitor_write("' : OK, pid="); monitor_writeDec(pr->pid);
}
}
}
- monitor_write("Modules now RULE THE WORLD !\n\n");
+ monitor_write("\nUserland processes now RULE THE WORLD !\n\n");
sti();
schedule();
PANIC("Should never happen. Something probably went wrong with multitasking.");