summaryrefslogtreecommitdiff
path: root/kernel/kernel.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/kernel.c')
-rw-r--r--kernel/kernel.c23
1 files changed, 6 insertions, 17 deletions
diff --git a/kernel/kernel.c b/kernel/kernel.c
index cea1056..2760e8b 100644
--- a/kernel/kernel.c
+++ b/kernel/kernel.c
@@ -20,7 +20,6 @@
#include "multiboot.h"
#include "ringbuffer.h"
-
#include <stddef.h>
// for built-in shell
@@ -30,7 +29,6 @@
#include "terminal/terminal.h"
#include "driver/screen.h"
-
//
// The Foolish structure of Fool OS!
//
@@ -43,8 +41,6 @@ fool_os *get_fool()
//
//
-
-
// stdio init : TODO: move away!
static terminal_tty tty1;
static term_out screen;
@@ -52,7 +48,6 @@ static term_in input;
static ringbuffer stdin_buf;
-
static void put_kb(uint8_t c)
{
terminal_kb(&tty1,c);
@@ -75,8 +70,11 @@ static void init_stdio()
input.put_char=stdin_put_char;
tty1=terminal_init(&screen,&input);
+
get_fool()->tty=&tty1;
+ //
+
get_fool()->std_out.data=&tty1;
get_fool()->std_out.put=terminal_put;
@@ -89,12 +87,11 @@ static void init_stdio()
keyboard_init(put_kb);
}
-
-
-
void kernel_main(uint32_t eax,uint32_t ebx)
{
-
+ //
+ // STDIN and STDOUT
+ //
init_stdio();
//
@@ -117,13 +114,11 @@ void kernel_main(uint32_t eax,uint32_t ebx)
//
int_init(0x08);
-
//
// Process Multiboot Header
//
multiboot_information *info=get_multiboot(eax, ebx);
-
//
// Gather Info about other processors. (APs = application processors)
// ACPI or MP
@@ -171,20 +166,14 @@ void kernel_main(uint32_t eax,uint32_t ebx)
//empty stdin!
while(fifo_has(&get_fool()->std_in))
fifo_get(&get_fool()->std_in);
-
//
// Initialize Multitasking
//
task_init(dir);
-
//
// Abvoe should never returon
//
panic(FOOLOS_MODULE_NAME,"reached end of kernel.c !!");
-
}
-
-
-