summaryrefslogtreecommitdiffstats
path: root/sys/i386/include
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2003-09-10 01:07:04 +0000
committerjhb <jhb@FreeBSD.org>2003-09-10 01:07:04 +0000
commit16813b69977310dc2533b60862f5e68f7e19e983 (patch)
tree90ea25ec88f9daad93e8c3cb1af55a4653f71050 /sys/i386/include
parent2bba7f535951f7aa2ad42629ab3c624b9a84fafa (diff)
downloadFreeBSD-src-16813b69977310dc2533b60862f5e68f7e19e983.zip
FreeBSD-src-16813b69977310dc2533b60862f5e68f7e19e983.tar.gz
Add constants for entries in the IDT and use those instead of magic
numbers.
Diffstat (limited to 'sys/i386/include')
-rw-r--r--sys/i386/include/segments.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/sys/i386/include/segments.h b/sys/i386/include/segments.h
index 95117da..1877b07 100644
--- a/sys/i386/include/segments.h
+++ b/sys/i386/include/segments.h
@@ -181,6 +181,30 @@ struct region_descriptor {
#define NRSVIDT 32 /* reserved entries for cpu exceptions */
/*
+ * Entries in the Interrupt Descriptor Table (IDT)
+ */
+#define IDT_DE 0 /* #DE: Divide Error */
+#define IDT_DB 1 /* #DB: Debug */
+#define IDT_NMI 2 /* Nonmaskable External Interrupt */
+#define IDT_BP 3 /* #BP: Breakpoint */
+#define IDT_OF 4 /* #OF: Overflow */
+#define IDT_BR 5 /* #BR: Bound Range Exceeded */
+#define IDT_UD 6 /* #UD: Undefined/Invalid Opcode */
+#define IDT_NM 7 /* #NM: No Math Coprocessor */
+#define IDT_DF 8 /* #DF: Double Fault */
+#define IDT_FPUGP 9 /* Coprocessor Segment Overrun */
+#define IDT_TS 10 /* #TS: Invalid TSS */
+#define IDT_NP 11 /* #NP: Segment Not Present */
+#define IDT_SS 12 /* #SS: Stack Segment Fault */
+#define IDT_GP 13 /* #GP: General Protection Fault */
+#define IDT_PF 14 /* #PF: Page Fault */
+#define IDT_MF 16 /* #MF: FPU Floating-Point Error */
+#define IDT_AC 17 /* #AC: Alignment Check */
+#define IDT_MC 18 /* #MC: Machine Check */
+#define IDT_XF 19 /* #XF: SIMD Floating-Point Exception */
+#define IDT_SYSCALL 0x80 /* System Call Interrupt Vector */
+
+/*
* Entries in the Global Descriptor Table (GDT)
*/
#define GNULL_SEL 0 /* Null Descriptor */
OpenPOWER on IntegriCloud