HomeFreeBSD

x86: Defer early TSC timecounter calibration to SI_SUB_CPU

Description

x86: Defer early TSC timecounter calibration to SI_SUB_CPU

If we can't determine the TSC frequency using CPU registers, we need to
give a chance for Hyper-V drivers to register a timecounter (during
SI_SUB_HYPERVISOR) since an emulated 8254 might not be available.
Thus, split probe_tsc_freq() into early and late stages, and wait until
the latter to attempt calibration using a reference clock.

Fixes: 84369dd52369 ("x86: Probe the TSC frequency earlier")
Reported and tested by: khng, Shawn Webb
Sponsored by: The FreeBSD Foundation

(cherry picked from commit 075e2779aca7cbd8f201ce0e1bb60318d0cbd8b8)

Details

Provenance
markjAuthored on Mar 5 2022, 12:34 AM
Parents
rGae95c02d02c2: amd64: Call clock_init() after finishidentcpu()
Branches
Unknown
Tags
Unknown