This lets us use the TSC to implement early DELAY on modern systems,
limiting the use of the sometimes-unreliable 8254 PIT.
PR: 262155
Differential D34367
x86: Probe the TSC frequency earlier markj on Feb 24 2022, 9:03 PM. Authored by Tags None Referenced Files
Details
This lets us use the TSC to implement early DELAY on modern systems, PR: 262155
Diff Detail
Event TimelineComment Actions If the concern is systems where the i8254 doesn't work, should we change tsc_freq_8254 to be more robust? Comment Actions On such systems we aren't using the 8254 to calibrate the TSC at all, we get the frequency, or something close to it, from CPUID leaves. The problem I want to address is that DELAY() (e.g., during atkbd probe) uses the 8254 timer until the (early) TSC frequency is known. I can't see any reason not to move early TSC calibration so that it happens even earlier. Comment Actions This addresses the long delay I experienced on the Framework laptop at the start of boot. Comment Actions If you're sure the combination of "broken i8254" and "old CPU" will never happen, sure.
Right, this definitely makes the situation better. If we do run into systems which combine older CPUs with broken i8254s we might want to change tsc_freq_8254 as well, but for now I think it's good to go ahead with this patch. |