Page MenuHomeFreeBSD

x86: Fall back to leaf 0x16 if TSC frequency is obtained by CPUID and leaf 0x15 is not functional.
ClosedPublic

Authored by kib on Sep 24 2019, 10:22 AM.

Details

Summary

This should improve automatic TSC frequency determination on Skylake/Kabylake/... families, where 0x15 exists but does not provide all necessary information. SDM contains relatively strong wording against such uses of 0x16, but Intel does not give us any other way to obtain the frequency. Linux did the same in the commit 604dc9170f2435d27da5039a3efd757dceadc684

Based on submission by: Neel Chauhan <neel@neelc.org>
PR: 240475

Diff Detail

Repository
rS FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

kib created this revision.Sep 24 2019, 10:22 AM
markj accepted this revision.Sep 24 2019, 3:17 PM
markj added inline comments.
sys/x86/x86/tsc.c
139 ↗(On Diff #62499)

"the SDM"

140 ↗(On Diff #62499)

Should be "did not work".

This revision is now accepted and ready to land.Sep 24 2019, 3:17 PM