From 9113fa42e6794e39d7233e17e8106f677ad04d94 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Sat, 29 Jun 2024 18:38:13 -0400 Subject: kernel/amd64: lapic: Add support for IPIs Signed-off-by: Ian Moffett --- sys/include/arch/amd64/lapic.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'sys/include') diff --git a/sys/include/arch/amd64/lapic.h b/sys/include/arch/amd64/lapic.h index d06bcc9..3b06206 100644 --- a/sys/include/arch/amd64/lapic.h +++ b/sys/include/arch/amd64/lapic.h @@ -30,10 +30,20 @@ #ifndef _MACHINE_LAPIC_H_ #define _MACHINE_LAPIC_H_ +#include #include +#define IPI_SHORTHAND_NONE 0x00 +#define IPI_SHORTHAND_SELF 0x01 +#define IPI_SHORTHAND_ALL 0x02 +#define IPI_SHORTHAND_OTHERS 0x03 + +#define IPI_DEST_PHYSICAL 0 +#define IPI_DEST_LOGICAL BIT(11) + void lapic_init(void); void lapic_eoi(void); +void lapic_send_ipi(uint8_t id, uint8_t shorthand, uint8_t vector); extern uintptr_t g_lapic_base; -- cgit v1.2.3