00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef __KINT_H
00019 #define __KINT_H
00020
00021 #include "common/ktypes.h"
00022
00023 #define DIVIDE_ERROR 0
00024 #define DEBUG_EXCEPTION 1
00025 #define NMI 2
00026 #define INT3 3
00027 #define INTO 4
00028 #define BOUND_EXCEPTION 5
00029 #define INVALID_OPCODE 6
00030 #define NO_COPROCESSOR 7
00031 #define DOUBLE_FAULT 8
00032 #define CO_PROCESSOR_SEG_OVERRUN 9
00033 #define BAD_TSS 10
00034 #define SEG_NOT_PRESENT 11
00035 #define STACK_FAULT 12
00036 #define GPF 13
00037 #define PAGE_FAULT 14
00038 #define RESERVED 15
00039 #define CO_PROCESSOR_ERROR 16
00040 #define ALIGNMENT_CHECK 17
00041
00042 #define FLOPPY_INT 0x26
00043
00044 #define sti() __asm__ __volatile__ ("sti");
00045 #define cli() __asm__ __volatile__ ("cli");
00046
00047 typedef struct
00048 {
00049 DD edi, esi, ebp, esp, ebx, edx, ecx, eax;
00050 DD ds, es, fs, gs;
00051 DD which_int;
00052 DD _ss, _esp;
00053 DD err_code, eip, cs, eflags, user_esp, user_ss;
00054
00055 } REGS;
00056
00057
00058 extern DW floppy_int_pending;
00059 extern DB which_int;
00060
00061 void fault(REGS *regs);
00062
00063 void handle_timer();
00064 void handle_KBD();
00065 void eoi();
00066
00067 #endif