diff options
Diffstat (limited to 'src/kernel/main.c')
-rw-r--r-- | src/kernel/main.c | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/kernel/main.c b/src/kernel/main.c new file mode 100644 index 0000000..0193514 --- /dev/null +++ b/src/kernel/main.c @@ -0,0 +1,33 @@ +#include <kernel/gdt.h> +#include <kernel/idt.h> +#include <kernel/mem.h> +#include <kernel/panic.h> +#include <kernel/proc.h> +#include <kernel/tty.h> +#include <platform/asm.h> + +void r3_test(); + +void kmain() +{ + tty_clear(); + tty_const("gdt..."); + gdt_init(); + tty_const("idt..."); + idt_init(); + tty_const("sysenter..."); + sysenter_setup(); + tty_const("mem..."); + mem_init(); + + tty_const("creating process..."); + struct process *proc = process_new(r3_test); + tty_const("switching..."); + process_switch(proc); +} + +void r3_test() { + tty_const("ok"); + asm("cli"); + panic(); +} |