summaryrefslogtreecommitdiff
path: root/kernel/interrupts.h
diff options
context:
space:
mode:
authorMiguel <m.i@gmx.at>2018-09-26 11:12:18 +0200
committerMiguel <m.i@gmx.at>2018-09-26 11:12:18 +0200
commit915791f6acedbb35db73216156c1baa790e384d9 (patch)
tree203c1308309fac2a336686ca48f7fbd05013bdb1 /kernel/interrupts.h
parentae33cc6557790a502a01b380b0926944ca2f3cfa (diff)
claning up interrupts
Diffstat (limited to 'kernel/interrupts.h')
-rw-r--r--kernel/interrupts.h39
1 files changed, 16 insertions, 23 deletions
diff --git a/kernel/interrupts.h b/kernel/interrupts.h
index 344369d..b3b8a93 100644
--- a/kernel/interrupts.h
+++ b/kernel/interrupts.h
@@ -11,51 +11,44 @@
*
* Exceptions
* ----------
- * * 0x00-0x12 Exceptions
+ * * 0x00-0x20 Exceptions
*
* Legacy PIC
* ----------
* * 0x20-0x27 disabled pic
* * 0x28-0x36 disabled pic
*
- * Hardware Interrupts
+ * Software Interrupts / Ring 3
* -------------------
- * This interrupts are remapped by the IOAPIC
- *
- * * 0x0 PIT Timer -> 0x90
- * * 0x1 Keyboard -> 0x91
- * * 0xC Mouse -> 0x92
+ * * 0x80 System Call
*
- * Local Interrupts from LAPICs
- * ----------------------
- * * 0x8C APIC Timer
- *
- * Software Interrupts
+ * Hardware Interrupts / Ring 1
* -------------------
- * * 0x80 System Call
- * * 0x81 IPI
+ * * 0x81-0xA0
*
* Usage
* -----
*
- * Run interrupts_init() once first with the desired selector, usually 0x08.
- * After that you can install the interrupts on each cpu via interrupts_install.
+ * Run interrupts_init() ONCE first.
+ * After that you can install the interruptAs on each cpu via interrupts_install();
* interrupt_handler() and exception_handler() will be called accordingly from
* the interrupt handlers this functionality is backed by. You can find them
- * in asm_int.h
+ * in asm_int.h. The selector 0x08 is used.
*/
+#define INTERRUPT_SYSCALL 0x80 // can be called from user code / ring 3
+
+#define INTERRUPT_IPI 0x81 // ipi1 more might folllow
+
#define INTERRUPT_PIT_TIMER 0x90
#define INTERRUPT_KEYBOARD 0x91
#define INTERRUPT_MOUSE 0x92
#define INTERRUPT_E1000 0x93
+#define INTERRUPT_APIC_TIMER 0x94
-#define INTERRUPT_APIC_TIMER 0x8C
-#define INTERRUPT_SYSCALL 0x80
-#define INTERRUPT_IPI 0x81 // ipi1 more might folllow
-void interrupts_init(uint16_t sel);
-void interrupts_install();
-uint32_t interrupt_handler(uint32_t esp, uint32_t irq);
+void interrupts_init();
+void interrupts_install();
+void interrupt_handler_register(uint32_t irq, uint32_t func_addr);
#endif