summaryrefslogtreecommitdiff
path: root/arch/x86/machine/trap.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/machine/trap.h')
-rw-r--r--arch/x86/machine/trap.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/arch/x86/machine/trap.h b/arch/x86/machine/trap.h
index f8d0a16f..699f19e7 100644
--- a/arch/x86/machine/trap.h
+++ b/arch/x86/machine/trap.h
@@ -77,6 +77,7 @@
#include <stdint.h>
#include <stdio.h>
+#include <kern/init.h>
#include <kern/macros.h>
#ifdef __LP64__
@@ -144,11 +145,6 @@ trap_trigger_double_fault(void)
}
/*
- * Set up the trap module.
- */
-void trap_setup(void);
-
-/*
* Unified trap entry point.
*/
void trap_main(struct trap_frame *frame);
@@ -177,6 +173,13 @@ void trap_stack_show(struct trap_frame *frame);
*/
void * trap_get_interrupt_stack(const struct trap_frame *frame);
+/*
+ * This init operation provides :
+ * - initialization of all IDT entries and trap handlers
+ * - double fault exception support
+ */
+INIT_OP_DECLARE(trap_setup);
+
#endif /* __ASSEMBLER__ */
#endif /* _X86_TRAP_H */