aboutsummaryrefslogtreecommitdiff
path: root/sys/isa
diff options
context:
space:
mode:
authorPoul-Henning Kamp <phk@FreeBSD.org>1998-02-28 21:16:13 +0000
committerPoul-Henning Kamp <phk@FreeBSD.org>1998-02-28 21:16:13 +0000
commit3301c800f535d20bdb14fb5df974871f9028b7ce (patch)
treeb3dcdff226a791005a8597f3f99d3ec22b389aff /sys/isa
parentc544ff8a5e3b24bc083986470aa03e7d0f7f9611 (diff)
downloadsrc-3301c800f535d20bdb14fb5df974871f9028b7ce.tar.gz
src-3301c800f535d20bdb14fb5df974871f9028b7ce.zip
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.
Notes
Notes: svn path=/head/; revision=33929
Diffstat (limited to 'sys/isa')
-rw-r--r--sys/isa/atrtc.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/isa/atrtc.c b/sys/isa/atrtc.c
index bc0b9513c555..4388c9726318 100644
--- a/sys/isa/atrtc.c
+++ b/sys/isa/atrtc.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);