summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorMiguel <m.i@gmx.at>2018-08-20 03:18:04 +0200
committerMiguel <m.i@gmx.at>2018-08-20 03:18:04 +0200
commite4febc5aac3006c3ef025b5f708ec51fdac63b94 (patch)
treee00149a611589520bd6c99e1fe043385df583f5c /kernel
parent39100c30b7a16103e75187c9840a79c7df54f3da (diff)
vesa works beuatifullyy
Diffstat (limited to 'kernel')
-rw-r--r--kernel/kernel.c22
-rw-r--r--kernel/syscalls.c7
2 files changed, 18 insertions, 11 deletions
diff --git a/kernel/kernel.c b/kernel/kernel.c
index 62556cb..ea14869 100644
--- a/kernel/kernel.c
+++ b/kernel/kernel.c
@@ -33,13 +33,8 @@ void kernel_main(uint32_t eax,uint32_t ebx)
uint64_t epoch_time=timer_init();
log(FOOLOS_MODULE_NAME,FOOLOS_LOG_INFO,"PIT - initialized. %u seconds passed since 1970.",epoch_time);
- // STREAMS
- uint32_t sstdin = syscall_open("stdin",0,0); // stdin 0
- uint32_t sstdout = syscall_open("term",0,0); // stdout 1
- uint32_t sstderr = syscall_open("stderr",0,0); // stderr 2
-
// KEYBOARD DRIVER
- keyboard_init(sstdin);
+ keyboard_init(0); //sstdin
// MOUSE DRIVER
mouse_init();
@@ -47,9 +42,6 @@ void kernel_main(uint32_t eax,uint32_t ebx)
// GDT
gdt_setup();
- // INTERRUPTS (code segment: 0x08)
- int_init(0x08);
-
// MULTIBOOT HEADER
multiboot_information *info=get_multiboot(eax, ebx);
@@ -82,11 +74,19 @@ void kernel_main(uint32_t eax,uint32_t ebx)
uint32_t addr=kballoc(1);
fs_content("/binfont.bin",addr,0x100); // copy 0x100 bytes to 0x7000
vesa_init(info->vbe_control_info,info->vbe_mode_info,addr);
- PutString("WELCOME TO THE Fool Operating System",100,100,0xffff00);
- // INIT MULTITASKING (and switch to usermode)
+ // STREAMS
+ uint32_t sstdin = syscall_open("stdin",0,0); // stdin 0
+ uint32_t sstdout = syscall_open("term",0,0); // stdout 1
+ uint32_t sstderr = syscall_open("stderr",0,0); // stderr 2
+
+ // START INTERRUPTS (code segment: 0x08)
+ int_init(0x08);
+
+ // INIT MULTITASKING (and switch to our pseudo-usermode)
task_init(dir);
// we should never reach this
panic(FOOLOS_MODULE_NAME,"reached end of kernel.c !!");
+
}
diff --git a/kernel/syscalls.c b/kernel/syscalls.c
index 0c334bc..db23a17 100644
--- a/kernel/syscalls.c
+++ b/kernel/syscalls.c
@@ -5,6 +5,7 @@
#include "fs/fs.h"
#include "fs/ext2.h"
#include "kernel.h"
+#include "driver/vesa.h"
#include "fifo.h"
#include "fd.h"
#include "terminal/terminal.h"
@@ -259,8 +260,14 @@ int syscall_open(char *name, int flags, int mode)
}
else
{
+ // FIRST TIME WE SEE THE GENIUS OF OUR ABSTRACTIONS (I HOPE...)
screen.put_char=console_put_char;
screen.update_cursor=update_cursor;
+
+ // FIRST TIME WE SEE THE GENIUS OF OUR ABSTRACTIONS (I HOPE...)
+ screen.put_char=vesa_console_put_char;
+ screen.update_cursor=vesa_update_cursor;
+
tty1=terminal_init(&screen,NULL);
fifos[next_fifo].data=&tty1;