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
Differential Revision: https://reviews.freebsd.org/D34444

Details

Provenance
markjAuthored on Mar 5 2022, 12:34 AM
Differential Revision
D34444: x86: Defer TSC timecounter calibration
Parents
rGf7a6dccf4266: amd64: Call clock_init() after finishidentcpu()
Branches
Unknown
Tags
Unknown