diff cos/kernel/handlers.c @ 40:24ce177e01e8

Added more malloc stuff. Added mem usage
author windel
date Tue, 24 Jan 2012 17:54:16 +0100
parents 91f91ff07ea8
children
line wrap: on
line diff
--- a/cos/kernel/handlers.c	Mon Jan 16 21:38:55 2012 +0100
+++ b/cos/kernel/handlers.c	Tue Jan 24 17:54:16 2012 +0100
@@ -1,43 +1,43 @@
 #include "kernel.h"
 
 // Assembler wrapper prototypes:
-void INT255(void);
-void INT0(void);
-void INT1(void);
-void INT2(void);
-void INT3(void);
-void INT4(void);
-void INT5(void);
-void INT6(void);
-void INT7(void);
-void INT8(void);
-void INT9(void);
-void INT10(void);
-void INT11(void);
-void INT12(void);
-void INT13(void);
-void INT14(void);
-void INT16(void);
-void INT17(void);
-void INT18(void);
-void INT19(void);
+extern void INT255(void);
+extern void INT0(void);
+extern void INT1(void);
+extern void INT2(void);
+extern void INT3(void);
+extern void INT4(void);
+extern void INT5(void);
+extern void INT6(void);
+extern void INT7(void);
+extern void INT8(void);
+extern void INT9(void);
+extern void INT10(void);
+extern void INT11(void);
+extern void INT12(void);
+extern void INT13(void);
+extern void INT14(void);
+extern void INT16(void);
+extern void INT17(void);
+extern void INT18(void);
+extern void INT19(void);
 // Remapped irq assembler wrappers:
-void INT32(void);
-void INT33(void);
-void INT34(void);
-void INT35(void);
-void INT36(void);
-void INT37(void);
-void INT38(void);
-void INT39(void);
-void INT40(void);
-void INT41(void);
-void INT42(void);
-void INT43(void);
-void INT44(void);
-void INT45(void);
-void INT46(void);
-void INT47(void);
+extern void INT32(void);
+extern void INT33(void);
+extern void INT34(void);
+extern void INT35(void);
+extern void INT36(void);
+extern void INT37(void);
+extern void INT38(void);
+extern void INT39(void);
+extern void INT40(void);
+extern void INT41(void);
+extern void INT42(void);
+extern void INT43(void);
+extern void INT44(void);
+extern void INT45(void);
+extern void INT46(void);
+extern void INT47(void);
 
 // THE interrupt descriptor table:
 IDT_entry *idt = (IDT_entry*)0x5000;
@@ -184,8 +184,8 @@
    panic("No resolution to page fault!");
 
 }
+
 // Global isr handler:
-
 // Hopefully, this function get called with the correct registers.
 void isr_handler(uint64_t* registers)
 {
@@ -223,30 +223,3 @@
    outb(0x20, 0x20); // EOI to master
 }
 
-// Interrupt service routines:
-
-void INT14handler()
-{
-  uint64_t faulting_address;
-
-  printf("Segfault!\n");
-
-  // Retrieve failed page from CR2:
-  asm volatile("mov %%cr2, %0" : "=r" (faulting_address));
-
-  printf("INT14 called! Page fault for address 0x%X!\n", faulting_address);
-
-  panic("Unhandled exception!");
-}
-
-void INT15handler() 
-{
-  printf("INT15 called!\n");
-  panic("Unhandled exception!");
-}
-
-void INTDEF_handler() 
-{
-  panic("Default int handler called\n");
-}
-