aboutsummaryrefslogtreecommitdiff
path: root/sys/include/arch/amd64
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2023-12-13 12:40:56 -0500
committerIan Moffett <ian@osmora.org>2023-12-13 12:40:56 -0500
commit9eb956111bed4f414345f936af83395044f719b0 (patch)
tree8ceb9253566878028d2e59b06dd9463b7908d4a9 /sys/include/arch/amd64
parent8c4d369672ef824237895b42c9a1ab93fb32cc2e (diff)
kernel/amd64: trap: Add TRAP_NONE define
This commit introduces the trap type TRAP_NONE to allow for general interrupts as they also use the `trap_frame' but are not interrupts that will occur during instruction execution. Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys/include/arch/amd64')
-rw-r--r--sys/include/arch/amd64/trap.h23
1 files changed, 12 insertions, 11 deletions
diff --git a/sys/include/arch/amd64/trap.h b/sys/include/arch/amd64/trap.h
index 8574929..8cd7ca1 100644
--- a/sys/include/arch/amd64/trap.h
+++ b/sys/include/arch/amd64/trap.h
@@ -35,17 +35,18 @@
#include <machine/frame.h>
#endif /* !defined(__ASSEMBLER__) */
-#define TRAP_BREAKPOINT 0 /* Breakpoint */
-#define TRAP_ARITH_ERR 1 /* Arithmetic error (e.g division by 0) */
-#define TRAP_OVERFLOW 2 /* Overflow */
-#define TRAP_BOUND_RANGE 3 /* BOUND range exceeded */
-#define TRAP_INVLOP 4 /* Invalid opcode */
-#define TRAP_DOUBLE_FAULT 5 /* Double fault */
-#define TRAP_INVLTSS 6 /* Invalid TSS */
-#define TRAP_SEGNP 7 /* Segment not present */
-#define TRAP_PROTFLT 8 /* General protection */
-#define TRAP_PAGEFLT 9 /* Page fault */
-#define TRAP_NMI 10 /* Non-maskable interrupt */
+#define TRAP_NONE 0 /* Used for general interrupts */
+#define TRAP_BREAKPOINT 1 /* Breakpoint */
+#define TRAP_ARITH_ERR 2 /* Arithmetic error (e.g division by 0) */
+#define TRAP_OVERFLOW 3 /* Overflow */
+#define TRAP_BOUND_RANGE 4 /* BOUND range exceeded */
+#define TRAP_INVLOP 5 /* Invalid opcode */
+#define TRAP_DOUBLE_FAULT 6 /* Double fault */
+#define TRAP_INVLTSS 7 /* Invalid TSS */
+#define TRAP_SEGNP 8 /* Segment not present */
+#define TRAP_PROTFLT 9 /* General protection */
+#define TRAP_PAGEFLT 10 /* Page fault */
+#define TRAP_NMI 11 /* Non-maskable interrupt */
/* Trap is coming from user mode */
#define TRAP_USER 0x100