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)
Mar 7 2024, 7:51 PM
Unknown Object (File)
Feb 29 2024, 3:57 AM
Unknown Object (File)
Feb 11 2024, 9:00 AM
Unknown Object (File)
Jan 25 2024, 10:57 AM
Unknown Object (File)
Dec 20 2023, 3:05 AM
Unknown Object (File)
Dec 12 2023, 10:27 AM
Unknown Object (File)
Nov 28 2023, 1:22 PM
Unknown Object (File)
Nov 25 2023, 8:26 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