Project

General

Profile

Bug #13961

Updated by Jason King 8 months ago

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.

Back