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
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
Unknown Object (File)
Dec 10 2024, 7:19 PM
Unknown Object (File)
Nov 28 2024, 11:22 AM
Unknown Object (File)
Nov 25 2024, 12:50 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