]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
i386/i386/tsc.c was repo-copied from i386/isa/clock.c.
authorPoul-Henning Kamp <phk@FreeBSD.org>
Wed, 5 Feb 2003 09:20:40 +0000 (09:20 +0000)
committerPoul-Henning Kamp <phk@FreeBSD.org>
Wed, 5 Feb 2003 09:20:40 +0000 (09:20 +0000)
commitd1b40f007dd10a128b919e41538b693865a8c1de
tree7a03b09b03484b4fef54f0c9e866e483e387f54a
parente25cc93fa6d9b2988aeea33605bc28e068742ad4
i386/i386/tsc.c was repo-copied from i386/isa/clock.c.

Remove all the stuff that does not relate to the TSC.

Change the calibration to use DELAY(1000000) rather than trying to check
it against the CMOS RTC, this drastically increases precision:

Using 25 samples on a Athlon 700MHz UP machine I find:

                stddev          min          max        average
CMOS             22200 Hz    -74980 Hz     34301 Hz   704928721 Hz
DELAY             1805 Hz     -1984 Hz      2678 Hz   704937583 Hz

(The difference between the two averages is not statistically significant.)

expressed in PPM of the frequency:
                stddev          min          max
CMOS             31.49 PPM  -106.37 PPM    48.66 PPM
DELAY             2.56 PPM     2.81 PPM     3.80 PPM

This code will not be used until a followup commit to sys/isa/clock.c
and sys/pc98/pc98/clock.c which will only happen after some field testing.
sys/amd64/amd64/tsc.c
sys/amd64/include/clock.h
sys/i386/i386/tsc.c
sys/i386/include/clock.h