summaryrefslogtreecommitdiff
path: root/sys/include/arch/amd64/intr.h
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2024-06-20 20:35:38 -0400
committerIan Moffett <ian@osmora.org>2024-06-20 20:37:07 -0400
commitf290314f286b70a8f59becedd5f789c21f675b5d (patch)
tree6e57e88ab2cf9580116a7ddcf68d505266380aee /sys/include/arch/amd64/intr.h
parentd8ba24147205e083a00ee76933cf047a8f8f5727 (diff)
kernel/amd64: intr: Add splraise/splx support
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys/include/arch/amd64/intr.h')
-rw-r--r--sys/include/arch/amd64/intr.h19
1 files changed, 18 insertions, 1 deletions
diff --git a/sys/include/arch/amd64/intr.h b/sys/include/arch/amd64/intr.h
index 3f0da77..af5edf2 100644
--- a/sys/include/arch/amd64/intr.h
+++ b/sys/include/arch/amd64/intr.h
@@ -36,6 +36,23 @@
#define IST_HW_IRQ 2U
#define IST_SW_INT 3U
-int intr_alloc_vector(void);
+/* Upper 4 bits of interrupt vector */
+#define IPL_SHIFT 4
+
+/*
+ * Interrupt priority levels
+ */
+#define IPL_NONE 0 /* Don't defer anything */
+#define IPL_BIO 1 /* Block I/O */
+#define IPL_CLOCK 2 /* Clock */
+#define IPL_HIGH 3 /* Defer everything */
+
+struct intr_entry {
+ int priority;
+};
+
+int intr_alloc_vector(const char *name, uint8_t priority);
+void splraise(uint8_t s);
+void splx(uint8_t s);
#endif