aboutsummaryrefslogtreecommitdiff
path: root/sys/include/arch/amd64/lapic.h
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2024-02-04 22:57:58 -0500
committerIan Moffett <ian@osmora.org>2024-02-04 22:58:32 -0500
commit2efd4670416be5bcc64782745b745d2183c8ca11 (patch)
treeacc5d76ce5af864086c156ce40a529b292ab368a /sys/include/arch/amd64/lapic.h
parent3d36c14c83e96370d423f65a8914dff196c3e10a (diff)
kernel/amd64: lapic: Add support for sending IPIs
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys/include/arch/amd64/lapic.h')
-rw-r--r--sys/include/arch/amd64/lapic.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/sys/include/arch/amd64/lapic.h b/sys/include/arch/amd64/lapic.h
index 6c72c02..b8fae1b 100644
--- a/sys/include/arch/amd64/lapic.h
+++ b/sys/include/arch/amd64/lapic.h
@@ -35,9 +35,23 @@
#define LAPIC_TMR_ONESHOT 0x00
#define LAPIC_TMR_PERIODIC 0x01
+/* IPI Destination Shorthands */
+enum {
+ IPI_SHORTHAND_SELF,
+ IPI_SHORTHAND_ALL,
+ IPI_SHORTHAND_OTHERS
+};
+
+/* IPI Destination Modes */
+enum {
+ IPI_DEST_PHYSICAL,
+ IPI_DEST_LOGICAL
+};
+
void lapic_timer_init(size_t *freq_out);
void lapic_timer_oneshot(bool mask, uint32_t count);
void lapic_timer_oneshot_us(uint32_t us);
+void lapic_send_ipi(uint8_t id, uint8_t shorthand, uint8_t vector);
void lapic_init(void);
#endif /* !_AMD64_LAPIC_H_ */