-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathidt.h
47 lines (43 loc) · 1.51 KB
/
idt.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#ifndef IDT_H
#define IDT_H
void init_idt();
// 0 - Division by zero exception
// 1 - Debug exception
// 2 - Non maskable interrupt
// 3 - Breakpoint exception
// 4 - 'Into detected overflow'
// 5 - Out of bounds exception
// 6 - Invalid opcode exception
// 7 - No coprocessor exception
// 8 - Double fault (pushes an error code)
// 9 - Coprocessor segment overrun
// 10 - Bad TSS (pushes an error code)
// 11 - Segment not present (pushes an error code)
// 12 - Stack fault (pushes an error code)
// 13 - General protection fault (pushes an error code)
// 14 - Page fault (pushes an error code)
// 15 - Unknown interrupt exception
// 16 - Coprocessor fault
// 17 - Alignment check exception
// 18 - Machine check exception
// 19-31 - Reserved
#define DIVISION_BY_ZERO 0
#define DEBUG_EXCEPTION 1
#define NON_MASKABLE_INTERRUPT 2
#define BREAKPOINT_EXCEPTION 3
#define INTO_DETECTED_OVERFLOW 4
#define OUT_OF_BOUNDS_EXCEPTION 5
#define INVALID_OPCODE_EXCEPTION 6
#define NO_COPROCESSOR_EXCEPTION 7
#define DOUBLE_FAULT 8
#define COPROCESSOR_SEGMENT_OVERRUN 9
#define BAD_TSS 10
#define SEGMENT_NOT_PRESENT 11
#define STACK_FAULT 12
#define GENERAL_PROTECTION_FAULT 13
#define PAGE_FAULT 14
#define UNKNOWN_INTERRUPT_EXCEPTION 15
#define COPROCESSOR_FAULT 16
#define ALIGNMENT_CHECK_EXCEPTION 17
#define MACHINE_CHECK_EXCEPTION 18
#endif