aboutsummaryrefslogtreecommitdiff
path: root/sys/include/arch/amd64/lapicvar.h
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2023-12-25 14:57:12 -0500
committerIan Moffett <ian@osmora.org>2023-12-25 14:57:12 -0500
commit6f5aba866f01f5690438309629e96812fc099414 (patch)
tree9cfd2a927d2ce676c65fca4dd12f902700cb2817 /sys/include/arch/amd64/lapicvar.h
parent8e559cbb41d696eb119c5daccd33670ebb5207c3 (diff)
kernel/amd64: lapic: Add initial LAPIC Timer logic
The commit adds the initial Local APIC timer support in Hyra... However, the interrupt service routine is a stub and needs to be completed. Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys/include/arch/amd64/lapicvar.h')
-rw-r--r--sys/include/arch/amd64/lapicvar.h17
1 files changed, 5 insertions, 12 deletions
diff --git a/sys/include/arch/amd64/lapicvar.h b/sys/include/arch/amd64/lapicvar.h
index aad9fa8..43c89a6 100644
--- a/sys/include/arch/amd64/lapicvar.h
+++ b/sys/include/arch/amd64/lapicvar.h
@@ -90,18 +90,11 @@
/* LVT bits */
#define LAPIC_LVT_MASK __BIT(16)
+#define LVT_TMR_ONESHOT 0x00
+#define LVT_TMR_PERIODIC 0x01
+#define LVT_TMR_TSC_DEADLINE 0x02
-/*
- * Local APIC Interrupt stack [IST VALUE].
- *
- * This value should be non-zero and reserved
- * for only 1 interrupt vector to prevent clobbering
- * of the interrupt stacks.
- *
- * XXX TODO: The value is currently 0, however, this needs
- * to be updated to a non-zero value as soon as
- * possible.
- */
-#define LAPIC_TMR_INTSTACK 0
+/* LAPIC timer interrupt stack size in bytes */
+#define LAPIC_TMR_STACKSZ 4096
#endif /* !_AMD64_LAPICVAR_H_ */