Create LICENSE
[lunaix-os.git] / lunaix-os / kernel / asm / x86 / intr_routines.c
index 8660df6bbd0889c8683aec07b30226521db6f1f1..f68b2ceeb80dec144b6b624f2a1a6809453c2b0d 100644 (file)
@@ -7,8 +7,12 @@
 
 #include <hal/apic.h>
 
 
 #include <hal/apic.h>
 
+LOG_MODULE("INTR")
 
 
-static void 
+extern void
+intr_routine_page_fault (const isr_param* param);
+
+void 
 __print_panic_msg(const char* msg, const isr_param* param) 
 {
     kprint_panic("  INT %u: (%x) [%p: %p] %s",
 __print_panic_msg(const char* msg, const isr_param* param) 
 {
     kprint_panic("  INT %u: (%x) [%p: %p] %s",
@@ -33,20 +37,6 @@ intr_routine_general_protection (const isr_param* param)
     spin();
 }
 
     spin();
 }
 
-void
-intr_routine_page_fault (const isr_param* param) 
-{
-    void* pg_fault_ptr = cpu_rcr2();
-    if (!pg_fault_ptr) {
-        __print_panic_msg("Null pointer reference", param);
-    } else {
-        char buf[32];
-        sprintf(buf, "Page fault on %p", pg_fault_ptr);
-        __print_panic_msg(buf, param);
-    }
-    spin();
-}
-
 void
 intr_routine_sys_panic (const isr_param* param) 
 {
 void
 intr_routine_sys_panic (const isr_param* param) 
 {