diff options
author | Dimitry Andric <dim@cvs.openbsd.org> | 2006-05-18 17:36:32 +0000 |
---|---|---|
committer | Dimitry Andric <dim@cvs.openbsd.org> | 2006-05-18 17:36:32 +0000 |
commit | 06999d9aabd689f0a355c28807924e22ef68aab4 (patch) | |
tree | b811946db6a4ac5cc8f2636c13f60c64e3b61764 /sys/arch | |
parent | a015298996aee5508fa1203d9a9f6b0bc97abd3a (diff) |
Enable detection of SpeedStep support for the VIA Esther CPU's. Note
this won't identify the possible speeds yet. Add some KNF while there.
ok deraadt
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/i386/i386/machdep.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/sys/arch/i386/i386/machdep.c b/sys/arch/i386/i386/machdep.c index db2ea454c2b..aa7da3554bc 100644 --- a/sys/arch/i386/i386/machdep.c +++ b/sys/arch/i386/i386/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.354 2006/05/11 13:21:11 mickey Exp $ */ +/* $OpenBSD: machdep.c,v 1.355 2006/05/18 17:36:31 dim Exp $ */ /* $NetBSD: machdep.c,v 1.214 1996/11/10 03:16:17 thorpej Exp $ */ /*- @@ -1177,6 +1177,14 @@ cyrix3_cpu_setup(struct cpu_info *ci) extern void i686_pagezero(void *, size_t); pagezero = i686_pagezero; + + if (cpu_ecxfeature & CPUIDECX_EST) { + if (rdmsr(MSR_MISC_ENABLE) & (1 << 16)) + est_init(ci->ci_dev.dv_xname); + else + printf("%s: Enhanced SpeedStep disabled by BIOS\n", + ci->ci_dev.dv_xname); + } #endif switch (model) { @@ -1534,8 +1542,7 @@ tm86_cpu_setup(struct cpu_info *ci) } char * -intel686_cpu_name(model) - int model; +intel686_cpu_name(int model) { extern int cpu_cache_edx; char *ret = NULL; @@ -1575,8 +1582,7 @@ intel686_cpu_name(model) } char * -cyrix3_cpu_name(model, step) - int model, step; +cyrix3_cpu_name(int model, int step) { char *name = NULL; |