Stop the TSC from being used as timecounter on K5/step0 machines.

This commit is contained in:
Poul-Henning Kamp 1999-05-29 06:57:55 +00:00
parent 14870ecf9f
commit 6deb5a62cc
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=47592
9 changed files with 23 additions and 14 deletions

View File

@ -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");

View File

@ -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);
}

View File

@ -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;

View File

@ -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);
}

View File

@ -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");

View File

@ -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);
}

View File

@ -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;

View File

@ -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);
}

View File

@ -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);
}