Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 08 Jun 2006 21:22:37 +0300
From:      Andriy Gapon <avg@icyb.net.ua>
To:        Nate Lawson <nate@root.org>
Cc:        freebsd-acpi@freebsd.org
Subject:   Re: nforce2 cpufreq
Message-ID:  <44886AED.5070801@icyb.net.ua>
In-Reply-To: <447708E6.7010205@root.org>
References:  <4475C74C.2080204@icyb.net.ua> <447708E6.7010205@root.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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: <nForce2 FSB frequency control> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?44886AED.5070801>