From 7e9328b4d3d0949efd2554d13d5ca936572d383f Mon Sep 17 00:00:00 2001 From: Michal Idziorek Date: Fri, 29 Aug 2014 11:09:11 +0200 Subject: keyboard handler debugging log --- kernel/keyboard.c | 26 ++++++-------------------- 1 file changed, 6 insertions(+), 20 deletions(-) (limited to 'kernel/keyboard.c') diff --git a/kernel/keyboard.c b/kernel/keyboard.c index 653d2ba..ede71a2 100644 --- a/kernel/keyboard.c +++ b/kernel/keyboard.c @@ -1,4 +1,5 @@ #include "kernel.h" +#include "x86.h" #include "console.h" #include "../lib/logger/log.h" // logger facilities #define FOOLOS_MODULE_NAME "keyboard" @@ -11,6 +12,7 @@ void keyboard_handle(uint8_t in) { + log(FOOLOS_MODULE_NAME,FOOLOS_LOG_INFO,"scancode 0x%x",in); int i=0; // @@ -129,30 +131,14 @@ void keyboard_handle(uint8_t in) void int_kb_handler() { - __asm__("pusha"); - - __asm__("in $0x60, %al"); + X86_IRQ_BEGIN static uint8_t kb_in; - + __asm__("in $0x60, %al"); __asm__("mov %%al, %0"::"m" (kb_in)); + keyboard_handle(kb_in); - // scr_nextline(); - //scr_put_string("irq 1 -> kb scancodes : "); - //scr_put_hex(kb_in); - - - - keyboard_handle(kb_in); //TODO!! - - // send EOI to primary PIC - __asm__("mov $0x20, %al"); - __asm__("out %al, $0x20"); - // - - __asm__("popa"); - __asm__("leave"); - __asm__("iret"); + X86_IRQ_END } -- cgit v1.2.3