From d5381223cea600ff007069bc1313de142cd06972 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Sat, 8 Jun 2024 18:13:42 -0400 Subject: kernel/amd64: lapic: Add End-Of-Interrupt helper Signed-off-by: Ian Moffett --- sys/arch/amd64/amd64/lapic.c | 10 ++++++++++ sys/include/arch/amd64/lapic.h | 1 + 2 files changed, 11 insertions(+) (limited to 'sys') diff --git a/sys/arch/amd64/amd64/lapic.c b/sys/arch/amd64/amd64/lapic.c index 07a9a49..b7cefd4 100644 --- a/sys/arch/amd64/amd64/lapic.c +++ b/sys/arch/amd64/amd64/lapic.c @@ -284,6 +284,16 @@ lapic_timer_init(void) return freq; } +/* + * Indicates that the current interrupt is finished + * being serviced. + */ +void +lapic_eoi(void) +{ + lapic_writel(LAPIC_EOI, 0); +} + void lapic_init(void) { diff --git a/sys/include/arch/amd64/lapic.h b/sys/include/arch/amd64/lapic.h index 8a6bb14..d06bcc9 100644 --- a/sys/include/arch/amd64/lapic.h +++ b/sys/include/arch/amd64/lapic.h @@ -33,6 +33,7 @@ #include void lapic_init(void); +void lapic_eoi(void); extern uintptr_t g_lapic_base; -- cgit v1.2.3