From 0d572ed18a504ccf7e0046d948f78451edc22df5 Mon Sep 17 00:00:00 2001 From: Richard Qin Date: Wed, 13 May 2026 16:18:15 +0800 Subject: feat: implement MI Timer Subsystem with initialization and tick handling --- na/include/lume/timer.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 na/include/lume/timer.h (limited to 'na/include') diff --git a/na/include/lume/timer.h b/na/include/lume/timer.h new file mode 100644 index 0000000..e7de2f1 --- /dev/null +++ b/na/include/lume/timer.h @@ -0,0 +1,24 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +/* Copyright (C) 2026 Richard Qin */ + +#pragma once + +#include + +/* + * MI Timer Subsystem + */ + +extern uint64 g_jiffies; + +// BSP global initialization +void timer_init(); + +// AP per-CPU initialization +void timer_init_ap(); + +// Handle timer interrupt tick (called from TrapHandler) +void timer_tick(); + +// Get configured timebase frequency +uint64 timer_get_freq(); -- cgit v1.2.3