Page MenuHomeFreeBSD

x86: Perform late TSC calibration before LAPIC timer calibration
ClosedPublic

Authored by markj on Dec 1 2021, 12:45 PM.
Tags
None
Referenced Files
F98767942: D33209.diff
Fri, Oct 4, 4:18 PM
Unknown Object (File)
Wed, Sep 25, 3:31 PM
Unknown Object (File)
Wed, Sep 25, 6:37 AM
Unknown Object (File)
Tue, Sep 24, 5:25 PM
Unknown Object (File)
Tue, Sep 24, 6:25 AM
Unknown Object (File)
Tue, Sep 24, 5:02 AM
Unknown Object (File)
Tue, Sep 24, 2:51 AM
Unknown Object (File)
Mon, Sep 23, 8:34 PM
Subscribers
None

Details

Summary

This ensures that LAPIC calibration is done using the correct tsc_freq
value, i.e., the one associated with the TSC timecounter. It does mean
though that TSC calibration cannot use sbinuptime() to read the
reference timecounter, as timehands are not yet set up.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

markj requested review of this revision.Dec 1 2021, 12:45 PM
markj created this revision.
kib added inline comments.
sys/x86/x86/tsc.c
718

Perhaps add a comment explaining why do you directly use tc_get_timecount(), instead of only saying it in the commit message.

This revision is now accepted and ready to land.Dec 1 2021, 1:28 PM

Explain why we read the timecounter directly.

This revision now requires review to proceed.Dec 1 2021, 1:59 PM
This revision is now accepted and ready to land.Dec 1 2021, 7:36 PM