From owner-acpi-jp@jp.FreeBSD.org Sun Jul 13 04:58:06 2003
Received: (from daemon@localhost)
	by castle.jp.FreeBSD.org (8.11.6p2+3.4W/8.11.3) id h6CJw6n02179;
	Sun, 13 Jul 2003 04:58:06 +0900 (JST)
	(envelope-from owner-acpi-jp@jp.FreeBSD.org)
Received: from cheer.mahoroba.org (IDENT:rpEVX5Exe/Xw9zB6JKEJLsRxAwDiRIKsu4Wo/1azPh2Qz3GLKJN+11SzBBuvzGgV@fbsdjp.mahoroba.org [3ffe:501:185b:801f:240:c7ff:fe99:81eb])
	by castle.jp.FreeBSD.org (8.11.6p2+3.4W/8.11.3) with ESMTP/inet6 id h6CJw5T02174
	for <acpi-jp@jp.FreeBSD.org>; Sun, 13 Jul 2003 04:58:05 +0900 (JST)
	(envelope-from ume@mahoroba.org)
Received: from lyrics.mahoroba.org (IDENT:SzTKtpSZpq/IKsW0AEeW1tb28T4gdOcpnAgEP66A2/ycG+4Zm8mA4G6OYPAmcPpz@lyrics.mahoroba.org [IPv6:3ffe:501:185b:8010:280:88ff:fe03:4841])
	(user=ume mech=CRAM-MD5 bits=0)
	by cheer.mahoroba.org (8.12.9/8.12.9) with ESMTP/inet6 id h6CJunp7001171
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
	Sun, 13 Jul 2003 04:57:53 +0900 (JST)
	(envelope-from ume@mahoroba.org)
Message-ID: <yge4r1recxq.wl%ume@mahoroba.org>
From: Hajimu UMEMOTO <ume@mahoroba.org>
To: acpi-jp@jp.FreeBSD.org, current@freebsd.org
In-Reply-To: <20030711201532.P9216@root.org>
References: <20030711201532.P9216@root.org>
User-Agent: xcite1.38> Wanderlust/2.11.0 (Wonderwall) SEMI/1.14.5
 (Awara-Onsen) FLIM/1.14.5 (Demachiyanagi) APEL/10.5 Emacs/21.3
 (i386--freebsd) MULE/5.0 (=?ISO-2022-JP?B?GyRCOC1MWhsoQg==?=)
X-Operating-System: FreeBSD 5.1-CURRENT
MIME-Version: 1.0 (generated by SEMI 1.14.5 - "Awara-Onsen")
Content-Type: text/plain; charset=US-ASCII
X-Virus-Scanned: by amavisd-new
X-Spam-Status: No, hits=-1.0 required=5.0
	tests=IN_REP_TO,REFERENCES,USER_AGENT
	version=2.55
X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp)
Reply-To: acpi-jp@jp.FreeBSD.org
Precedence: list
Date: Sun, 13 Jul 2003 04:56:49 +0900
X-Sequence: acpi-jp 2413
Subject: [acpi-jp 2413] Re: Problems with 0619 and battery support
Sender: owner-acpi-jp@jp.FreeBSD.org
X-Originator: ume@mahoroba.org
X-Distribute: distribute version 2.1 (Alpha) patchlevel 24e+030702

Hi,

>>>>> On Fri, 11 Jul 2003 20:21:07 -0700
>>>>> Nate Lawson <nate@root.org> said:

nate> I am attempting to import acpica-0619 into FreeBSD.  The basic changes I
nate> made to get things working was to change calls to AcpiGetObjectInfo to use
nate> an ACPI_BUFFER and AcpiEnableGpe instead of AcpiEnableEvent for enabling
nate> our GPE handlers for the EC.  With my changes, it compiles and boots fine.
nate> But it seems battery support is broken.  Here is the dmesg output.

I met similar problem and I cannot get battery status at all on
today's -CURRENT.

    ACPI-0432: *** Error: Handler for [EmbeddedControl] returned AE_NO_HARDWARE_RESPONSE
    ACPI-1287: *** Error: Method execution failed [\\_SB_.PCI0.ISA_.EC0_.RBAT] (Node 0xc3138f20), AE_AML_NO_RETURN_VALUE
    ACPI-1287: *** Error: Method execution failed [\\_SB_.PCI0.ISA_.EC0_.RVSN] (Node 0xc3138ea0), AE_AML_NO_RETURN_VALUE
    ACPI-1287: *** Error: Method execution failed [\\_SB_.PCI0.ISA_.EC0_.BAT0._BST] (Node 0xc3138dc0), AE_AML_NO_RETURN_VALUE

ume@lyrics:1012% apm
APM version: 1.2
APM Management: Disabled
AC Line status: on-line
Battery status: charging
Remaining battery life: invalid value (0xffffffff)
Remaining battery time: unknown
Number of batteries: 2
Battery 0:
        Battery status: not present
Battery 1:
        Battery status: not present
Resume timer: Thu Jan  1 08:59:59 1970
Resume on ring indicator: disabled
APM Capabilities:
        unknown
ume@lyrics:1013% sysctl hw.acpi.battery
hw.acpi.battery.life: -1
hw.acpi.battery.time: -1
hw.acpi.battery.state: 7
hw.acpi.battery.units: 2
hw.acpi.battery.info_expire: 10

nate> I've attached the diff.  Please let me know if there's something I should
nate> be aware of that changed calling _BIF.

Unfortunately, the patch couldn't be compiled.

cc -O -pipe -march=pentium3 -I/usr/src/sys/modules/acpi/../../contrib/dev/acpica  -D_KERNEL -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -fformat-extensions -std=c99 -DKLD_MODULE -nostdinc -I-  -I/usr/src/sys/modules/acpi/../../contrib/dev/acpica -I. -I@ -I@/dev -I@/../include -fno-common -g -mno-align-long-strings -mpreferred-stack-boundary=2 -ffreestanding -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -fformat-extensions -std=c99 -c /usr/src/sys/dev/acpica/acpi.c
/usr/src/sys/dev/acpica/acpi.c: In function `acpi_identify':
bus_if.h:79: warning: inlining failed in call to `BUS_ADD_CHILD'
/usr/src/sys/dev/acpica/acpi.c:264: warning: called from here
/usr/src/sys/dev/acpica/acpi.c: In function `acpi_isa_get_logicalid':
/usr/src/sys/dev/acpica/acpi.c:716: warning: passing arg 2 of `AcpiGetObjectInfo' from incompatible pointer type
/usr/src/sys/dev/acpica/acpi.c:722: error: request for member `Value' in something not a structure or union
/usr/src/sys/dev/acpica/acpi.c:722: error: request for member `Value' in something not a structure or union
/usr/src/sys/dev/acpica/acpi.c:722: error: request for member `Value' in something not a structure or union
/usr/src/sys/dev/acpica/acpi.c:722: error: request for member `Value' in something not a structure or union
/usr/src/sys/dev/acpica/acpi.c:722: error: request for member `Value' in something not a structure or union
/usr/src/sys/dev/acpica/acpi.c:722: error: request for member `Value' in something not a structure or union
/usr/src/sys/dev/acpica/acpi.c:722: error: request for member `Value' in something not a structure or union
	. . .

Sincerely,

--
Hajimu UMEMOTO @ Internet Mutual Aid Society Yokohama, Japan
ume@mahoroba.org  ume@bisd.hitachi.co.jp  ume@{,jp.}FreeBSD.org
http://www.imasy.org/~ume/
