View | Details | Raw Unified | Return to bug 240475
Collapse All | Expand All

(-)sys/x86/x86/tsc.c (-1 / +8 lines)
Lines 146-153 Link Here
146
	if (cpu_high < 0x15)
146
	if (cpu_high < 0x15)
147
		return (false);
147
		return (false);
148
	do_cpuid(0x15, regs);
148
	do_cpuid(0x15, regs);
149
	if (regs[0] == 0 || regs[1] == 0 || regs[2] == 0)
149
	if (regs[0] == 0 || regs[1] == 0 || regs[2] == 0) {
150
		if (cpu_high >= 0x16) {
151
			u_int freq_regs[4];
152
			do_cpuid(0x16, freq_regs);
153
			tsc_freq = (uint64_t) freq_regs[0] * 1000000;
154
			return (true);
155
		}
150
		return (false);
156
		return (false);
157
	}
151
	tsc_freq = (uint64_t)regs[2] * regs[1] / regs[0];
158
	tsc_freq = (uint64_t)regs[2] * regs[1] / regs[0];
152
	return (true);
159
	return (true);
153
}
160
}

Return to bug 240475