diff cos/kernel/handlers.c @ 32:3a6a9b929db0

Added initial ramdisk and some virtual file system functions
author windel
date Fri, 13 Jan 2012 18:18:17 +0100
parents 88590c42320f
children d8185ddb6c7b
line wrap: on
line diff
--- a/cos/kernel/handlers.c	Tue Jan 10 20:40:35 2012 +0100
+++ b/cos/kernel/handlers.c	Fri Jan 13 18:18:17 2012 +0100
@@ -128,23 +128,24 @@
 // Hopefully, this function get called with the correct registers.
 void isr_handler(uint64_t* registers)
 {
-
    uint64_t intnum = registers[7];
 
+   // TODO: make a list with handler pointers:
    if (intnum == 32)
    {
       timerDriverUpdate();
    }
    else if (intnum == 33)
    {
-      unsigned char scancode = inb(0x60);
-      keyboardDriverUpdate(scancode);
+      keyboardDriverUpdate();
    }
    else
    {
-      printf("Interrupt %d called, registers at: %x\n", registers[7], registers);
+      // printf("Interrupt %d called, registers at: %x\n", registers[7], registers);
    }
 
+   // TODO: EOI to slave?
+   // TODO: replace this with APIC code?
    outb(0x20, 0x20); // EOI to master
 }
 
@@ -170,26 +171,6 @@
   panic("Unhandled exception!");
 }
 
-// remapped IRQ from master PIC:
-void INT32handler() 
-{
-  // System timer.
-  //printf("INT32 called!\n");
-  // called very frequent, what is this?
-  timerDriverUpdate();
-  // Acknowledge int:
-  outb(0x20, 0x20); // EOI to master
-}
-
-void INT33handler() 
-{
-  //printf("INT33 called, key pressed????\n");
-  unsigned char scancode = inb(0x60);
-  //printf("Scancode = 0x%x\n", scancode);
-  keyboardDriverUpdate(scancode);
-  outb(0x20, 0x20); // EOI to master
-}
-
 void INTDEF_handler() 
 {
   panic("Default int handler called\n");