Skip to contentSkip to conversation

iASL mishandles Alias() when target is longer than single nameseg

Devel bugzilla-daemon at mail.opensource.intel.com 1 participant 11 messages Aug 19, 2009 – Jan 16, 2013 1 message not in the archive ACPI component architecture (acpica)

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): bug-738-162@

bugzilla-daemon at mail.opensource.intel.com

#1 lore raw

show_bug.cgi?id=738

Sergiy <yakovlevs(a)ami.com> changed:

What |Removed |Added
----------------------------------------------------------------------------

             Status|RESOLVED                    |REOPENED
                 CC|                            |yakovlevs(a)ami.com
         Resolution|FIXED                       |

--- Comment #4 from Sergiy <yakovlevs(a)ami.com> 2009-08-19 14:49:24 --- In iASL ACPICA is version 20090730.
I found exactly opposite issue now.
I have a following code

Name(PRSA, ResourceTemplate(){ // Link name: LNKA
IRQ(Level, ActiveLow, Shared, LLKA) {3,4,5,6,7,10,11,12,14,15}
})
Alias(PRSA,PRSB) // Link name: LNKB
iASL generates not found error:

Here is the iASL output:
Build\PCItree.asl 194: Alias(PRSA,PRSB) // Link name: LNKB
Error 4064 - ^ Object not found or not accessible from
scope (PRSB)

Signature · 3 lines
Configure bugmail: userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
#2 lore raw
In reply to a message not in the archive

show_bug.cgi?id=738

Sergiy <yakovlevs(a)ami.com> changed:

What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |blocker

--- Comment #5 from Sergiy <yakovlevs(a)ami.com> 2009-08-20 08:25:19 --- Little bit more information about this issue.

the code I'm compiling is like that:

Scope(\_SB){
...
Name(PRSA, ResourceTemplate(){ // Link name: LNKA
IRQ(Level, ActiveLow, Shared, LLKA) {3,4,5,6,7,10,11,12,14,15}
})
Alias(PRSA,PRSB) // Link name: LNKB
Alias(PRSA,PRSC) // Link name: LNKC
Alias(PRSA,PRSD) // Link name: LNKD
Alias(PRSA,PRSE) // Link name: LNKE
Alias(PRSA,PRSF) // Link name: LNKF
Alias(PRSA,PRSG) // Link name: LNKG
Alias(PRSA,PRSH) // Link name: LNKH
....
}//end _SB Scope.

iASL generates error only at first ALIAS statement!

This is an Output screen:
//----------------------------------------------- Intel ACPI Component Architecture
ASL Optimizing Compiler version 20090730 [Jul 30 2009] Copyright (C) 2000 - 2009 Intel Corporation Supports ACPI Specification Revision 4.0

Build\PCItree.asl 194: Alias(PRSA,PRSB) // Link name: LNKB
Error 4064 - ^ Object not found or not accessible from
scope (PRSB)

Board\IO\WPCD376I\WPCD376I.ASL 180: Acquire(MUT0, 0xFFF)
Warning 1104 - Possible operator timeout is ignored ^

ASL Input: C:\A_WORK\DQ35JO_PCI.WRK\2009_08_05.RES\DSDT.ASL - 64 lines, 261805 bytes, 1720 keywords
Compilation complete. 1 Errors, 1 Warnings, 0 Remarks, 460 Optimizations

BTW same issue exists in previouse version of iASL ACPI 3.0a compatible.

Thanks,
Sergiy.

Signature · 3 lines
Configure bugmail: userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
#3 lore raw
In reply to a message not in the archive

show_bug.cgi?id=738

--- Comment #6 from Ming Lin <ming.m.lin(a)intel.com> 2009-08-23 19:32:45 --- Created an attachment (id=841)
--> (attachment.cgi?id=841)
proposed patch

Scope(\_SB){
Name(PRSA, ResourceTemplate(){ // Link name: LNKA
IRQ(Level, ActiveLow, Shared, LLKA) {3,4,5,6,7,10,11,12,14,15}
Alias(PRSA,PRSB) // Link name: LNKB
})
}

LdNamespace1Begin pushes ScopeInfo for _SB, PRSA, LLKA but LdNamespace2Begin only pushes ScopeInfo for _SB, _PRSA (no LLKA)

3 ScopeInfo pops in LdCommonNamespaceEnd, but only 2 ScopInfo pushes in LdNamespace2Begin. This causes AcpiNsLookup fails for "PRSA", because ScopInfo was popped.

The attached one line patch fixes the bug.
I tested it with ASLTS, it works.

Sergiy, would you please help to test the patch?

Thanks.

Signature · 3 lines
Configure bugmail: userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
#4 lore raw
In reply to a message not in the archive

show_bug.cgi?id=738

--- Comment #7 from Sergiy <yakovlevs(a)ami.com> 2009-08-24 07:55:25 --- The problem is that in my Project I'm using parts of ASL code generated By the tool we call VeB.

The code I've used as example to report this bug was, unfortunately the one auto-generated.
In this case workaround in ASL code will not help. We ar not going to modify the tool.

Are you guys planing on fixing this bug generically in next revisions of iASL?

I've tried: your fix it works, also I've tried using full relative name like Alias(\_SB.PRSA,PRSB) it also solves compilation problem.

But this is not the fix for me.

Could you tell me when to expect iASL with fix for this issue.

Thanks,
Sergiy.

Signature · 3 lines
Configure bugmail: userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
#5 lore raw
In reply to a message not in the archive

show_bug.cgi?id=738

Ming Lin <ming.m.lin(a)intel.com> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |ming.m.lin(a)intel.com

--- Comment #8 from Ming Lin <ming.m.lin(a)intel.com> 2009-08-24 18:49:40 --- (In reply to comment #7)

Quoted 2 lines

But this is not the fix for me.

Sorry, but I'm confused.
Have you tried the patch at comment #6?
http://bugzilla.acpica.org/attachment.cgi?id=841
It's a C code patch, not an ASL code workaround. It's the fix for you.

Quoted 3 lines

Could you tell me when to expect iASL with fix for this issue.

Would you please help to test the patch?
If the patch fixes the bug, we will integrate it into next release.

Thanks,
Lin Ming

Signature · 3 lines
Configure bugmail: userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
#6 lore raw
In reply to a message not in the archive

show_bug.cgi?id=738

--- Comment #9 from Sergiy <yakovlevs(a)ami.com> 2009-08-25 08:57:09 --- Dear Lin Ming

Sorry for confusing you but I thought that first 2 lines of comment #6 was the patch:
Scope(\_SB){
Name(PRSA, ResourceTemplate(){ // Link name: LNKA
IRQ(Level, ActiveLow, Shared, LLKA) {3,4,5,6,7,10,11,12,14,15}
Alias(PRSA,PRSB) // Link name: LNKB
})
}
Since it slightly different from what I have:

In your comment #6, Alias term located inside the scope of the ResourceTemplate,
In example I was giving it was outside.
Scope(\_SB){
Name(PRSA, ResourceTemplate(){ // Link name: LNKA
IRQ(Level, ActiveLow, Shared, LLKA) {3,4,5,6,7,10,11,12,14,15}
})
Alias(PRSA,PRSB) // Link name: LNKB
}

Meanwhile I'm having some difficulty building ACPI CA components.

I can't build the sources It is possible I'm missing some libraries or tools. I have VC 9 the project is for VC 6.

So could you please build the version of iASL with that fix for me and attach *.exe file to this ISSUE tracker. Or send it directly to my email <yakovlevs(a)ami.com> with changed extension like iasl.ex_.

I'll be happy to test it with my project.

Thanks,
Sergiy.

Signature · 3 lines
Configure bugmail: userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
#7 lore raw
In reply to a message not in the archive

show_bug.cgi?id=738

--- Comment #10 from Bob Moore <robert.moore(a)intel.com> 2009-08-25 09:09:29 --- iASL uses bison/flex to generate.

I can build a windows version of iASL for you to try.

I'm in the middle of rebuilding a crashed machine, so please be patient, it might take a day or so.

Thanks,
Bob

Signature · 3 lines
Configure bugmail: userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
#8 lore raw
In reply to a message not in the archive

show_bug.cgi?id=738

Ming Lin <ming.m.lin(a)intel.com> changed:

What |Removed |Added
----------------------------------------------------------------------------

 Attachment #841 is|0                           |1

obsolete| |

--- Comment #11 from Ming Lin <ming.m.lin(a)intel.com> 2009-08-26 00:22:43 --- Created an attachment (id=842)
--> (attachment.cgi?id=842)
new patch

The patch at comment #6 was wrong, please ignore it.
It works just because the uninitialized "Node" accidentally points to a valid node.

Scope(\_SB){
Name(PRSA, ResourceTemplate(){ // Link name: LNKA
IRQ(Level, ActiveLow, Shared, LLKA) {3,4,5,6,7,10,11,12,14,15}
})
Alias(PRSA,PRSB) // Link name: LNKB
}

In LdNamespace1Begin, node "LLKA" is pushed, as below

#0  AcpiDsScopeStackPush  at ../dispatcher/dswscope.c:189
#1  AcpiNsLookup at ../namespace/nsaccess.c:761
#2  LdLoadResourceElements at aslload.c:337
#3  LdNamespace1Begin at aslload.c:536

But LdNamespace2Begin does not push "LLKA", as below

    /* Ignore Ops with no namespace node */

    Node = Op->Asl.Node;
    if (!Node)
    {
        return (AE_OK);
    }

Below patch sets the "Node" for Op, so LdNamespace2Begin can also push "LLKA" just as LdNamespace1Begin does.

compiler/aslload.c +1 -0
index e61e062..8d06544 100644
@@ -353,6 +353,7 @@ LdLoadResourceElements (
 
     Node->Value = (UINT32) Op->Asl.Value.Integer;
     Node->Op = Op;
+    Op->Asl.Node = Node;
 
     /*
      * Now enter the predefined fields, for easy lookup when referenced
Signature · 3 lines
Configure bugmail: userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
#9 lore raw
In reply to a message not in the archive

show_bug.cgi?id=738

--- Comment #12 from Bob Moore <robert.moore(a)intel.com> 2009-09-01 13:24:58 --- The comments starting at #4 are describing a different problem than the original.

Signature · 3 lines
Configure bugmail: userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
#10 lore raw
In reply to a message not in the archive

show_bug.cgi?id=738

Bob Moore <robert.moore(a)intel.com> changed:

What |Removed |Added
----------------------------------------------------------------------------

             Status|REOPENED                    |RESOLVED
         Resolution|                            |FIXED

--- Comment #13 from Bob Moore <robert.moore(a)intel.com> 2009-09-03 14:03:02 --- Fixed in ACPICA version 20090903.

Signature · 3 lines
Configure bugmail: userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
#11 lore raw
In reply to a message not in the archive

https://acpica.org/bugzilla/show_bug.cgi?id=738

Lv Zheng <lv.zheng(a)intel.com> changed:

What |Removed |Added
----------------------------------------------------------------------------

             Status|RESOLVED                    |CLOSED
                 CC|                            |lv.zheng(a)intel.com
Signature · 3 lines
Configure bugmail: https://acpica.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.