mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-12-30 23:48:09 +01:00
Trivial cosmetic tweak to make the i[56]86 CPU MHz reprting round to the
nearest .01 Mhz rather than simply truncating it downwards. This hack makes this 89.999928 Mhz clock correctly round to the closer 90.00-MHz rather than 89.99-MHz: > i586 clock: 89999928 Hz, i8254 clock: 1193152 Hz > CPU: Pentium (90.00-MHz 586-class CPU)
This commit is contained in:
parent
a1153b1a69
commit
b05a2d987d
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=17488
@ -35,7 +35,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: Id: machdep.c,v 1.193 1996/06/18 01:22:04 bde Exp
|
||||
* $Id: identcpu.c,v 1.1 1996/07/08 19:44:38 wollman Exp $
|
||||
* $Id: identcpu.c,v 1.2 1996/08/02 21:15:47 bde Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -169,14 +169,16 @@ identifycpu(void)
|
||||
#if defined(I586_CPU)
|
||||
case CPUCLASS_586:
|
||||
printf("%d.%02d-MHz ",
|
||||
i586_ctr_freq / 1000000, (i586_ctr_freq / 10000) % 100);
|
||||
(i586_ctr_freq + 4999) / 1000000,
|
||||
((i586_ctr_freq + 4999) / 10000) % 100);
|
||||
printf("586");
|
||||
break;
|
||||
#endif
|
||||
#if defined(I686_CPU)
|
||||
case CPUCLASS_686:
|
||||
printf("%d.%02d-MHz ",
|
||||
i586_ctr_freq / 1000000, (i586_ctr_freq / 10000) % 100);
|
||||
(i586_ctr_freq + 4999) / 1000000,
|
||||
((i586_ctr_freq + 4999) / 10000) % 100);
|
||||
printf("686");
|
||||
break;
|
||||
#endif
|
||||
|
@ -35,7 +35,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: Id: machdep.c,v 1.193 1996/06/18 01:22:04 bde Exp
|
||||
* $Id: identcpu.c,v 1.1 1996/07/08 19:44:38 wollman Exp $
|
||||
* $Id: identcpu.c,v 1.2 1996/08/02 21:15:47 bde Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -169,14 +169,16 @@ identifycpu(void)
|
||||
#if defined(I586_CPU)
|
||||
case CPUCLASS_586:
|
||||
printf("%d.%02d-MHz ",
|
||||
i586_ctr_freq / 1000000, (i586_ctr_freq / 10000) % 100);
|
||||
(i586_ctr_freq + 4999) / 1000000,
|
||||
((i586_ctr_freq + 4999) / 10000) % 100);
|
||||
printf("586");
|
||||
break;
|
||||
#endif
|
||||
#if defined(I686_CPU)
|
||||
case CPUCLASS_686:
|
||||
printf("%d.%02d-MHz ",
|
||||
i586_ctr_freq / 1000000, (i586_ctr_freq / 10000) % 100);
|
||||
(i586_ctr_freq + 4999) / 1000000,
|
||||
((i586_ctr_freq + 4999) / 10000) % 100);
|
||||
printf("686");
|
||||
break;
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user