kernel/x86: Avoid using any initial values in APIC timer registers.

We should just be zeroing any unknown bits, not trying to preserve them.
If the BIOS or other mechanisms left the timer in some other mode
besides "one-shot" like we need, then we might incorrectly preserve
those bits.

This also has the advantage of avoiding config reads in set_hardware_timer.
This commit is contained in:
Augustin Cavalier
2026-05-21 15:01:17 -04:00
parent faa27a36dd
commit 5dfc0663d5
2 changed files with 29 additions and 38 deletions
-3
View File
@@ -68,9 +68,6 @@
/* Local Vector Table defines */
#define APIC_LVT_MASKED (1 << 16)
// timer defines
#define APIC_LVT_TIMER_MASK 0xfffcef00
// LINT0/1 defines
#define APIC_LVT_LINT_MASK 0xfffe0800
#define APIC_LVT_LINT_INPUT_POLARITY (1 << 13)