On Wed, Jun 26, 2013 at 08:37:35PM -0400, Christos Zoulas wrote:
> Module Name:  src
> Committed By: christos
> Date:         Thu Jun 27 00:37:35 UTC 2013
> 
> Modified Files:
>       src/sys/arch/x86/x86: tsc.c
> 
> Log Message:
> detect a bad msr tsc and don't use it.

+       tsc_good = (cpu_feature[0] & CPUID_MSR) != 0 && rdmsr(MSR_TSC) != 0;

There is a very small chance that the TSC will read as zero.
So the check should probably be:
        tsc_good = (cpu_feature[0] & CPUID_MSR) != 0 &&
            (rdmsr(MSR_TSC) != 0 || rdmsr(MSR_TSC) != 0);

The:
+extern int cpu_msr_tsc;
looks bogus - debug ??

        David

-- 
David Laight: da...@l8s.co.uk

Reply via email to