Project

General

Profile

Actions

Bug #13961

closed

Add HPET as a TSC calibration source

Added by Jason King 10 months ago. Updated 8 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
kernel
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

With #13354 nearing completion, to support platforms that don't have a TSC (such as the latest generation Intel NUCs), we should support using the HPET to calibrate the TSC.

The HPET is present on most (if not all) modern x86 systems, and the specification requires a minimum frequency of 10Mhz -- roughly 10x the frequency of the PIT. As part of this change, the HPET will be used (when present) in preference to the PIT. Any system without a PIT will fallback to using the PIT a today.

Additionally, the HPET code has to move out of the PSMs so it can be used during startup. Currently the HPET initialization enabled the HPET as well as enables interrupts. Because the APIC isn't initialized until the PSM is loaded, the HPET initialization is split into two pieces.

The first portion executes during the early boot and enables enough of the HPET that it can begin counting down (when programmed). The remainder of the HPET initialization is performed (including interrupts) at the point where HPET initialization occurs today.


Related issues

Related to illumos gate - Bug #13354: illumos should calibrate the TSC earlier in the boot process.ClosedJason King

Actions
Related to illumos gate - Bug #14554: TSC calibration is the PITsClosedJoshua M. Clulow

Actions
Related to illumos gate - Bug #14556: TSC calibration from HPET includes too much errorNewJoshua M. Clulow

Actions
Actions

Also available in: Atom PDF