From owner-acpi-jp@jp.FreeBSD.org Thu Dec  5 01:09:41 2002
Received: (from daemon@localhost)
	by castle.jp.FreeBSD.org (8.11.6+3.4W/8.11.3) id gB4G9fZ59914;
	Thu, 5 Dec 2002 01:09:41 +0900 (JST)
	(envelope-from owner-acpi-jp@jp.FreeBSD.org)
Received: from petasus.ch.intel.com (petasus.ch.intel.com [143.182.124.5])
	by castle.jp.FreeBSD.org (8.11.6+3.4W/8.11.3) with ESMTP/inet id gB4G9a259907;
	Thu, 5 Dec 2002 01:09:37 +0900 (JST)
	(envelope-from robert.moore@intel.com)
Received: from fmsmsxvs043.fm.intel.com (fmsmsxvs043.fm.intel.com [132.233.42.129])
	by petasus.ch.intel.com (8.11.6/8.11.6/d: solo.mc,v 1.48 2002/10/16 23:47:34 dmccart Exp $) with SMTP id gB4GAZe11362;
	Wed, 4 Dec 2002 16:10:35 GMT
Received: from fmsmsx019.fm.intel.com ([132.233.42.130])
 by fmsmsxvs043.fm.intel.com (NAVGW 2.5.2.11) with SMTP id M2002120408073817307
 ; Wed, 04 Dec 2002 08:07:38 -0800
Received: by fmsmsx019.fm.intel.com with Internet Mail Service (5.5.2653.19)
	id <Y1QMBV5F>; Wed, 4 Dec 2002 08:09:29 -0800
Message-ID: <B9ECACBD6885D5119ADC00508B68C1EA0D19B96A@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, nin@shikoku.ne.jp
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, 4 Dec 2002 08:09:27 -0800
X-Sequence: acpi-jp 2020
Subject: [acpi-jp 2020] RE: problem in AcpiPsGetNextNamepath() (Re: ????? 
	ACPI (FreeBSD ?))
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

Very interesting.  This is probably related to the fact that methods and
Operation regions cannot be fully parsed in the first pass.  I will look at
the problem today.

Thanks,
Bob


-----Original Message-----
From: Mitsuru IWASAKI [mailto:iwasaki@jp.FreeBSD.org] 
Sent: Wednesday, December 04, 2002 2:45 AM
To: andrew.grover@intel.com; robert.moore@intel.com
Cc: acpi-jp@jp.FreeBSD.org; nin@shikoku.ne.jp
Subject: problem in AcpiPsGetNextNamepath() (Re: [acpi-jp 2010] ????? ACPI
(FreeBSD ?))

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
