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
F108612707: D33209.diff
Sun, Jan 26, 9:31 PM
Unknown Object (File)
Sat, Jan 25, 7:38 PM
Unknown Object (File)
Sat, Jan 25, 7:36 PM
Unknown Object (File)
Fri, Jan 24, 5:17 AM
Unknown Object (File)
Wed, Jan 22, 2:37 PM
Unknown Object (File)
Sat, Jan 18, 9:17 PM
Unknown Object (File)
Sun, Jan 12, 2:42 AM
Unknown Object (File)
Thu, Jan 9, 9:54 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
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 43083
Build 39971: arc lint + arc unit

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