summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kernel/kernel.c10
-rw-r--r--kernel/keyboard.c6
-rw-r--r--lib/logger/log.c5
3 files changed, 14 insertions, 7 deletions
diff --git a/kernel/kernel.c b/kernel/kernel.c
index 898994c..df5e276 100644
--- a/kernel/kernel.c
+++ b/kernel/kernel.c
@@ -5,7 +5,7 @@
#include "../lib/logger/log.h" // logger facilities
#define FOOLOS_MODULE_NAME "kernel"
-// TODO: cleanup . how can i compile it without the includes!??
+// TODO: cleanup . WHHYY can i compile it without the includes!??
///////
// interrupt handler prototypes
@@ -21,12 +21,18 @@ void int_floppy_handler();
// just a test handler for software interrupt 88, todo: remove and
// implement some syscalls!
//
+void int_test_handler_worker()
+{
+ // this can not be called directly from interrupt handler
+ // due to optional parameters (...) probably!
+ log(FOOLOS_MODULE_NAME,FOOLOS_LOG_INFO,"irq 88");
+}
void int_test_handler()
{
X86_IRQ_BEGIN
+ int_test_handler_worker();
sleep(30);
X86_IRQ_END
-
}
// heart of our operating system.
diff --git a/kernel/keyboard.c b/kernel/keyboard.c
index 9b81682..653d2ba 100644
--- a/kernel/keyboard.c
+++ b/kernel/keyboard.c
@@ -1,5 +1,7 @@
#include "kernel.h"
#include "console.h"
+#include "../lib/logger/log.h" // logger facilities
+#define FOOLOS_MODULE_NAME "keyboard"
/// keyboard driver ////
@@ -124,7 +126,7 @@ void keyboard_handle(uint8_t in)
}
-__attribute__((interrupt( irq ))) void int_kb_handler()
+void int_kb_handler()
{
__asm__("pusha");
@@ -139,6 +141,8 @@ __attribute__((interrupt( irq ))) void int_kb_handler()
//scr_put_string("irq 1 -> kb scancodes : ");
//scr_put_hex(kb_in);
+
+
keyboard_handle(kb_in); //TODO!!
// send EOI to primary PIC
diff --git a/lib/logger/log.c b/lib/logger/log.c
index aea1b7f..70337db 100644
--- a/lib/logger/log.c
+++ b/lib/logger/log.c
@@ -5,19 +5,16 @@ void PutConsole(char *str, int color, va_list va);
void log(char *module_name, int log_level, char *format_string, ...)
{
+
if(log_level<FOOLOS_LOG_INFO)return;
PutConsole(module_name,0b1111100000000000,0);
PutConsole(": ",0b0000011111100000,0);
va_list va;
va_start(va,format_string);
-
PutConsole(format_string, 0b11111, va);
-
va_end(va);
PutConsoleNL();
-
-
}