From 038604b5878696c8c78567e4d52d2e33638f9cc5 Mon Sep 17 00:00:00 2001 From: Pawel Wieczorkiewicz Date: Mon, 19 Oct 2020 17:00:56 +0200 Subject: [PATCH] apic: add APIC EOI interface Signed-off-by: Pawel Wieczorkiewicz --- include/arch/x86/apic.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/arch/x86/apic.h b/include/arch/x86/apic.h index 65b48e99..fe4fd3c2 100644 --- a/include/arch/x86/apic.h +++ b/include/arch/x86/apic.h @@ -39,6 +39,7 @@ /* Local APIC definitions */ #define APIC_ID 0x020 #define APIC_LVR 0x030 +#define APIC_EOI 0x0b0 #define APIC_SPIV 0x0f0 #define APIC_SPIV_APIC_ENABLED 0x00100 @@ -59,6 +60,8 @@ #define GET_SIPI_VECTOR(addr) ((_ul((addr)) >> PAGE_SHIFT) & 0xFF) +#define APIC_EOI_SIGNAL 0x0 + #ifndef __ASSEMBLY__ enum apic_mode { @@ -129,6 +132,8 @@ static inline void apic_wait_ready(void) { cpu_relax(); } +static inline void apic_EOI(void) { apic_write(APIC_EOI, APIC_EOI_SIGNAL); } + #endif /* __ASSEMBLY__ */ #endif /* KTF_APIC_H */