From owner-freebsd-acpi@FreeBSD.ORG Thu Jun 8 21:28:51 2006 Return-Path: X-Original-To: freebsd-acpi@freebsd.org Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0FC1A170089 for ; Thu, 8 Jun 2006 18:22:47 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.FreeBSD.org (Postfix) with ESMTP id F1CD043D55 for ; Thu, 8 Jun 2006 18:22:44 +0000 (GMT) (envelope-from avg@icyb.net.ua) Received: from [212.40.38.87] (oddity-e.topspin.kiev.ua [212.40.38.87]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id VAA11457; Thu, 08 Jun 2006 21:22:38 +0300 (EEST) (envelope-from avg@icyb.net.ua) Message-ID: <44886AED.5070801@icyb.net.ua> Date: Thu, 08 Jun 2006 21:22:37 +0300 From: Andriy Gapon User-Agent: Thunderbird 1.5.0.2 (X11/20060512) MIME-Version: 1.0 To: Nate Lawson References: <4475C74C.2080204@icyb.net.ua> <447708E6.7010205@root.org> In-Reply-To: <447708E6.7010205@root.org> Content-Type: text/plain; charset=KOI8-U Content-Transfer-Encoding: 7bit Cc: freebsd-acpi@freebsd.org Subject: Re: nforce2 cpufreq X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jun 2006 21:28:51 -0000 on 26/05/2006 16:55 Nate Lawson said the following: > Andriy Gapon wrote: [snip] >> Anyway, my MB is based on nForce2 chipset and I found out that Linux has >> cpufreq-nforce2 module that works in their cpufreq framework: >> http://www.hasw.net/linux/ >> [snip] > > It's really easy to do. Just see the sys/dev/cpufreq/ichss.c file. > Nate and all, I have a pleasure to announce first public release of FreeBSD nf2fsb cpufreq driver. It is based on cpufreq-nforce2 Linux driver mentioned above for FSB frequency control and on atxp1 Linux driver for core voltage control. Thanks for both to Sebastian Witt! The source code can be found here: http://oddity-e.topspin.kiev.ua/cgi-bin/cvsweb.cgi/nf2fsb/ How-to for *Linux* drivers can be found here: http://forums.gentoo.org/viewtopic-t-273047-highlight-atxp.html This driver works stable and solid for me, but I still would qualify it as alpha quality because of many issues that I am not sure about. This is perhaps an under-qualification, but you are warned. So I'd say that at this point it is intended only for those who like to hack software and play with hardware. That's why I do not provide any compilation and installation instructions :-) Only one hint: this driver uses SMBus to access ATXP1 chip, so you definitely need SMBus to work. I am using nfsmb driver found in CURRENT (it is by Ruslan Ermilov) with one change - instead of PCIR_BAR(4) and PCIR_BAR(5) I have 0x50 and 0x54. BTW, nfsmb compiles and works on 6.1 like charm. My SMBus controller is: nfsmb0@pci0:1:1: class=0x0c0500 card=0x1c02147b chip=0x006410de You need to make sure that nfsmb is loaded before cpufreq. If you decide to try this driver please do read the code, at least the comments marked with XXX. Do not forget "AS-IS" disclaimer as well :-) I would appreciate all feedback: trouble and success reports, comments, suggestions and patches. Naming suggestions are welcome too, there is something about "nf2fsb" that doesn't feel right. At the end some "screenshots" (powerd is running): $ dmesg | tail -3 nf2fsb0: on cpu0 nf2fsb0: FSB is at 166MHz, CPU is at 1830MHz, frequency multiplier is 11.0 nf2fsb0: ATXP1 was found on smbus0, core volatge will be changed along with FSB speed $ sysctl dev.cpu.0.freq_levels dev.cpu.0.freq_levels: 1826/-1 1650/-1 1463/-1 $ sysctl dev.cpu.0.freq dev.cpu.0.freq: 1463 $ mbmon -c 1 Temp.= 29.0, 41.0, 0.0; Rot.= 2393, 1767, 0 Vcore = 1.46, 2.62; Volt. = 3.28, 5.05, 11.86, -11.71, -4.90 My system is NF7 and Athlon XP 2500+. -- Andriy Gapon