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)
Wed, Oct 15, 9:32 AM
Unknown Object (File)
Wed, Oct 8, 11:44 PM
Unknown Object (File)
Mon, Sep 22, 11:06 AM
Unknown Object (File)
Sep 18 2025, 1:22 AM
Unknown Object (File)
Aug 29 2025, 2:02 AM
Unknown Object (File)
Aug 25 2025, 9:04 AM
Unknown Object (File)
Aug 21 2025, 1:30 AM
Unknown Object (File)
Aug 15 2025, 12:09 AM
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