From owner-acpi-jp@jp.FreeBSD.org Thu Nov 28 01:39:32 2002
Received: (from daemon@localhost)
	by castle.jp.FreeBSD.org (8.11.6+3.4W/8.11.3) id gARGdWj43177;
	Thu, 28 Nov 2002 01:39:32 +0900 (JST)
	(envelope-from owner-acpi-jp@jp.FreeBSD.org)
Received: from caduceus.fm.intel.com (fmr02.intel.com [192.55.52.25])
	by castle.jp.FreeBSD.org (8.11.6+3.4W/8.11.3) with ESMTP/inet id gARGbw236913;
	Thu, 28 Nov 2002 01:37:58 +0900 (JST)
	(envelope-from robert.moore@intel.com)
Received: from petasus.fm.intel.com (petasus.fm.intel.com [10.1.192.37])
	by caduceus.fm.intel.com (8.11.6/8.11.6/d: outer.mc,v 1.51 2002/09/23 20:43:23 dmccart Exp $) with ESMTP id gARGXKv13181;
	Wed, 27 Nov 2002 16:33:20 GMT
Received: from fmsmsxvs042.fm.intel.com (fmsmsxvs042.fm.intel.com [132.233.42.128])
	by petasus.fm.intel.com (8.11.6/8.11.6/d: inner.mc,v 1.27 2002/10/16 23:46:59 dmccart Exp $) with SMTP id gARGO0N16064;
	Wed, 27 Nov 2002 16:24:00 GMT
Received: from fmsmsx29.FM.INTEL.COM ([132.233.42.29])
 by fmsmsxvs042.fm.intel.com (NAVGW 2.5.2.11) with SMTP id M2002112708285906542
 ; Wed, 27 Nov 2002 08:28:59 -0800
Received: by fmsmsx29.fm.intel.com with Internet Mail Service (5.5.2653.19)
	id <XTSQL9P3>; Wed, 27 Nov 2002 08:28:17 -0800
Message-ID: <B9ECACBD6885D5119ADC00508B68C1EA0D19B950@orsmsx107.jf.intel.com>
From: "Moore, Robert" <robert.moore@intel.com>
To: "'Mitsuru IWASAKI'" <iwasaki@jp.FreeBSD.org>,
   "Grover, Andrew"
	 <andrew.grover@intel.com>,
   "Moore, Robert" <robert.moore@intel.com>
Cc: acpi-jp@jp.FreeBSD.org, nate@root.org, current@freebsd.org
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2653.19)
Content-Type: text/plain
Reply-To: acpi-jp@jp.FreeBSD.org
Precedence: list
Date: Wed, 27 Nov 2002 08:28:11 -0800
X-Sequence: acpi-jp 1999
Subject: [acpi-jp 1999] RE: ACPI errors and then panic - fixed!
Errors-To: owner-acpi-jp@jp.FreeBSD.org
Sender: owner-acpi-jp@jp.FreeBSD.org
X-Originator: robert.moore@intel.com
X-Distribute: distribute version 2.1 (Alpha) patchlevel 24e+021111


The deleted object problem has been fixed in the 20021122 release which
should be available soon, if not already.  (I was able to reproduce the
problem with your dsdt on previous releases, and I verified it fixed with
the 11/22 release.)

I did not see any mutex issues -- as we found out on Linux, the OSL
implementation of wait_semaphore is often the culprit.

Bob


-----Original Message-----
From: Mitsuru IWASAKI [mailto:iwasaki@jp.FreeBSD.org] 
Sent: Wednesday, November 27, 2002 12:37 AM
To: andrew.grover@intel.com; robert.moore@intel.com
Cc: acpi-jp@jp.FreeBSD.org; nate@root.org; current@freebsd.org
Subject: Re: [acpi-jp 1988] Re: ACPI errors and then panic - fixed!

Hi, Intel folks.
It seems that there is a bug in cached object utilization.
This causes strange behavior;
first evaluation of \_SB_.PCI0.LPC_.EC__.BAT0._BST is OK, but
second (or later) evaluation returns AE_TYPE.

> acpi_cmbat0: error fetching current battery status -- AE_TYPE

The raw DSDT is at:
http://www.root.org/~nate/acpi/ibm.dsdt

I guess that InternalObject was returned to cache in AcpiUtReleaseToCache()
but the same object is still in use somewhere (for ResultObj ?).

I could reproduce this problem with acpica debugger.  Trace output attached.
I'll track this down later.

Thanks

----
% acpicadb ibm.dsdt
Loading Acpi table from file ibm.dsdt
  utmisc-0802 [11] UtAcquireMutex        : Mutex [ACPI_MTX_Namespace]
already acquired by this thread [C25]
  utmisc-0802 [11] UtAcquireMutex        : Mutex [ACPI_MTX_Namespace]
already acquired by this thread [C25]
Parsing
Methods:....................................................................
............................................................................
............................................................................
............................................................................
..........................................................
Table [DSDT] - 1208 Objects with 61 Devices 354 Methods 18 Regions
Acpi table [DSDT] successfully installed and loaded
- f _BST
  \_SB_.PCI0.LPC_.EC__.BAT0._BST (0x80ba0a8) - Method
  \_SB_.PCI0.LPC_.EC__.BAT1._BST (0x80ba6a8) - Method
- debug _SB_.PCI0.LPC_.EC__.BAT0._BST
Executing \_SB_.PCI0.LPC_.EC__.BAT0._BST
00000 #007F XOr (DerefOf (Index (BT0I, 0x00)))

% 
ArgObj:    0x80b9ea8 <Node>            Name BT0I Package 0x80e1ba8
ArgObj:    0x80f9fa8 <Obj>             Integer 0000000000000000
ArgObj:    0x80fe028 <Obj>             Integer 0000000000000000
00000 #0037 [EvalSubTree] (Package (0x0D)
    {
        0x00, 
        0xFFFFFFFF, 
        0xFFFFFFFF, 
        0x01, 
        0x2A30, 
        0x00, 
        0x00, 
        0x01, 
        0x01, 
        "", 
        "", 
        "", 
        ""
    })

