From owner-acpi-jp@jp.freebsd.org  Wed Sep 19 11:10:32 2001
Received: (from daemon@localhost)
	by castle.jp.freebsd.org (8.9.3+3.2W/8.7.3) id LAA36221;
	Wed, 19 Sep 2001 11:10:32 +0900 (JST)
	(envelope-from owner-acpi-jp@jp.FreeBSD.org)
Received: from mass.dis.org (mass.dis.org [216.240.45.41])
	by castle.jp.freebsd.org (8.9.3+3.2W/8.7.3) with ESMTP id LAA36214
	for <acpi-jp@jp.freebsd.org>; Wed, 19 Sep 2001 11:10:29 +0900 (JST)
	(envelope-from msmith@mass.dis.org)
Received: from mass.dis.org (localhost [127.0.0.1])
	by mass.dis.org (8.11.6/8.11.3) with ESMTP id f8J2IPA05465
	for <acpi-jp@jp.freebsd.org>; Tue, 18 Sep 2001 19:18:27 -0700 (PDT)
	(envelope-from msmith@mass.dis.org)
Message-Id: <200109190218.f8J2IPA05465@mass.dis.org>
To: acpi-jp@jp.freebsd.org
In-Reply-To: Message from TOMITA Yoshinori <yoshint@flab.fujitsu.co.jp> 
   of "Tue, 18 Sep 2001 21:48:45 +0900." <ywlvgigu0k2.fsf@cerberus.proc.flab.fujitsu.co.jp> 
Date: Tue, 18 Sep 2001 19:18:25 -0700
From: Mike Smith <msmith@freebsd.org>
Reply-To: acpi-jp@jp.freebsd.org
Precedence: list
X-Distribute: distribute version 2.1 (Alpha) patchlevel 24e+010328
X-Sequence: acpi-jp 1297
Subject: [acpi-jp 1297] Re: Stopped at AcpiExTruncateFor32bitTable+0x13 
Errors-To: owner-acpi-jp@jp.freebsd.org
Sender: owner-acpi-jp@jp.freebsd.org
X-Originator: msmith@freebsd.org

...
> Viewing "objdump -d acpi.ko", I guessed this is because variable
> WalkState has not confirmed != 0.
> 
> | void
> | AcpiExTruncateFor32bitTable (
> |     ACPI_OPERAND_OBJECT     *ObjDesc,
> |     ACPI_WALK_STATE         *WalkState)
> | {
> | 
> |     FUNCTION_ENTRY ();
> | 
> | 
> |     /*
> |      * Object must be a valid number and we must be executing
> |      * a control method
> |      */
> |     if ((!ObjDesc) ||
> |         (ObjDesc->Common.Type != ACPI_TYPE_INTEGER) ||
> |         (!WalkState->MethodNode))
> |     {
> |         return;
> |     }
> 
> 
> So I added
> 
> |         (!WalkState) ||
> 
> in if clause and recompiled & installed.
> 
> But it didn't help kernel from crashing.

It apears to have resolved the problem you were seing, or at least
prevented it from causing a crash.  Andrew, are you looking at this?

> Kernel messages after recompiled are like this :
...
> > acpi_ec0: <embeded controller> port 0x66,0x62 on acpi0
> > acpi_ec0: can't install GPE handler for \_SB_.PCI0.EIO_.EC__ - AE_EXIST
> > device_prove_and_attach: acpi_ec0 attach returned 6
...
> > acpi_ec0: <embedded controller> port 0x66,0x62 on acpi0
> > panic: resource_list_alloc: resource entry is busy
...
> Apparently "acpi_ec0: ... " line appears twice.

This is my fault; the acpi_ec driver does not release its resources
when it fails to attach.  Due to some bad magic, we have to probe
ACPI children twice, so when it tries to attach again, we run into
a bug in the resource list code (it should just fail, not panic).

You should file a PR against this and have it assigned to me so
that I am reminded to fix it. 8)

Regards,
Mike

