Page MenuHomeFreeBSD

Use CPUID leaf 0x40000010 for local APIC freq
ClosedPublic

Authored by cperciva on Jan 14 2022, 6:32 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Nov 30, 2:53 PM
Unknown Object (File)
Nov 18 2025, 11:46 PM
Unknown Object (File)
Nov 18 2025, 11:34 PM
Unknown Object (File)
Nov 18 2025, 11:34 PM
Unknown Object (File)
Nov 18 2025, 11:34 PM
Unknown Object (File)
Nov 12 2025, 10:53 AM
Unknown Object (File)
Nov 10 2025, 6:09 PM
Unknown Object (File)
Nov 2 2025, 1:55 AM
Subscribers

Details

Reviewers
markj
Summary

Some VM systems announce the frequency of the local APIC via the
CPUID leaf 0x40000010. Using this allows us to boot slightly
faster by avoiding the need for timer calibration.

Sponsored by: https://www.patreon.com/cperciva

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 43934
Build 40822: arc lint + arc unit

Event Timeline

sys/x86/x86/local_apic.c
1017

Can this multiplication overflow? I suspect value should be uint64_t too.

sys/x86/x86/local_apic.c
1017

Thanks, fixed!

This revision is now accepted and ready to land.Jan 14 2022, 11:27 PM

Committed. (I forgot to include the Differential Revision tag in the commit message.)