summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/amd64/amd64/identcpu.c3
-rw-r--r--sys/amd64/amd64/tsc.c5
-rw-r--r--sys/amd64/include/clock.h3
-rw-r--r--sys/amd64/isa/clock.c5
-rw-r--r--sys/i386/i386/identcpu.c3
-rw-r--r--sys/i386/i386/tsc.c5
-rw-r--r--sys/i386/include/clock.h3
-rw-r--r--sys/i386/isa/clock.c5
-rw-r--r--sys/isa/atrtc.c5
9 files changed, 23 insertions, 14 deletions
diff --git a/sys/amd64/amd64/identcpu.c b/sys/amd64/amd64/identcpu.c
index 0ae73aa..19e2b47 100644
--- a/sys/amd64/amd64/identcpu.c
+++ b/sys/amd64/amd64/identcpu.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* from: Id: machdep.c,v 1.193 1996/06/18 01:22:04 bde Exp
- * $Id: identcpu.c,v 1.61 1999/05/03 23:57:13 billf Exp $
+ * $Id: identcpu.c,v 1.62 1999/05/10 10:51:25 bde Exp $
*/
#include "opt_cpu.h"
@@ -275,6 +275,7 @@ printcpuinfo(void)
break;
case 0x500:
strcat(cpu_model, "K5 model 0");
+ tsc_is_broken = 1;
break;
case 0x510:
strcat(cpu_model, "K5 model 1");
diff --git a/sys/amd64/amd64/tsc.c b/sys/amd64/amd64/tsc.c
index 75511f4..64ef3b2 100644
--- a/sys/amd64/amd64/tsc.c
+++ b/sys/amd64/amd64/tsc.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)clock.c 7.2 (Berkeley) 5/12/91
- * $Id: clock.c,v 1.133 1999/05/09 23:32:29 peter Exp $
+ * $Id: clock.c,v 1.134 1999/05/28 14:08:59 bde Exp $
*/
/*
@@ -139,6 +139,7 @@ u_int stat_imask = SWI_CLOCK_MASK;
u_int timer_freq = TIMER_FREQ;
int timer0_max_count;
u_int tsc_freq;
+int tsc_is_broken;
int wall_cmos_clock; /* wall CMOS clock assumed if != 0 */
static int beeping = 0;
@@ -793,7 +794,7 @@ startrtclock()
return;
#endif /* NAPM > 0 */
- if (tsc_present && tsc_freq != 0) {
+ if (tsc_present && tsc_freq != 0 && !tsc_is_broken) {
tsc_timecounter.tc_frequency = tsc_freq;
init_timecounter(&tsc_timecounter);
}
diff --git a/sys/amd64/include/clock.h b/sys/amd64/include/clock.h
index c21229b..03e2d79 100644
--- a/sys/amd64/include/clock.h
+++ b/sys/amd64/include/clock.h
@@ -3,7 +3,7 @@
* Garrett Wollman, September 1994.
* This file is in the public domain.
*
- * $Id: clock.h,v 1.33 1998/02/25 02:20:30 bde Exp $
+ * $Id: clock.h,v 1.34 1998/03/05 21:45:42 tegge Exp $
*/
#ifndef _MACHINE_CLOCK_H_
@@ -20,6 +20,7 @@ extern int statclock_disable;
extern u_int timer_freq;
extern int timer0_max_count;
extern u_int tsc_freq;
+extern int tsc_is_broken;
extern int wall_cmos_clock;
#ifdef APIC_IO
extern int apic_8254_intr;
diff --git a/sys/amd64/isa/clock.c b/sys/amd64/isa/clock.c
index 75511f4..64ef3b2 100644
--- a/sys/amd64/isa/clock.c
+++ b/sys/amd64/isa/clock.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)clock.c 7.2 (Berkeley) 5/12/91
- * $Id: clock.c,v 1.133 1999/05/09 23:32:29 peter Exp $
+ * $Id: clock.c,v 1.134 1999/05/28 14:08:59 bde Exp $
*/
/*
@@ -139,6 +139,7 @@ u_int stat_imask = SWI_CLOCK_MASK;
u_int timer_freq = TIMER_FREQ;
int timer0_max_count;
u_int tsc_freq;
+int tsc_is_broken;
int wall_cmos_clock; /* wall CMOS clock assumed if != 0 */
static int beeping = 0;
@@ -793,7 +794,7 @@ startrtclock()
return;
#endif /* NAPM > 0 */
- if (tsc_present && tsc_freq != 0) {
+ if (tsc_present && tsc_freq != 0 && !tsc_is_broken) {
tsc_timecounter.tc_frequency = tsc_freq;
init_timecounter(&tsc_timecounter);
}
diff --git a/sys/i386/i386/identcpu.c b/sys/i386/i386/identcpu.c
index 0ae73aa..19e2b47 100644
--- a/sys/i386/i386/identcpu.c
+++ b/sys/i386/i386/identcpu.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* from: Id: machdep.c,v 1.193 1996/06/18 01:22:04 bde Exp
- * $Id: identcpu.c,v 1.61 1999/05/03 23:57:13 billf Exp $
+ * $Id: identcpu.c,v 1.62 1999/05/10 10:51:25 bde Exp $
*/
#include "opt_cpu.h"
@@ -275,6 +275,7 @@ printcpuinfo(void)
break;
case 0x500:
strcat(cpu_model, "K5 model 0");
+ tsc_is_broken = 1;
break;
case 0x510:
strcat(cpu_model, "K5 model 1");
diff --git a/sys/i386/i386/tsc.c b/sys/i386/i386/tsc.c
index 75511f4..64ef3b2 100644
--- a/sys/i386/i386/tsc.c
+++ b/sys/i386/i386/tsc.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)clock.c 7.2 (Berkeley) 5/12/91
- * $Id: clock.c,v 1.133 1999/05/09 23:32:29 peter Exp $
+ * $Id: clock.c,v 1.134 1999/05/28 14:08:59 bde Exp $
*/
/*
@@ -139,6 +139,7 @@ u_int stat_imask = SWI_CLOCK_MASK;
u_int timer_freq = TIMER_FREQ;
int timer0_max_count;
u_int tsc_freq;
+int tsc_is_broken;
int wall_cmos_clock; /* wall CMOS clock assumed if != 0 */
static int beeping = 0;
@@ -793,7 +794,7 @@ startrtclock()
return;
#endif /* NAPM > 0 */
- if (tsc_present && tsc_freq != 0) {
+ if (tsc_present && tsc_freq != 0 && !tsc_is_broken) {
tsc_timecounter.tc_frequency = tsc_freq;
init_timecounter(&tsc_timecounter);
}
diff --git a/sys/i386/include/clock.h b/sys/i386/include/clock.h
index c21229b..03e2d79 100644
--- a/sys/i386/include/clock.h
+++ b/sys/i386/include/clock.h
@@ -3,7 +3,7 @@
* Garrett Wollman, September 1994.
* This file is in the public domain.
*
- * $Id: clock.h,v 1.33 1998/02/25 02:20:30 bde Exp $
+ * $Id: clock.h,v 1.34 1998/03/05 21:45:42 tegge Exp $
*/
#ifndef _MACHINE_CLOCK_H_
@@ -20,6 +20,7 @@ extern int statclock_disable;
extern u_int timer_freq;
extern int timer0_max_count;
extern u_int tsc_freq;
+extern int tsc_is_broken;
extern int wall_cmos_clock;
#ifdef APIC_IO
extern int apic_8254_intr;
diff --git a/sys/i386/isa/clock.c b/sys/i386/isa/clock.c
index 75511f4..64ef3b2 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.133 1999/05/09 23:32:29 peter Exp $
+ * $Id: clock.c,v 1.134 1999/05/28 14:08:59 bde Exp $
*/
/*
@@ -139,6 +139,7 @@ u_int stat_imask = SWI_CLOCK_MASK;
u_int timer_freq = TIMER_FREQ;
int timer0_max_count;
u_int tsc_freq;
+int tsc_is_broken;
int wall_cmos_clock; /* wall CMOS clock assumed if != 0 */
static int beeping = 0;
@@ -793,7 +794,7 @@ startrtclock()
return;
#endif /* NAPM > 0 */
- if (tsc_present && tsc_freq != 0) {
+ if (tsc_present && tsc_freq != 0 && !tsc_is_broken) {
tsc_timecounter.tc_frequency = tsc_freq;
init_timecounter(&tsc_timecounter);
}
diff --git a/sys/isa/atrtc.c b/sys/isa/atrtc.c
index 75511f4..64ef3b2 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.133 1999/05/09 23:32:29 peter Exp $
+ * $Id: clock.c,v 1.134 1999/05/28 14:08:59 bde Exp $
*/
/*
@@ -139,6 +139,7 @@ u_int stat_imask = SWI_CLOCK_MASK;
u_int timer_freq = TIMER_FREQ;
int timer0_max_count;
u_int tsc_freq;
+int tsc_is_broken;
int wall_cmos_clock; /* wall CMOS clock assumed if != 0 */
static int beeping = 0;
@@ -793,7 +794,7 @@ startrtclock()
return;
#endif /* NAPM > 0 */
- if (tsc_present && tsc_freq != 0) {
+ if (tsc_present && tsc_freq != 0 && !tsc_is_broken) {
tsc_timecounter.tc_frequency = tsc_freq;
init_timecounter(&tsc_timecounter);
}
OpenPOWER on IntegriCloud