mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-30 20:59:16 +00:00
Kernel: Fix APIC timer calibration to be more accurate
We were calibrating it to 260 instead of 250 ticks per second (being off by one for the 1/10th second calibration time), resulting in ticks of only ~3.6 ms instead of ~4ms. This gets us closer to ~4ms, but because the APIC isn't nearly as precise as e.g. HPET, it will only be a best effort. Then, use the higher precision reference timer to more accurately calculate how many ticks we actually get each second. Also the frequency calculation was off, causing a "Frequency too slow" error with VMware. Fixes some problems observed in #5539
This commit is contained in:
parent
f66adbdd95
commit
cdbd878a14
Notes:
sideshowbarker
2024-07-18 21:50:04 +09:00
Author: https://github.com/tomuta
Commit: cdbd878a14
Pull-request: https://github.com/SerenityOS/serenity/pull/5563
7 changed files with 64 additions and 23 deletions
|
@ -65,6 +65,9 @@ public:
|
|||
virtual void set_non_periodic() = 0;
|
||||
virtual void disable() = 0;
|
||||
virtual u32 frequency() const = 0;
|
||||
virtual bool can_query_raw() const { return false; }
|
||||
virtual u64 current_raw() const { return 0; }
|
||||
virtual u64 raw_to_ns(u64) const { return 0; }
|
||||
|
||||
virtual size_t ticks_per_second() const = 0;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue