From 0527ef090e4a5ff2dd8dc32170d505c44ee015fa Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Tue, 18 Nov 2025 16:05:25 -0500 Subject: kern/amd64: lapic: Add Local APIC timer interface This commit adds an interface to perform a oneshot operation with the Local APIC timer as well as providing a stub interrupt service routine for it. Signed-off-by: Ian Moffett --- sys/inc/arch/amd64/lapic.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'sys/inc') diff --git a/sys/inc/arch/amd64/lapic.h b/sys/inc/arch/amd64/lapic.h index 35ba778..d22a560 100644 --- a/sys/inc/arch/amd64/lapic.h +++ b/sys/inc/arch/amd64/lapic.h @@ -31,6 +31,7 @@ #define _MACHINE_LAPIC_H_ 1 #include +#include #include #define LAPIC_TMR_VEC 0x81 @@ -90,6 +91,12 @@ struct lapic_ipi { uint8_t logical_dest : 1; }; +/* + * Put the local APIC timer in one shot mode and fire it + * off + */ +void lapic_oneshot_usec(struct mcb *mcb, size_t usec); + /* * Read the current local APIC id */ -- cgit v1.2.3