From owner-freebsd-amd64@FreeBSD.ORG Mon Jan 9 20:31:41 2006 Return-Path: X-Original-To: freebsd-amd64@FreeBSD.org Delivered-To: freebsd-amd64@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7446516A41F; Mon, 9 Jan 2006 20:31:41 +0000 (GMT) (envelope-from nate@root.org) Received: from www.cryptography.com (li-22.members.linode.com [64.5.53.22]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9C17343D58; Mon, 9 Jan 2006 20:31:40 +0000 (GMT) (envelope-from nate@root.org) Received: from [10.0.0.53] (adsl-67-119-74-222.dsl.sntc01.pacbell.net [67.119.74.222]) by www.cryptography.com (8.12.8/8.12.8) with ESMTP id k09KVaek021879 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Mon, 9 Jan 2006 12:31:38 -0800 Message-ID: <43C2C6AB.5060605@root.org> Date: Mon, 09 Jan 2006 12:25:15 -0800 From: Nate Lawson User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Ariff Abdullah References: <63675.24.71.129.36.1135718125.squirrel@imap.sd73.bc.ca> <200512291412.19476.peter@wemm.org> <20060103155509.GE13887@poupinou.org> <20060103185047.GH13887@poupinou.org> <20060104161842.GK13887@poupinou.org> <20060105005441.029835c1.ariff@FreeBSD.org> In-Reply-To: <20060105005441.029835c1.ariff@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-acpi@FreeBSD.org, freebsd-amd64@FreeBSD.org Subject: Re: No APM yet for AMD? X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2006 20:31:41 -0000 Ariff Abdullah wrote: > On Wed, 4 Jan 2006 17:18:42 +0100 > Bruno Ducrot wrote: > >>On Wed, Jan 04, 2006 at 10:14:13AM -0500, Francisco Reyes wrote: >> >>>Bruno Ducrot writes: >>> >>> >>>>>http://public.natserv.net/acpidump.txt >>>> >>>>Well could you try to add this to your /boot/loader.conf: >>>>hw.acpi.osname="Microsoft Windows NT" >>> >>>Done >>> >>> >>> >>>>It's because I want to check what happens if the following ASL is >>>>triggered: >>>> >>>>If (LEqual (SizeOf (\_OS), 0x14)) >>>>{ >>>> BPOL (0x3C) >>>>} >>> >>>Second dump on the same location... different name >>>http://public.natserv.net/acpidump2.txt >>> >>> >>>>That's look like a workaround for Windows NT and that seems to >>>>be related to batteries and AC adapter. >>> >>>Not sure what was supposed to happen after trying the change in >>>loader.conf, but I tried "sysctl -a |grep acpi.bat" and the >>>results are the same as before. >>> >>>hw.acpi.battery.life: -1 >>>hw.acpi.battery.time: -1 >>>hw.acpi.battery.state: 7 >>>hw.acpi.battery.units: 1 >>>hw.acpi.battery.info_expire: 5 >> >>It was a stupid idea, sorry. I will look a little bit more. I >>think I begin to understand what's wrong, but I need to look a >>little bit further. >> >>I also CC to freebsd-acpi@ with a reply-to accordingly. >> > > Few acpi BIOSes does not support _BST (battery status) method, causing > that type of weird sysctl output (since it depends solely on _BST). > Your hope is to use acpiconf(8) i.e acpiconf -i . > Unfortunately, acpiconf itself does not display all possible > values. > > Try this patch against usr.sbin/acpi/acpiconf/acpiconf.c > > http://people.freebsd.org/~ariff/acpi/acpiconf.c.diff > > Hopefully you will have the proper output in terms of percentage. > You won't have advance battery status such as remaining time and few > others. This is a limitation for BIOSes without _BST. > > I believe Nate Lawson is the right person to comment on this. I looked at the patch but had a hard time figuring out what the functional changes are. Most of the changes are just using a convenience pointer to see the struct members and some style misformatting of the printf arguments. (The second line of indentation needs to be 4 spaces indented, see style(9)). What part of this patch is just the functional change? -- Nate