From owner-freebsd-current@FreeBSD.ORG Tue Sep 23 03:14:56 2008 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 515721065674 for ; Tue, 23 Sep 2008 03:14:56 +0000 (UTC) (envelope-from bsd@fluffles.net) Received: from mail.fluffles.net (fluffles.net [80.69.95.190]) by mx1.freebsd.org (Postfix) with ESMTP id F3E1D8FC08 for ; Tue, 23 Sep 2008 03:14:55 +0000 (UTC) (envelope-from bsd@fluffles.net) Received: from [10.10.0.2] (cust.95.160.adsl.cistron.nl [195.64.95.160]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: info@fluffles.net) by mail.fluffles.net (Postfix) with ESMTP id 1AE44B29D66; Tue, 23 Sep 2008 05:15:47 +0200 (CEST) Message-ID: <48D85FC0.5050807@fluffles.net> Date: Tue, 23 Sep 2008 05:17:20 +0200 From: "fluffles.net" User-Agent: Thunderbird 2.0.0.16 (X11/20080724) MIME-Version: 1.0 To: FreeBSD Current References: <200809070036.m870a3NC001532@softbank219001162114.bbtec.net> <48D72F0E.7040501@fluffles.net> <200809222333.m8MNXiuS064364@softbank219001162114.bbtec.net> In-Reply-To: <200809222333.m8MNXiuS064364@softbank219001162114.bbtec.net> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: "G.Otsuji" Subject: Re: AMD Family 10h cpufreq driver X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Sep 2008 03:14:56 -0000 Hi G. Otsuji, I have followed your instructions on my 8-CURRENT amd64 system with Phenom 9350e CPU. I have built a kernel without cpufreq, so i can use the seperate module. Once i load the module i get this, with and without verbose logging enabled: -- [root@test ~]# uname -a FreeBSD test 8.0-CURRENT FreeBSD 8.0-CURRENT #0: Tue Sep 23 10:27:59 UTC 2008 root@test:/usr/obj/usr/src/sys/TEST amd64 [root@test ~]# kldload /boot/kernel/cpufreq.ko pstate0: on cpu0 device_attach: pstate0 attach returned 19 pstate1: on cpu1 device_attach: pstate1 attach returned 19 pstate2: on cpu2 device_attach: pstate2 attach returned 19 pstate3: on cpu3 device_attach: pstate3 attach returned 19 -- So it appears not to work, but then i'm using a different CPU than you, an 9350e (65W TDP only but quadcore 2GHz). Here's a snippet from dmesg about CPU features, if its any helpful: -- Calibrating TSC clock ... TSC clock: 2000015706 Hz CPU: AMD Phenom(tm) 9350e Quad-Core Processor (2000.02-MHz K8-class CPU) Origin = "AuthenticAMD" Id = 0x100f23 Stepping = 3 Features=0x178bfbff Features2=0x802009 AMD Features=0xee500800 AMD Features2=0x7ff,,,Prefetch,,> Cores per package: 4 -- I want to mention i'm using amd64, do your intructions account for that? Because i see a i386 directory, although if i see some stuff about amd64 in the makefile that suggests it also uses that directory. Just want a confirmation from you that this is not a problem. I have enabled Cool'N'Quiet in BIOS by setting it to Auto (other option is disabled). There is also a "CPU C1E Feature" setting. Some description: -- From: http://www.xbitlabs.com/articles/cpu/display/amd-phenom_3.html Cool’nQuiet technology in Phenom processors got to a completely new level, too. Now they call it Cool’n’Quiet 2.0. It allows to independently adjust the power consumption and frequency of all four processor cores and memory controller. Moreover, Phenom also supports C1E state that takes place for the processor after a few milliseconds of idling. In this case the CPU not only drops down its clock speed, but also reduces the HyperTransport and system bus power consumption. Another new and pretty interesting feature of the Cool’n’Quiet 2.0 technology is the ability of the CPU voltage regulator to receive data on the current power-saving CPU mode. Theoretically, it allows adjusting the voltage regulator circuitry parameters interactively depending on the processor operational conditions. I believe that mainboard developers will be able to implement corresponding algorithms in their solutions. -- From: http://lwn.net/Articles/286432/ AMD CPUs with C1E support are currently excluded from high resolution timers and NOHZ support. The reason is that C1E is a BIOS controlled C3 power state which switches off TSC and the local APIC timer. The ACPI C-State control manages the TSC/local APIC timer wreckage, but this does not include the C1 based ("halt" instruction) C1E mode. The BIOS/SMM controlled C1E state works on most systems even without enabling ACPI C-State control. -- Any change of getting these technologies working on FreeBSD? The C1E seems to be a seperate feature of Cool'N'Quiet 2, can you confirm that? Any features your driver cannot use yet but is offered by the hardware? Any help you can offer is greatly appreciated. Regards, Veronica G.Otsuji wrote: > Hi Veronica, > > Thank you for your response. > I doesn't know that the attached source was scrubbed in this mailing list. > the url is > http://lists.freebsd.org/pipermail/freebsd-current/attachments/20080907/e98020fd/pstate.obj > this is pstate.c > and copy pstate.c to /sys/i386/cpufreq/ , > and cd /sys/module/cpufreq/ , > and patch , > > --- Makefile.orig 2008-09-19 21:48:58.000000000 +0900 > +++ Makefile 2008-09-19 21:49:08.000000000 +0900 > @@ -12,7 +12,7 @@ > CFLAGS+= -I${.CURDIR}/../../contrib/dev/acpica > > SRCS+= acpi_if.h opt_acpi.h > -SRCS+= est.c p4tcc.c powernow.c > +SRCS+= est.c p4tcc.c powernow.c pstate.c > .endif > > .if ${MACHINE} == "i386" > > and make ; make install ; and kldload cpufreq; > > be careful that ,before down clock, umonut as much as possible and sync sync. > because I experienced that kernel panic or forced reset. > If you get such case, mail to me agin. > > psatete.c is not powernow.c 's pstate. I'd like to rather renmae hwpstate.c . > MSR is differnt ...and etc.... > > Have a nice day and hopefully enjoy! > > Cheers, > G. Otsuji > > Veronica wrote: > >> Hi G. Otsuji, >> >> This is great news, i've bought a Phenom X9350e to power my new high-end >> NAS. I'm very keen on testing this driver module. >> >> Only question: how do i compile & install? If you could give me some >> pointers that would be great. >> >> Regards, >> Veronica >> > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" > >