From owner-freebsd-acpi@FreeBSD.ORG Wed May 3 14:56:54 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 EA84F16A40B for ; Wed, 3 May 2006 14:56:53 +0000 (UTC) (envelope-from ales.rom@kabelnet.net) Received: from mta1.siol.net (mta1.siol.net [193.189.160.88]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1049043D49 for ; Wed, 3 May 2006 14:56:52 +0000 (GMT) (envelope-from ales.rom@kabelnet.net) Received: from edge2.siol.net ([10.10.10.211]) by mta1.siol.net with ESMTP id <20060503145650.MGLT4387.mta1.siol.net@edge2.siol.net>; Wed, 3 May 2006 16:56:50 +0200 Received: from [192.168.1.105] (really [193.77.234.6]) by edge2.siol.net with ESMTP id <20060503145650.BEGQ7870.edge2.siol.net@[192.168.1.105]>; Wed, 3 May 2006 16:56:50 +0200 Message-ID: <4458E0D0.5020308@kabelnet.net> Date: Wed, 03 May 2006 16:56:48 +0000 From: Ales User-Agent: Thunderbird 1.5 (X11/20060225) MIME-Version: 1.0 To: ducrot@poupinou.org, freebsd-acpi@freebsd.org References: <4458B194.7070407@kabelnet.net> In-Reply-To: <4458B194.7070407@kabelnet.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: Re: powerd on Gericom Webgine XL not running quite well 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: Wed, 03 May 2006 14:56:54 -0000 >> >> The file is here: http://www.p-rom.si/Gericom_Webgine_XL.asl >> > > Thanks. As I supposed, there are duplicate entries for the max p-state: > > Scope (\_PR) > { > Processor (CPU1, 0x01, 0x00000810, 0x06) > { > ... > Name (_PSS, Package (0x0A) > { > Package (0x06) > { > 0x000004B0, > 0x000088BC, > 0x0000007D, > 0x0000007D, > 0x009C416C, > 0x0000016C > }, > > Package (0x06) > { > 0x000004B0, > 0x000088BC, > 0x0000007D, > 0x0000007D, > 0x009C416C, > 0x0000016C > }, > > Package (0x06) > { > 0x000004B0, > 0x000088BC, > 0x0000007D, > 0x0000007D, > 0x009C416C, > 0x0000016C > }, > > This package is duplicated 5 times and correspond to > the max one. > > ... > ... > } > > our acpi_perf driver does not handle this situation. I think > this patch (can not compile test, I don't have a FreeBSD > handy ATM) should fix your issue (minus stupid mistake I may > introduce). > > >> As I said in one of my previus messages: >> If I change POWERNOW_MAX_STATES in powernow.c from 16 to 7 (I belive it >> is the number of states on my proc) everything works fine!!! I know it >> is stupid solution, but I do not know anything about C/C++ programming. >> Sorry. >> > > The method CPUFREQ_DRV_SETTINGS() from acpi_perf give > 10 p-states, not 7, therefore it failed, and pn_decode_acpi() > fail. Legacy bios tables are used instead of those > given by ACPI via pn_decode_pst() which return only 6 > p-states. > > You can see the power consuption for each states is "-1" > in that case because I dont know how to compute them. > > >> dev.powernow.0.freq_settings: 1197/-1 1064/-1 997/-1 931/-1 864/-1 798/-1 >> >> Another thing. I belive that 1 frequency here is missing. >> (8,5x133MHz=1133MHz) It should be there because we have FSB=133, multi=6 >> to 9 in 0.5 step. >> > > Aparently the bios writer tell you 8.5 multiplier is not supported. > You should always trust the bios writer (ahem) :) > > > --- src/sys/dev/acpica/acpi_perf.c~ 2006-05-03 14:49:35.000000000 +0200 > +++ src/sys/dev/acpica/acpi_perf.c 2006-05-03 14:50:37.000000000 +0200 > @@ -299,6 +299,12 @@ acpi_perf_evaluate(device_t dev) > sc->px_states[count].core_freq >= 0xffff) > continue; > > + /* Check for duplicate entries */ > + if (count > 0 && > + sc->px_states[count - 1].core_freq == > + sc->px_states[count].core_freq) > + continue; > + > count++; > } > sc->px_count = count; > > It compiles and runs like you said. dev.powernow.0.%desc: PowerNow! K7 dev.powernow.0.%driver: powernow dev.powernow.0.%parent: cpu0 dev.powernow.0.freq_settings: 1197/35004 1064/29004 997/25291 931/23595 864/21910 798/20224 We have freq an power consuption for every state now. Thank you. Great, great support. Ales Rom