Kernel: Fix HPET interrupt routing

If the HPET did not support legacy routing we would still use IRQ0 which
lead to using PIT irq which fired ~18 times per second
This commit is contained in:
2026-06-26 00:56:33 +03:00
parent 5aea95129e
commit ac0ef53e87
5 changed files with 79 additions and 48 deletions

View File

@@ -12,7 +12,7 @@ namespace Kernel
class HPET final : public Timer, public Interruptable
{
public:
static BAN::ErrorOr<BAN::UniqPtr<HPET>> create(bool force_pic);
static BAN::ErrorOr<BAN::UniqPtr<HPET>> create();
~HPET();
virtual uint64_t ms_since_boot() const override;
@@ -26,7 +26,7 @@ namespace Kernel
private:
HPET() = default;
BAN::ErrorOr<void> initialize(bool force_pic);
BAN::ErrorOr<void> initialize();
volatile HPETRegisters& registers();
const volatile HPETRegisters& registers() const;

View File

@@ -31,7 +31,7 @@ namespace Kernel
class SystemTimer : public Timer
{
public:
static void initialize(bool force_pic);
static void initialize();
static SystemTimer& get();
static bool is_initialized();
@@ -57,7 +57,7 @@ namespace Kernel
private:
SystemTimer() = default;
void initialize_timers(bool force_pic);
void initialize_timers();
uint64_t get_tsc_frequency() const;