diff --git a/cpu/x86/cpu.c b/cpu/x86/cpu.c index 9e4707856..d3e5fef84 100644 --- a/cpu/x86/cpu.c +++ b/cpu/x86/cpu.c @@ -30,10 +30,23 @@ #include "gdt.h" #include "idt.h" +#include "interrupt.h" +#include "helpers.h" +static void +double_fault_handler(struct interrupt_context context) +{ + halt(); +} +/*---------------------------------------------------------------------------*/ void cpu_init(void) { gdt_init(); idt_init(); + + /* Set an interrupt handler for Double Fault exception. This way, we avoid + * the system to triple fault, leaving no trace about what happened. + */ + SET_INTERRUPT_HANDLER(8, 1, double_fault_handler); }