From 6b14f311077aa5121ec934c07e54b888a12cb727 Mon Sep 17 00:00:00 2001 From: Aiken Harris Date: Sat, 9 May 2026 13:13:30 +0200 Subject: [PATCH] Enable HPET main counter and disable legacy replacement during hardware detection --- xtoskrnl/hl/x86/timer.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/xtoskrnl/hl/x86/timer.cc b/xtoskrnl/hl/x86/timer.cc index 5c739a8..cb63f6c 100644 --- a/xtoskrnl/hl/x86/timer.cc +++ b/xtoskrnl/hl/x86/timer.cc @@ -190,6 +190,9 @@ HL::Timer::DetectHpet(VOID) HpetFrequency = 14318180; } + /* Enable the HPET main counter and disable legacy replacement */ + Hpet->GeneralConfiguration = (Hpet->GeneralConfiguration & ~HPET_CONFIG_LEGACY_REPLACEMENT) | HPET_CONFIG_ENABLE; + /* Return success */ return STATUS_SUCCESS; }