1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 21:47:46 +00:00

Kernel: Create the time page region before initializing the timers

We were unconditionally trying to update it in the interrupt, which
would depend on the timer interrupt not being received too soon after
the timers are initialized (before the time page was initialized),
which was the case when using HPET timers via the ACPI tables, but not
when using the PIT when ACPI was disabled.
This commit is contained in:
Idan Horowitz 2022-01-18 10:46:42 +02:00
parent e09f74903e
commit 57ba67ed2a
2 changed files with 10 additions and 11 deletions

View file

@ -76,7 +76,7 @@ public:
Memory::VMObject& time_page_vmobject();
private:
TimePage* time_page();
TimePage& time_page();
void update_time_page();
bool probe_and_set_legacy_hardware_timers();
@ -108,7 +108,7 @@ private:
Atomic<u32> m_profile_enable_count { 0 };
RefPtr<HardwareTimerBase> m_profile_timer;
OwnPtr<Memory::Region> m_time_page_region;
NonnullOwnPtr<Memory::Region> m_time_page_region;
};
}