From d2bb1bd0f7ee62c5e9051db95df2916271c91105 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Mon, 26 Feb 2024 00:16:55 -0500 Subject: kernel/amd64: lapic: Add support for sending EOIs Signed-off-by: Ian Moffett --- sys/arch/amd64/amd64/lapic.c | 6 ++++++ sys/include/arch/amd64/lapic.h | 1 + 2 files changed, 7 insertions(+) (limited to 'sys') diff --git a/sys/arch/amd64/amd64/lapic.c b/sys/arch/amd64/amd64/lapic.c index c342844..a72e14e 100644 --- a/sys/arch/amd64/amd64/lapic.c +++ b/sys/arch/amd64/amd64/lapic.c @@ -309,6 +309,12 @@ lapic_send_ipi(uint8_t id, uint8_t shorthand, uint8_t vector) } } +void +lapic_send_eoi(void) +{ + lapic_writel(LAPIC_EOI, 0); +} + /* * Calibrates the Local APIC timer * diff --git a/sys/include/arch/amd64/lapic.h b/sys/include/arch/amd64/lapic.h index db27ad6..5ab810a 100644 --- a/sys/include/arch/amd64/lapic.h +++ b/sys/include/arch/amd64/lapic.h @@ -52,6 +52,7 @@ void lapic_timer_init(size_t *freq_out); void lapic_timer_oneshot(bool mask, uint32_t count); void lapic_timer_oneshot_us(size_t us); void lapic_send_ipi(uint8_t id, uint8_t shorthand, uint8_t vector); +void lapic_send_eoi(void); void lapic_init(void); #endif /* !_AMD64_LAPIC_H_ */ -- cgit v1.2.3