#include "interrupt.h"
#include <stdint.h>
+#include "intr-stubs.h"
#include "debug.h"
#include "io.h"
#include "lib.h"
\f
uint64_t idt[256];
-extern void (*intr_stubs[256]) (void);
-
intr_handler_func *intr_handlers[256];
-void intr_handler (struct intr_args *args);
+void intr_handler (struct intr_frame *args);
bool intr_in_progress;
bool yield_on_return;
void
-intr_handler (struct intr_args *args)
+intr_handler (struct intr_frame *args)
{
bool external;
}
void
-intr_unexpected (struct intr_args *regs)
+intr_unexpected (struct intr_frame *regs)
{
uint32_t cr2;
asm ("movl %%cr2, %0" : "=r" (cr2));
- printk ("Unexpected interrupt 0x%02x, error code %08x, cr2=%08x, eip=%08x\n",
- regs->vec_no, regs->error_code, cr2, regs->eip);
- for (;;);
+ panic ("Unexpected interrupt 0x%02x, error code %08x, cr2=%08x, eip=%p",
+ regs->vec_no, regs->error_code, cr2, (void *) regs->eip);
}