Bug 1729

Summary: use an implicit return value - AE_AML_NO_RETURN_VALUE
Product: ACPI Reporter: Luming Yu (luming.yu)
Component: ACPICA-CoreAssignee: Robert Moore (Robert.Moore)
Status: CLOSED CODE_FIX    
Severity: high CC: acpi-bugzilla
Priority: P2    
Hardware: i386   
OS: Linux   
Kernel Version: 2.4, 2.6 Subsystem:
Regression: --- Bisected commit-id:
Attachments: a patch for fixing this issue
implicit return patch -- against 2.6

Description Luming Yu 2003-12-22 19:23:32 UTC
FreeBSD does have a workaround for this.  We use an implicit return value:
http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/contrib/dev/acpica/psparse.c.diff?r1=1.20&r2=1.21&f=h

-Nate

On Fri, 19 Dec 2003, Brown, Len wrote:
> AML is like C -- if there is no return statement from a routine (method)
> then nothing gets returned.
>
> Unfortunately the microsoft implementation of the AML interpreter
> behaves as if there is a return statement, and so bugs in AML get
> through windows validation.
>
> For this to work on the ACPICA AML interpreter, you need to insert the
> missing return statements in the AML -- we don't have a workaround for
> this type of BIOS bug.
>
> -Len
~
Comment 1 Luming Yu 2003-12-22 19:25:33 UTC
Created attachment 1713 [details]
a patch for fixing this issue

Just port Free BSD's workaround to linux
Comment 2 Len Brown 2004-03-24 18:16:14 UTC
Seen on Tecra 8000:
http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=107458
ACPI-0109: *** Error: No object was returned from [\_SB_.LNKA._STA] (Node 
c118688c), AE_NOT_EXIST 

Seen on Compaq Evo N620c in bug 2083
    ACPI-1120: *** Error: Method execution failed [\_TZ_.C202] (Node cff7ed20),
AE_AML_NO_RETURN_VALUE

\
Comment 3 Luming Yu 2004-04-01 00:52:36 UTC
*** Bug 2083 has been marked as a duplicate of this bug. ***
Comment 4 Luming Yu 2004-06-03 23:55:36 UTC
Created attachment 3065 [details]
implicit return patch -- against 2.6

There are two different way for returning value.
1. through pointer: call_return_desck (for interface : acpi_evaluate_object)
2. push the result object onto result_stack.

My patch fixes the second scenario.

Notice: This patch merge the previous patch (Iwasaki San iwasaki@freebsd.org)
Comment 5 Len Brown 2004-11-03 15:32:27 UTC
A different patch for this shipped in ACPICA 20040816
which is included in Linux-2.6.9 -- closing