Port-i386 archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

rdmsr(MSR_TSC) vs rdtsc



Hello,
I have a i586 CPU where rdmsr(MSR_TSC) doesn't work but rdtsc does.
This is easily visible with cpu_get_tsc_freq(): with the current code
I get random values as cpu_cc_freq; if I remplace the calls to
rdmsr(MSR_TSC) with cpu_counter() I get the right frequency.

How could this be fixed ? I guess we'll have to use rdmsr(MSR_TSC)
or cpu_counter() depending on the CPU ?

The CPU is (with cpu_get_tsc_freq() using cpu_counter()):
cpu0: Vortex86 SoC (586-class), 1000.54 MHz, id 0x586
cpu0: features  0x800111<FPU,TSC,CX8,MMX> 
cpu0: Initial APIC ID 0
cpu0: family 05 model 08 extfamily 00 extmodel 00

-- 
Manuel Bouyer <bouyer%antioche.eu.org@localhost>
     NetBSD: 26 ans d'experience feront toujours la difference
--


Home | Main Index | Thread Index | Old Index