From 0976eef35ab1c557238a87f253888a4d2dd1bf52 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Sat, 9 Aug 2025 23:18:09 -0400 Subject: 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 --- sys/include/arch/amd64/intr.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'sys/include/arch/amd64/intr.h') 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; /* -- cgit v1.2.3