From owner-freebsd-acpi@FreeBSD.ORG Fri Mar 19 03:52:11 2010 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 75267106564A for ; Fri, 19 Mar 2010 03:52:11 +0000 (UTC) (envelope-from dan@obluda.cz) Received: from smtp1.kolej.mff.cuni.cz (smtp1.kolej.mff.cuni.cz [78.128.192.10]) by mx1.freebsd.org (Postfix) with ESMTP id 0DDFF8FC14 for ; Fri, 19 Mar 2010 03:52:10 +0000 (UTC) X-Envelope-From: dan@obluda.cz Received: from kgw.obluda.cz (kgw.obluda.cz [193.179.199.50]) by smtp1.kolej.mff.cuni.cz (8.14.3/8.14.3) with ESMTP id o2J3UmD3086583; Fri, 19 Mar 2010 04:30:49 +0100 (CET) (envelope-from dan@obluda.cz) Message-ID: <4BA2EFE8.60004@obluda.cz> Date: Fri, 19 Mar 2010 04:30:48 +0100 From: Dan Lukes User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.9.1.8) Gecko/20100221 SeaMonkey/2.0.3 MIME-Version: 1.0 To: Joerg Wunsch References: <20100315062028.GC52442@uriah.heep.sax.de> <20100317070428.GA2924@server.vk2pj.dyndns.org> <20100317074549.GC52442@uriah.heep.sax.de> <1268829363.6171.13.camel@RabbitsDen> <20100318195312.GQ52442@uriah.heep.sax.de> In-Reply-To: <20100318195312.GQ52442@uriah.heep.sax.de> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-acpi@freebsd.org Subject: Re: Funny battery values (nx6325) 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: Fri, 19 Mar 2010 03:52:11 -0000 On 03/18/10 20:53, Joerg Wunsch: > Is anybody able to hint me where the _BIF and _BST methods get their > actual data from? Method (_BIF, 0, NotSerialized) { Return (C1AC (0x00)) } where 0x00 seems to be battery number. The structure that will be returned is here: Name (C1AF, Package (0x02) { Package (0x0D) { 0x01, 0xFFFFFFFF, 0xFFFFFFFF, 0x01, 0xFFFFFFFF, 0x00, 0x00, 0x64, 0x64, "Primary", "100000", "LIon", "Hewlett-Packard" }, And it's filled in C1AC() method. The Design/Last Full Capacity is filled here: Store (C164, Local0) Store (Local0, Index (DerefOf (Index (C1AF, Arg0)), 0x01)) Store (Local0, Index (DerefOf (Index (C1AF, Arg0)), 0x02)) It mean that both numbers are same and come from C164 variable. C164 variable is defined as 16bit variable on offset 0x8D of EmbeddedController (_HID=PNP0C09) memory region. So, now you know from where the Design/Last Full Capacity come from. Unless you have improper BIOS (BIOS for other computer type/version) then there seems not to be problem between ACPI and OS. You should ask why independent embedded controller store such value to memory where the OS is reading it. As far as I know, you can't debug the operations of embedded controller, so you can imagine only why it store such values here ... Dan