summaryrefslogtreecommitdiff
path: root/sys/include/arch/amd64/intr.h
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2025-08-09 23:18:09 -0400
committerIan Moffett <ian@osmora.org>2025-08-10 00:10:36 -0400
commit0976eef35ab1c557238a87f253888a4d2dd1bf52 (patch)
treef712cc5515894a225d92c8b0dcb46d8ea7d9e046 /sys/include/arch/amd64/intr.h
parent5e46817ba95f4ca0cf11b10e8655b60b4137baef (diff)
kernel/amd64: Introduce flexible IPI management
This commit greatly improves the handling of how inter-processor interrupts are allocated and managed. Previously Hyra used handlers at fixed interrupt vectors for IPIs, however, that is very rigid and not very scalable at all. With the new IPI framework, one may allocate IPIs by calling 'md_ipi_alloc()' and initializing the handler field. To send an IPI to a specific processor, one can use cpu_ipi_send() and pass the specific CPU structure as well as the IPI identifier. 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.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/include/arch/amd64/intr.h b/sys/include/arch/amd64/intr.h
index 3870f18..6d9bb09 100644
--- a/sys/include/arch/amd64/intr.h
+++ b/sys/include/arch/amd64/intr.h
@@ -48,6 +48,9 @@
#define IPL_CLOCK 2 /* Clock */
#define IPL_HIGH 3 /* Defer everything */
+#define N_IPIVEC 4 /* Number of vectors reserved for IPIs */
+#define IPI_PER_VEC 16 /* Max IPIs per vector */
+
struct intr_hand;
/*