Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 18 Mar 2010 21:56:44 -0400
From:      "Alexandre \"Sunny\" Kovalenko" <gaijin.k@ovi.com>
To:        Joerg Wunsch <joerg_wunsch@uriah.heep.sax.de>
Cc:        freebsd-acpi@freebsd.org
Subject:   Re: Funny battery values (nx6325)
Message-ID:  <1268963804.47240.16.camel@RabbitsDen>
In-Reply-To: <20100318195312.GQ52442@uriah.heep.sax.de>
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>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 2010-03-18 at 20:53 +0100, Joerg Wunsch wrote:
> As Alexandre Sunny Kovalenko wrote:
> 
> > You can dump your ASL (see Handbook for instructions) and search for
> > something like:
> 
> ...
> 
> > and try to track down where the actual values came from. Chapter 10
> > of the ACPI specification (http://www.acpi.info/spec.htm) should
> > provide you with more information on the subject.
> 
> OK, the machine's back here now.  Meanwhile, I already tried all that
> on all available laptops around, and while I can basically follow the
> logic of most of those ASL files, I'm completely confused about the
> ASL file I'm getting from the nx6325.  Perhaps that confusion about it
> is also what confuses acpiconf -i0... ;-)
> 
> I'm attaching both, the acpiconf -i0 output as well as the ASL file.
> Is anybody able to hint me where the _BIF and _BST methods get their
> actual data from?
> 
> _______________________________________________
> freebsd-acpi@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-acpi
> To unsubscribe, send any mail to "freebsd-acpi-unsubscribe@freebsd.org"

Unfortunately, it looks like values are coming straight from Embedded
Controller without any modifications:

Method (C1AC, 1, Serialized)
{
...
  If (C14C)
  {
    Store (Arg0, C160)
    Store (C164, Local0)
    // This is your design capacity
    Store (Local0, Index (DerefOf (Index (C1AF, Arg0)), 0x01))
    // This is your last full capacity
    Store (Local0, Index (DerefOf (Index (C1AF, Arg0)), 0x02))
    // And yes they are the same by design of your BIOS ;)
...

and

OperationRegion (C153, EmbeddedControl, 0x00, 0xFF)
Field (C153, ByteAcc, NoLock, Preserve)
{
  Offset (0x86), 
  C160,   4, 
  Offset (0x87), 
...
  Offset (0x8D), 
  C164,   16, 
  Offset (0x91), 
...

and

Name (C1AF, Package (0x02)
{
  Package (0x0D)
  {
    0x01, 
    0xFFFFFFFF, 
    0xFFFFFFFF, 
    0x01, 
    0xFFFFFFFF, 
    0x00, 
    0x00, 
    0x64, 
    0x64, 
    "Primary", 
    "100000", 
    "LIon", 
    "Hewlett-Packard"
   }, 
...

Given that you are not getting default values, something is actually
being read and returned. Unfortunately you are going to need somebody
smarter then myself to tell you whether magic number they store and
offsets they use to read the values are indeed valid.

You have couple of options you can try yourself, though:

* play with OS names (you can find possible variants in the ASL) and see
if any of them make a difference.
* build ACPI module with the debug information and see what is being
stored and read, and, more importantly, if there are any warnings and/or
errors.

Information on how to do either of these things could be found at

http://www.freebsd.org/doc/handbook/acpi-debug.html

Out of sheer curiosity... what does acpiconf -i1 say?

-- 
Alexandre Kovalenko (Олександр Коваленко)



--------------------------------------------------------------
Ovi Store: Fresh apps and more
http://store.ovi.com/?cid=ovistore-fw-bac-na-acq-na-ovimail-g0-na-4




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