1 #ifndef __IDT_TEST__ 2 #define __IDT_TEST__ 3 4 void setup_idt(void); 5 6 #define ASM_TRY(catch) \ 7 "movl $0, %%gs:4 \n\t" \ 8 ".pushsection .data.ex \n\t" \ 9 ".quad 1111f, " catch "\n\t" \ 10 ".popsection \n\t" \ 11 "1111:" 12 13 #define UD_VECTOR 6 14 #define GP_VECTOR 13 15 16 unsigned exception_vector(void); 17 unsigned exception_error_code(void); 18 void set_idt_entry(int vec, void *addr, int dpl); 19 20 #endif 21