mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-13 10:02:38 +00:00
Only print clock calibration messages if the system was booted with -v.
Submitted by: partly by gpalmer
This commit is contained in:
parent
499676df4d
commit
65ff42dd17
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=23393
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)clock.c 7.2 (Berkeley) 5/12/91
|
||||
* $Id: clock.c,v 1.76 1997/02/22 09:35:59 peter Exp $
|
||||
* $Id: clock.c,v 1.78 1997/03/05 00:54:00 gpalmer Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -514,6 +514,7 @@ calibrate_clocks(void)
|
||||
u_int count, prev_count, tot_count;
|
||||
int sec, start_sec, timeout;
|
||||
|
||||
if (bootverbose)
|
||||
printf("Calibrating clock(s) ... ");
|
||||
if (!(rtcin(RTC_STATUSD) & RTCSD_PWR))
|
||||
goto fail;
|
||||
@ -587,15 +588,19 @@ calibrate_clocks(void)
|
||||
*/
|
||||
if (cpu_class == CPUCLASS_586 || cpu_class == CPUCLASS_686) {
|
||||
set_i586_ctr_freq((u_int)rdtsc(), tot_count);
|
||||
if (bootverbose)
|
||||
printf("i586 clock: %u Hz, ", i586_ctr_freq);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (bootverbose)
|
||||
printf("i8254 clock: %u Hz\n", tot_count);
|
||||
return (tot_count);
|
||||
|
||||
fail:
|
||||
printf("failed, using default i8254 clock of %u Hz\n", timer_freq);
|
||||
if (bootverbose)
|
||||
printf("failed, using default i8254 clock of %u Hz\n",
|
||||
timer_freq);
|
||||
return (timer_freq);
|
||||
}
|
||||
|
||||
@ -653,7 +658,9 @@ startrtclock()
|
||||
#endif
|
||||
timer_freq = freq;
|
||||
} else {
|
||||
printf("%d Hz differs from default of %d Hz by more than 1%%\n",
|
||||
if (bootverbose)
|
||||
printf(
|
||||
"%d Hz differs from default of %d Hz by more than 1%%\n",
|
||||
freq, timer_freq);
|
||||
#if defined(I586_CPU) || defined(I686_CPU)
|
||||
i586_ctr_freq = 0;
|
||||
@ -682,6 +689,7 @@ startrtclock()
|
||||
DELAY(1000000);
|
||||
set_i586_ctr_freq((u_int)rdtsc(), timer_freq);
|
||||
#ifdef CLK_USE_I586_CALIBRATION
|
||||
if (bootverbose)
|
||||
printf("i586 clock: %u Hz\n", i586_ctr_freq);
|
||||
#endif
|
||||
}
|
||||
|
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)clock.c 7.2 (Berkeley) 5/12/91
|
||||
* $Id: clock.c,v 1.76 1997/02/22 09:35:59 peter Exp $
|
||||
* $Id: clock.c,v 1.78 1997/03/05 00:54:00 gpalmer Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -514,6 +514,7 @@ calibrate_clocks(void)
|
||||
u_int count, prev_count, tot_count;
|
||||
int sec, start_sec, timeout;
|
||||
|
||||
if (bootverbose)
|
||||
printf("Calibrating clock(s) ... ");
|
||||
if (!(rtcin(RTC_STATUSD) & RTCSD_PWR))
|
||||
goto fail;
|
||||
@ -587,15 +588,19 @@ calibrate_clocks(void)
|
||||
*/
|
||||
if (cpu_class == CPUCLASS_586 || cpu_class == CPUCLASS_686) {
|
||||
set_i586_ctr_freq((u_int)rdtsc(), tot_count);
|
||||
if (bootverbose)
|
||||
printf("i586 clock: %u Hz, ", i586_ctr_freq);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (bootverbose)
|
||||
printf("i8254 clock: %u Hz\n", tot_count);
|
||||
return (tot_count);
|
||||
|
||||
fail:
|
||||
printf("failed, using default i8254 clock of %u Hz\n", timer_freq);
|
||||
if (bootverbose)
|
||||
printf("failed, using default i8254 clock of %u Hz\n",
|
||||
timer_freq);
|
||||
return (timer_freq);
|
||||
}
|
||||
|
||||
@ -653,7 +658,9 @@ startrtclock()
|
||||
#endif
|
||||
timer_freq = freq;
|
||||
} else {
|
||||
printf("%d Hz differs from default of %d Hz by more than 1%%\n",
|
||||
if (bootverbose)
|
||||
printf(
|
||||
"%d Hz differs from default of %d Hz by more than 1%%\n",
|
||||
freq, timer_freq);
|
||||
#if defined(I586_CPU) || defined(I686_CPU)
|
||||
i586_ctr_freq = 0;
|
||||
@ -682,6 +689,7 @@ startrtclock()
|
||||
DELAY(1000000);
|
||||
set_i586_ctr_freq((u_int)rdtsc(), timer_freq);
|
||||
#ifdef CLK_USE_I586_CALIBRATION
|
||||
if (bootverbose)
|
||||
printf("i586 clock: %u Hz\n", i586_ctr_freq);
|
||||
#endif
|
||||
}
|
||||
|
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)clock.c 7.2 (Berkeley) 5/12/91
|
||||
* $Id: clock.c,v 1.76 1997/02/22 09:35:59 peter Exp $
|
||||
* $Id: clock.c,v 1.78 1997/03/05 00:54:00 gpalmer Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -514,6 +514,7 @@ calibrate_clocks(void)
|
||||
u_int count, prev_count, tot_count;
|
||||
int sec, start_sec, timeout;
|
||||
|
||||
if (bootverbose)
|
||||
printf("Calibrating clock(s) ... ");
|
||||
if (!(rtcin(RTC_STATUSD) & RTCSD_PWR))
|
||||
goto fail;
|
||||
@ -587,15 +588,19 @@ calibrate_clocks(void)
|
||||
*/
|
||||
if (cpu_class == CPUCLASS_586 || cpu_class == CPUCLASS_686) {
|
||||
set_i586_ctr_freq((u_int)rdtsc(), tot_count);
|
||||
if (bootverbose)
|
||||
printf("i586 clock: %u Hz, ", i586_ctr_freq);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (bootverbose)
|
||||
printf("i8254 clock: %u Hz\n", tot_count);
|
||||
return (tot_count);
|
||||
|
||||
fail:
|
||||
printf("failed, using default i8254 clock of %u Hz\n", timer_freq);
|
||||
if (bootverbose)
|
||||
printf("failed, using default i8254 clock of %u Hz\n",
|
||||
timer_freq);
|
||||
return (timer_freq);
|
||||
}
|
||||
|
||||
@ -653,7 +658,9 @@ startrtclock()
|
||||
#endif
|
||||
timer_freq = freq;
|
||||
} else {
|
||||
printf("%d Hz differs from default of %d Hz by more than 1%%\n",
|
||||
if (bootverbose)
|
||||
printf(
|
||||
"%d Hz differs from default of %d Hz by more than 1%%\n",
|
||||
freq, timer_freq);
|
||||
#if defined(I586_CPU) || defined(I686_CPU)
|
||||
i586_ctr_freq = 0;
|
||||
@ -682,6 +689,7 @@ startrtclock()
|
||||
DELAY(1000000);
|
||||
set_i586_ctr_freq((u_int)rdtsc(), timer_freq);
|
||||
#ifdef CLK_USE_I586_CALIBRATION
|
||||
if (bootverbose)
|
||||
printf("i586 clock: %u Hz\n", i586_ctr_freq);
|
||||
#endif
|
||||
}
|
||||
|
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)clock.c 7.2 (Berkeley) 5/12/91
|
||||
* $Id: clock.c,v 1.76 1997/02/22 09:35:59 peter Exp $
|
||||
* $Id: clock.c,v 1.78 1997/03/05 00:54:00 gpalmer Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -514,6 +514,7 @@ calibrate_clocks(void)
|
||||
u_int count, prev_count, tot_count;
|
||||
int sec, start_sec, timeout;
|
||||
|
||||
if (bootverbose)
|
||||
printf("Calibrating clock(s) ... ");
|
||||
if (!(rtcin(RTC_STATUSD) & RTCSD_PWR))
|
||||
goto fail;
|
||||
@ -587,15 +588,19 @@ calibrate_clocks(void)
|
||||
*/
|
||||
if (cpu_class == CPUCLASS_586 || cpu_class == CPUCLASS_686) {
|
||||
set_i586_ctr_freq((u_int)rdtsc(), tot_count);
|
||||
if (bootverbose)
|
||||
printf("i586 clock: %u Hz, ", i586_ctr_freq);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (bootverbose)
|
||||
printf("i8254 clock: %u Hz\n", tot_count);
|
||||
return (tot_count);
|
||||
|
||||
fail:
|
||||
printf("failed, using default i8254 clock of %u Hz\n", timer_freq);
|
||||
if (bootverbose)
|
||||
printf("failed, using default i8254 clock of %u Hz\n",
|
||||
timer_freq);
|
||||
return (timer_freq);
|
||||
}
|
||||
|
||||
@ -653,7 +658,9 @@ startrtclock()
|
||||
#endif
|
||||
timer_freq = freq;
|
||||
} else {
|
||||
printf("%d Hz differs from default of %d Hz by more than 1%%\n",
|
||||
if (bootverbose)
|
||||
printf(
|
||||
"%d Hz differs from default of %d Hz by more than 1%%\n",
|
||||
freq, timer_freq);
|
||||
#if defined(I586_CPU) || defined(I686_CPU)
|
||||
i586_ctr_freq = 0;
|
||||
@ -682,6 +689,7 @@ startrtclock()
|
||||
DELAY(1000000);
|
||||
set_i586_ctr_freq((u_int)rdtsc(), timer_freq);
|
||||
#ifdef CLK_USE_I586_CALIBRATION
|
||||
if (bootverbose)
|
||||
printf("i586 clock: %u Hz\n", i586_ctr_freq);
|
||||
#endif
|
||||
}
|
||||
|
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)clock.c 7.2 (Berkeley) 5/12/91
|
||||
* $Id: clock.c,v 1.76 1997/02/22 09:35:59 peter Exp $
|
||||
* $Id: clock.c,v 1.78 1997/03/05 00:54:00 gpalmer Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -514,6 +514,7 @@ calibrate_clocks(void)
|
||||
u_int count, prev_count, tot_count;
|
||||
int sec, start_sec, timeout;
|
||||
|
||||
if (bootverbose)
|
||||
printf("Calibrating clock(s) ... ");
|
||||
if (!(rtcin(RTC_STATUSD) & RTCSD_PWR))
|
||||
goto fail;
|
||||
@ -587,15 +588,19 @@ calibrate_clocks(void)
|
||||
*/
|
||||
if (cpu_class == CPUCLASS_586 || cpu_class == CPUCLASS_686) {
|
||||
set_i586_ctr_freq((u_int)rdtsc(), tot_count);
|
||||
if (bootverbose)
|
||||
printf("i586 clock: %u Hz, ", i586_ctr_freq);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (bootverbose)
|
||||
printf("i8254 clock: %u Hz\n", tot_count);
|
||||
return (tot_count);
|
||||
|
||||
fail:
|
||||
printf("failed, using default i8254 clock of %u Hz\n", timer_freq);
|
||||
if (bootverbose)
|
||||
printf("failed, using default i8254 clock of %u Hz\n",
|
||||
timer_freq);
|
||||
return (timer_freq);
|
||||
}
|
||||
|
||||
@ -653,7 +658,9 @@ startrtclock()
|
||||
#endif
|
||||
timer_freq = freq;
|
||||
} else {
|
||||
printf("%d Hz differs from default of %d Hz by more than 1%%\n",
|
||||
if (bootverbose)
|
||||
printf(
|
||||
"%d Hz differs from default of %d Hz by more than 1%%\n",
|
||||
freq, timer_freq);
|
||||
#if defined(I586_CPU) || defined(I686_CPU)
|
||||
i586_ctr_freq = 0;
|
||||
@ -682,6 +689,7 @@ startrtclock()
|
||||
DELAY(1000000);
|
||||
set_i586_ctr_freq((u_int)rdtsc(), timer_freq);
|
||||
#ifdef CLK_USE_I586_CALIBRATION
|
||||
if (bootverbose)
|
||||
printf("i586 clock: %u Hz\n", i586_ctr_freq);
|
||||
#endif
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user