Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 Jul 1998 16:53:55 +1000
From:      Bruce Evans <bde@zeta.org.au>
To:        bde@zeta.org.au, jak@cetlink.net
Cc:        current@FreeBSD.ORG
Subject:   Re: tickadj -t not changing tick
Message-ID:  <199807160653.QAA24751@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>>machdep.i8254_freq: always exists, never hurts to set it right, but only
>>	essential for it to be right on systems using it for timekeeping
>>	(2.2., -current on sub-586's and 586+'s running SMP or APM.
>
>Sysctl shows my default value of machdep.i8254_freq = 1,193,182, the
>same value one of my hardware books says is the "standard" oscillator
>rate input to the 8254.  But since my clock runs fast, my oscillator
>seems to be at a slightly higher rate.  So am I correct in assuming I
>need to increase the i8254_freq value to match the true oscillator
>rate, and the kernel will adjust accordingly?

It wouldn't hurt, but I guess you have a Pentium not running SMP or APM, 
so it wouldn;t help much.

>And besides trial and error, is there any way of determining what the
>true frequency of my oscillator is?

Boot with -v and note the frequency calibrated relative to the RTC and
use that is input to sysctl, or use CLK_USE_I8254_CALIBRATION to set
this frequency by default.  The RTC is usually more accurate than the
i8254.

>>machdep.tsc_freq: -current only, must be right if it is used for timekeeping.
>>	It is used on 586+'s not running SMP or APM.
>
>I know what the 8254 is, but what is the TSC?

The "Pentium" TimeStamp Counter.  It runs at 300 MHz for a CPU frequency
of 300 MHz, etc.  It is initially calibrated relative to the i8254.
You can boot with -v to see its frequency relative to the RTC, or use
CLK_USE_TSC_CALIBRATION to use this frequency by default.

Another sysctl, `sysctl kern.timecounter.frequency', gives the frequency
of the counter being used for timekeeping.  If it is about 1 MHz then the
i8254 is being used; otherwise the TSC is being used.

Bruce

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199807160653.QAA24751>