From owner-acpi-jp@jp.FreeBSD.org Wed Dec  4 19:44:56 2002
Received: (from daemon@localhost)
	by castle.jp.FreeBSD.org (8.11.6+3.4W/8.11.3) id gB4Aiuv90370;
	Wed, 4 Dec 2002 19:44:56 +0900 (JST)
	(envelope-from owner-acpi-jp@jp.FreeBSD.org)
Received: from tasogare.imasy.or.jp (root@tasogare.imasy.or.jp [202.227.24.5])
	by castle.jp.FreeBSD.org (8.11.6+3.4W/8.11.3) with ESMTP/inet id gB4Ait290365
	for <acpi-jp@jp.FreeBSD.org>; Wed, 4 Dec 2002 19:44:55 +0900 (JST)
	(envelope-from iwasaki@jp.FreeBSD.org)
Received: from localhost (iwa@tasogare.imasy.or.jp [202.227.24.5])
	by tasogare.imasy.or.jp (8.11.6+3.4W/8.11.6/tasogare) with ESMTP/inet id gB4Aiii67596;
	Wed, 4 Dec 2002 19:44:44 +0900 (JST)
	(envelope-from iwasaki@jp.FreeBSD.org)
Message-Id: <20021204.194436.38718936.iwasaki@jp.FreeBSD.org>
To: andrew.grover@intel.com, robert.moore@intel.com
Cc: acpi-jp@jp.FreeBSD.org, nin@shikoku.ne.jp
From: Mitsuru IWASAKI <iwasaki@jp.FreeBSD.org>
In-Reply-To: <20021201.211030.278724527.nin@polka.mail.plala.or.jp>
References: <20021201.211030.278724527.nin@polka.mail.plala.or.jp>
X-Mailer: Mew version 2.2 on Emacs 20.7 / Mule 4.0 (HANANOEN)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Reply-To: acpi-jp@jp.FreeBSD.org
Precedence: list
Date: Wed, 04 Dec 2002 19:44:36 +0900
X-Sequence: acpi-jp 2017
Subject: [acpi-jp 2017] problem in AcpiPsGetNextNamepath() (Re:
 =?ISO-2022-JP?B?GyRCJE8kOCRhJEYkThsoQg==?=
 ACPI (FreeBSD =?ISO-2022-JP?B?GyRCSlQbKEI=?=))
Errors-To: owner-acpi-jp@jp.FreeBSD.org
Sender: owner-acpi-jp@jp.FreeBSD.org
X-Originator: iwasaki@jp.FreeBSD.org
X-Distribute: distribute version 2.1 (Alpha) patchlevel 24e+021111

Hi, Intel folks.

I've found a problem in AcpiPsGetNextNamepath().  IIRC, during table
loading, ACPI CA don't attach actual Object to Method Node.  This
may cause a problem.  Typical ASL code is like this:
----
Method(PMBS) {
    Return(0x2e)
}

OperationRegion(PWRG, SystemIO, PMBS, 0x4f)
----

In OperationRegion definition, Method PMBS is specified, but
PMBS doesn't have attached Object at this point, so AcpiPsGetNextNamepath()
ends with AE_AML_INTERNAL...

Debugging output is attached for your reference.
Please refer the actual ASL submitted by Ninomiya-san in
[acpi-jp 2010] also.

Thanks

tbinstal-0176 [03] TbMatchSignature      : Table [DSDT] matched and is a required ACPI table
tbinstal-0233 [02] TbInstallTable        : DSDT located at 0x80a0000
  nsload-0293 [02] NsLoadTable           : AML block at 0x80a0024
  nsload-0310 [02] NsLoadTable           : **** Loading table into namespace ****
 utalloc-0231 [05] UtAcquireFromCache    : Object 0x80983a8 from State Object Cache
dswstate-0481 [05] DsResultStackPush     : Results=0x80983a8 State=0x809c028
  nsload-0184 [04] NsOneCompleteParse    : *PARSE* pass 1 parse
 psparse-1225 [05] PsParseAml            : Entered with WalkState=0x809c028 Aml=0x80a0024 size=0
 psparse-1249 [05] PsParseAml            : State=0x809c028
 dswload-0212 [06] DsLoad1BeginOp        : Op=0x0 State=0x809c028
 dswload-0249 [06] DsLoad1BeginOp        : State=0x809c028 Op=0x0 [Method] Cannot already exist
nsaccess-0385 [07] NsLookup              : Null scope prefix, using root node (0x80952b8)
nsaccess-0484 [07] NsLookup              : Searching relative to prefix scope [0x80952b8]
nsaccess-0588 [07] NsLookup              : Simple Pathname (1 segment, Flags=8)
  nsdump-0157 [07] NsPrintPathname       : [PMBS]
nssearch-0175 [09] NsSearchNode          : Searching \ [0x80952b8] For PMBS (type Method)
nssearch-0247 [09] NsSearchNode          : Name PMBS Type [Method] not found at 0x8098528
 nsalloc-0339 [09] NsInstallNode         : PMBS added to 0x80952b8 at 0x8098ba8
nsaccess-0723 [07] NsLookup              : Setting current scope to [PMBS] (0x8098ba8)
 psparse-0794 [06] PsParseLoop           : Opcode 0014 [Method] Op 0x8098ca8 Aml 0x80a002a AmlOffset 00000
 dswload-0399 [06] DsLoad1EndOp          : Op=0x8098ca8 State=0x809c028
 dswload-0452 [06] DsLoad1EndOp          : (Method): Popping scope for Op 0x8098ca8
dswscope-0264 [07] DsScopeStackPop       : Popped object type (Method)
 utalloc-0231 [09] UtAcquireFromCache    : Object 0x8098c28 from State Object Cache
dswstate-0481 [09] DsResultStackPush     : Results=0x8098da8 State=0x809c428
 dswload-0212 [06] DsLoad1BeginOp        : Op=0x0 State=0x809c028
 dswload-0249 [06] DsLoad1BeginOp        : State=0x809c028 Op=0x0 [Region] Cannot already exist
nsaccess-0385 [07] NsLookup              : Null scope prefix, using root node (0x80952b8)
nsaccess-0484 [07] NsLookup              : Searching relative to prefix scope [0x80952b8]
nsaccess-0588 [07] NsLookup              : Simple Pathname (1 segment, Flags=8)
  nsdump-0157 [07] NsPrintPathname       : [PWRG]
nssearch-0175 [09] NsSearchNode          : Searching \ [0x80952b8] For PWRG (type Region)
nssearch-0247 [09] NsSearchNode          : Name PWRG Type [Region] not found at 0x8098ba8
 nsalloc-0339 [09] NsInstallNode         : PWRG added to 0x80952b8 at 0x8098e28
 utalloc-0231 [06] UtAcquireFromCache    : Object 0x8098ca8 from Extended Parse Node Cache
 psparse-0794 [06] PsParseLoop           : Opcode 5B80 [OperationRegion] Op 0x8098ca8 Aml 0x80a0034 AmlOffset 0000A
 utalloc-0231 [07] UtAcquireFromCache    : Object 0x8098d28 from Parse Node Cache
 utalloc-0231 [07] UtAcquireFromCache    : Object 0x8098da8 from State Object Cache
 dswload-0212 [06] DsLoad1BeginOp        : Op=0x8098ea8 State=0x809c028
 psparse-0794 [06] PsParseLoop           : Opcode 002D [-NamePath-] Op 0x8098ea8 Aml 0x80a0035 AmlOffset 00011
nsaccess-0385 [08] NsLookup              : Null scope prefix, using root node (0x80952b8)
nsaccess-0484 [08] NsLookup              : Searching relative to prefix scope [0x80952b8]
nsaccess-0588 [08] NsLookup              : Simple Pathname (1 segment, Flags=3)
  nsdump-0157 [08] NsPrintPathname       : [PMBS]
nssearch-0175 [10] NsSearchNode          : Searching \ [0x80952b8] For PMBS (type Untyped)
nssearch-0222 [10] NsSearchNode          : Name PMBS Type [Method] found at 0x8098ba8
  psargs-0376 [07] PsGetNextNamepath     : Control Method - 0x8098ba8 Desc 0x0 Path=0x80a0035
  psargs-0398 [07] PsGetNextNamepath     : Control Method - 0x8098ba8 has no attached object
