Introducing LunaBuild to the build flow (#36)
[lunaix-os.git] / lunaix-os / scripts / templates / i386 / i386_isrdef.c.j2
diff --git a/lunaix-os/scripts/templates/i386/i386_isrdef.c.j2 b/lunaix-os/scripts/templates/i386/i386_isrdef.c.j2
deleted file mode 100644 (file)
index 936263f..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-/* Generated from {{ data["template"] }}. Do NOT modify */
-
-#include "i386_intr.h"
-#include <lunaix/types.h>
-
-#define IDT_INTERRUPT 0x70
-#define KERNEL_CS 0x8
-#define IDT_ATTR(dpl, type) (((type) << 5) | ((dpl & 3) << 13) | (1 << 15))
-#define IDT_ENTRY 256
-
-#define DECLARE_ISR(iv) extern void _asm_isr##iv();
-
-#define ISR_INSTALL(idt, iv, isr, dpl)                                   \
-    _idt[iv] = ((ptr_t)isr & 0xffff0000) | IDT_ATTR(dpl, IDT_INTERRUPT); \
-    _idt[iv] <<= 32;                                                     \
-    _idt[iv] |= (KERNEL_CS << 16) | ((ptr_t)isr & 0x0000ffff);           \
-
-u64_t _idt[IDT_ENTRY];
-u16_t _idt_limit = sizeof(_idt) - 1;
-
-{% for isrdef in data["exception"]["ivdefs"] -%}
-    DECLARE_ISR({{ isrdef["iv"] }})
-{% endfor %}
-
-void
-exception_install_handler()
-{
-{% for isrdef in data["exception"]["ivdefs"] %}
-    ISR_INSTALL(_idt, {{ isrdef["iv"] }}, _asm_isr{{ isrdef["iv"] }}, {{ isrdef["dpl"] }})
-{% endfor %}
-}
\ No newline at end of file