Subject: port-amd64/37526: Kernel does not support PowerNow! feature of AMD Opteron 1210 Processor
To: None <port-amd64-maintainer@netbsd.org, gnats-admin@netbsd.org,>
From: None <akihiko@e-tokyo.prug.or.jp>
List: netbsd-bugs
Date: 12/12/2007 14:25:00
>Number:         37526
>Category:       port-amd64
>Synopsis:       Kernel does not support PowerNow! feature of AMD Opteron 1210 Processor
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    port-amd64-maintainer
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Wed Dec 12 14:25:00 +0000 2007
>Originator:     Akihiko Taniguchi
>Release:        NetBSD 4.0_RC5
>Organization:
PRUG
>Environment:
NetBSD ml115.e-tokyo.prug.or.jp 4.0_RC5 NetBSD 4.0_RC5 (GENERIC.MP) #3: Wed Dec 12 20:44:35 JST 2007 akihiko@ml115.e-tokyo.prug.or.jp:/usr/obj/sys/arch/amd64/compile/GENERIC.MP amd64
>Description:
GENERIC.MP kernel does not support PowerNow! feature of AMD Opteron 1210 Processor.

PowerNow! feature is activated when sys/arch/amd64/amd64/identcpu.c verified that first letter of cpu_model string is 'A' or 'O'.
But, the cpu_model string of AMD Opteron 1210, its first letter is 'D'.

> cpu0: Dual-Core AMD Opteron(tm) Processor 1210, 1800.10 MHz

>How-To-Repeat:
Just boot GENERIC.MP kernel.
Maybe, GENERIC kernel has same probrem.
>Fix:
Apply following patch. (Just quick hack)

Index: identcpu.c
===================================================================
RCS file: /cvsroot/src/sys/arch/amd64/amd64/identcpu.c,v
retrieving revision 1.7.2.3
diff -r1.7.2.3 identcpu.c
156c156,157
<           (cpu_model[0] == 'A' || cpu_model[0] == 'O') &&
---
>           (cpu_model[0] == 'A' || cpu_model[0] == 'O' ||
>            cpu_model[0] == 'D') &&


===================================================================
A part of boot messages of GENERIC.MP kernel applied this patch:

cpu0: AMD Power Management features: 3f<STC,TM,TTP,VID,FID,TS>
cpu0: AMD PowerNow! Technology 1800 MHz
cpu0: available frequencies (Mhz): 1000 1800

===================================================================
sysctl output with estd:

ml115: {15} sysctl machdep.powernow
machdep.powernow.frequency.target = 1000
machdep.powernow.frequency.current = 1000
machdep.powernow.frequency.available = 1000 1800