HomeFreeBSD

x86: Skip late calibration if our reference timer has low quality

Description

x86: Skip late calibration if our reference timer has low quality

Some AMD Geode-based systems end up using the 8254 PIT to calibrate the
TSC during late calibration, which doesn't work because that
timecounter's mask (65535) is much smaller than its frequency (1193182).
Moreover, early calibration is done against the 8254 timer anyway.

Work around the problem by simply using early calibration results if no
high-quality timecounters exist.

PR: 260868
Fixes: 22875f88799e ("x86: Implement deferred TSC calibration")
Reported and tested by: mike@sentex.net, Stefan Hegnauer <stefan.hegnauer@gmx.ch>
Reviewed by: imp, kib
Sponsored by: The FreeBSD Foundation

(cherry picked from commit 0e494a9e3fd86ef54899dcbe0268866629096c1e)

Details

Provenance
markjAuthored on Jan 3 2022, 3:14 PM
Parents
rG1d15c6b3e516: bhyve smbios type 3 structure is incorrect
Branches
Unknown
Tags
Unknown