summaryrefslogtreecommitdiffstats
path: root/sys/i386/isa/clock.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1998-02-28 21:16:13 +0000
committerphk <phk@FreeBSD.org>1998-02-28 21:16:13 +0000
commit8dbcc994cab6a1a84b3d5e080bd1d082efda7e6d (patch)
treed7328c2a55a33e5976c0a4f77e59fa491689da29 /sys/i386/isa/clock.c
parentc5228af8cf2dc9f9d3c5ebb1a617edc4e6d4542c (diff)
downloadFreeBSD-src-8dbcc994cab6a1a84b3d5e080bd1d082efda7e6d.zip
FreeBSD-src-8dbcc994cab6a1a84b3d5e080bd1d082efda7e6d.tar.gz
Prevent the TSC from being used on APM machines, we have no idea if
it runs at a constant frequency. This was less of an issue before, because the TSC only interpolated in the HZ intervals, but now where the timecounter is used all the way, this becomes much more visible. Nit: Fix a printf which triggered the bde-filter.
Diffstat (limited to 'sys/i386/isa/clock.c')
-rw-r--r--sys/i386/isa/clock.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/i386/isa/clock.c b/sys/i386/isa/clock.c
index bc0b951..4388c97 100644
--- a/sys/i386/isa/clock.c
+++ b/sys/i386/isa/clock.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)clock.c 7.2 (Berkeley) 5/12/91
- * $Id: clock.c,v 1.112 1998/02/21 20:45:27 jkh Exp $
+ * $Id: clock.c,v 1.113 1998/02/23 00:11:25 bde Exp $
*/
/*
@@ -49,6 +49,7 @@
*/
#include "opt_clock.h"
+#include "apm.h"
#include <sys/param.h>
#include <sys/systm.h>
@@ -633,9 +634,9 @@ calibrate_clocks(void)
tsc_freq = rdtsc();
if (bootverbose) {
- printf("i8254 clock: %u Hz\n", tot_count);
if (tsc_present)
printf("TSC clock: %u Hz, ", tsc_freq);
+ printf("i8254 clock: %u Hz\n", tot_count);
}
return (tot_count);
@@ -683,6 +684,9 @@ startrtclock()
#ifdef SMP
tsc_present = 0;
#endif
+#if NAPM > 0
+ tsc_present = 0;
+#endif
writertc(RTC_STATUSA, rtc_statusa);
writertc(RTC_STATUSB, RTCSB_24HR);
OpenPOWER on IntegriCloud