From owner-acpi-jp@jp.freebsd.org  Mon Jan  8 17:52:47 2001
Received: (from daemon@localhost)
	by castle.jp.freebsd.org (8.9.3+3.2W/8.7.3) id RAA94668;
	Mon, 8 Jan 2001 17:52:47 +0900 (JST)
	(envelope-from owner-acpi-jp@jp.FreeBSD.org)
Received: from tasogare.imasy.or.jp (daemon@tasogare.imasy.or.jp [202.227.24.5])
	by castle.jp.freebsd.org (8.9.3+3.2W/8.7.3) with ESMTP id RAA94660
	for <acpi-jp@jp.freebsd.org>; Mon, 8 Jan 2001 17:52:47 +0900 (JST)
	(envelope-from iwasaki@jp.FreeBSD.org)
Received: from localhost (iwasaki.imasy.or.jp [202.227.24.92])
	by tasogare.imasy.or.jp (8.11.1+3.4W/3.7W-tasogare/smtpfeed 1.07) with ESMTP id f088qjk20942;
	Mon, 8 Jan 2001 17:52:45 +0900 (JST)
	(envelope-from iwasaki@jp.FreeBSD.org)
To: andrew.grover@intel.com
Cc: acpi-jp@jp.freebsd.org
X-Mailer: Mew version 1.94.1 on Emacs 19.34 / Mule 2.3 (SUETSUMUHANA)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-Id: <20010108175245O.iwasaki@jp.FreeBSD.org>
Date: Mon, 08 Jan 2001 17:52:45 +0900
From: Mitsuru IWASAKI <iwasaki@jp.freebsd.org>
X-Dispatcher: imput version 20000228(IM140)
Lines: 31
Reply-To: acpi-jp@jp.freebsd.org
Precedence: list
X-Distribute: distribute version 2.1 (Alpha) patchlevel 24e+000315
X-Sequence: acpi-jp 1024
Subject: [acpi-jp 1024] Re: amutils.c bug?
Errors-To: owner-acpi-jp@jp.freebsd.org
Sender: owner-acpi-jp@jp.freebsd.org
X-Originator: iwasaki@jp.freebsd.org

Hi, Andrew.  This is a new bug report and fix for it.

Noda-san reported that ACPICA kernel got panic and failed to boot on
FUJITSU FMV-6300NA2 laptop.
The problem is that Interpreter/amutils.c:AcpiAmlTruncateFor32bitTable()
access to a member of WalkState without NULL checking.
With following patch, his machine boots successfully.

--- src/sys/contrib/dev/acpica/Subsystem/Interpreter/amutils.c.orig	Sun Jan  7 21:18:42 2001
+++ src/sys/contrib/dev/acpica/Subsystem/Interpreter/amutils.c	Mon Jan  8 06:09:56 2001
@@ -252,6 +252,7 @@
      */
 
     if ((!ObjDesc) ||
+        (!WalkState) ||
         (ObjDesc->Common.Type != ACPI_TYPE_NUMBER) ||
         (!WalkState->MethodNode))
     {

I think that calling AcpiAmlTruncateFor32bitTable() with WalkState =NULL
seems somewhat strange but checking it in this function would be right thing.

BTW, I noticed evaluating _BIF of FUJITSU FMV-6300NA2 causes ACPICA
internal error.  It seems to be releated with passing object reference
as a method argument problem. Last time we have a similar problem on
LocalVariable, but it's a global named object in this case.
Please refer my another mail (in Japanese).  I'll look at this when I
can get enough time.
We have DSDT data block of this machine and I can send it to you if you want.

Thanks
