/* * Interrupt Service Routines */ #include "idt.h" #include "sys/control.h" #include __attribute__((interrupt)) void abort_handler(struct interrupt_frame *frame) { printf("### system abort ###\n"); printf("# ip: %x cs=%x\n", frame->ip, frame->cs); printf("# sp: %x ss=%x\n", frame->sp, frame->ss); printf("# flags: %x\n", frame->flags); abort(); } __attribute__((interrupt)) void syscall_handler(struct interrupt_frame *) { printf("syscall\n"); abort(); } void pic_clear(unsigned char irq); __attribute__((interrupt)) void irq0x00(struct interrupt_frame *) { pic_clear(0x00); } extern void ps2_keyboard_irq_handler(); __attribute__((interrupt)) void irq0x01(struct interrupt_frame *) { ps2_keyboard_irq_handler(); pic_clear(0x01); } __attribute__((interrupt)) void irq0x0c(struct interrupt_frame *) { printf("irq 0x0c\n"); pic_clear(0x0c); }