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.
This commit is contained in:
Poul-Henning Kamp 2003-02-05 09:20:40 +00:00
parent e25cc93fa6
commit d1b40f007d
4 changed files with 40 additions and 2376 deletions

File diff suppressed because it is too large Load Diff

View File

@ -45,6 +45,7 @@ int release_timer1(void);
#endif
int sysbeep(int pitch, int period);
void timer_restore(void);
void init_TSC(void);
#endif /* _KERNEL */

File diff suppressed because it is too large Load Diff

View File

@ -45,6 +45,7 @@ int release_timer1(void);
#endif
int sysbeep(int pitch, int period);
void timer_restore(void);
void init_TSC(void);
#endif /* _KERNEL */