NetBSD Problem Report #37526

From martin@duskware.de  Wed Dec 12 14:20:38 2007
Return-Path: <martin@duskware.de>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by narn.NetBSD.org (Postfix) with ESMTP id 6B24763B935
	for <gnats-bugs@gnats.netbsd.org>; Wed, 12 Dec 2007 14:20:38 +0000 (UTC)
Message-Id: <20071212123105.B8A2063B8FF@narn.NetBSD.org>
Date: Wed, 12 Dec 2007 12:31:05 +0000 (UTC)
From: akihiko@e-tokyo.prug.or.jp
Reply-To: akihiko@e-tokyo.prug.or.jp
To: netbsd-bugs-owner@NetBSD.org
Subject: Kernel does not support PowerNow! feature of AMD Opteron 1210 Processor
X-Send-Pr-Version: www-1.0

>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:          closed
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Wed Dec 12 14:25:00 +0000 2007
>Closed-Date:    Wed Dec 12 14:36:36 +0000 2007
>Last-Modified:  Wed Dec 12 14:40:01 +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

>Release-Note:

>Audit-Trail:

State-Changed-From-To: open->closed
State-Changed-By: xtraeme@netbsd.org
State-Changed-When: Wed, 12 Dec 2007 14:36:36 +0000
State-Changed-Why:
Patch applied into HEAD, will request a pullup for netbsd-4.
Thanks.


From: Juan Romero Pardines <xtraeme@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: PR/37526 CVS commit: src/sys/arch/amd64/amd64
Date: Wed, 12 Dec 2007 14:36:21 +0000 (UTC)

 Module Name:	src
 Committed By:	xtraeme
 Date:		Wed Dec 12 14:36:21 UTC 2007

 Modified Files:
 	src/sys/arch/amd64/amd64: identcpu.c

 Log Message:
 Check for the first 'D' letter in the cpu_model string for POWERNOW_K8,
 so that it works in Dual Core Opterons (and maybe others).

 Patch from Akihiko Taniguchi in PR port-amd64/37526.


 To generate a diff of this commit:
 cvs rdiff -r1.31 -r1.32 src/sys/arch/amd64/amd64/identcpu.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.