Bug 5328 - Access to FieldObject element of Package causes exception
Summary: Access to FieldObject element of Package causes exception
Status: CLOSED CODE_FIX
Alias: None
Product: ACPI
Classification: Unclassified
Component: ACPICA-Core (show other bugs)
Hardware: i386 Linux
: P2 normal
Assignee: Lin Ming
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-09-29 09:05 UTC by Valery A Podrezov
Modified: 2007-12-05 19:36 UTC (History)
1 user (show)

See Also:
Kernel Version: 2.6
Subsystem:
Regression: ---
Bisected commit-id:


Attachments
ASL code to reproduce bug. (2.19 KB, text/plain)
2005-09-29 09:08 UTC, Valery A Podrezov
Details

Description Valery A Podrezov 2005-09-29 09:05:06 UTC
Most recent kernel where this bug did not occur:
Distribution:
Hardware Environment:
Software Environment:
Problem Description:

The Linux kernel ACPI interpreter fails the following
AML test when it is compiled into a simulator. So if an
OEM BIOS includes this code, Linux would fail. 

Steps to reproduce:

Run interpreter with the .asl demo code attached below.
Comment 1 Valery A Podrezov 2005-09-29 09:08:53 UTC
Created attachment 6186 [details]
ASL code to reproduce bug.

The attached demo program shows that if the BufferField or FieldUnit
type objects are elements of some Package and we attempt to retrieve
the values of those elements, than exception AE_AML_OPERAND_TYPE occurs.

INTERNAL BUG NUMBER

   118
Comment 2 Lin Ming 2007-08-20 01:24:46 UTC
Maybe it's NOT a bug.

The code of #1 failed in "LNotEqual(Local1, 0x59)", 
Local1 here is of type BufferField, but the Spec 30b says in section 17.5.66,
both arguments of LNotEqual must each evaluate to an integer, a string, or a buffer, 

---------------------------------------------------------------------------
Syntax
LNotEqual (Source1, Source2) => Boolean
Arguments
Source1 and Source2 must each evaluate to an integer, a string, or a buffer. The data type of Source1 dictates the required type of Source2. Source2 is implicitly converted if necessary to match the type of Source1.
---------------------------------------------------------------------------
Comment 3 Robert Moore 2007-10-11 16:14:21 UTC
I think that the BufferField and Field should be resolved to integers at the time the Packages are created, since the ACPI spec says that package elements can be "data objects" (Integers, Strings, Buffers, Packages) or "control method references").

I'll take this since I have that code open right now for a very similar problem.

Bob
Comment 4 Lin Ming 2007-11-07 18:00:02 UTC
This bug still exists at latest ACPICA (v20071019)
Comment 5 Lin Ming 2007-11-07 18:12:10 UTC
Oh, sorry, seems it's not a bug now.
since the BufferField and Field have been resolved to integers at the time the Packages are created.

Bob, shoule we close this bug now?
Comment 6 Lin Ming 2007-11-07 18:25:20 UTC
Close this bug.

In the latest ACPICA (v20071019), the BufferField and Field would be resolved to integers at the time the Packages are created, as per ACPI spec.
Comment 7 Len Brown 2007-12-05 19:36:38 UTC
Lin Ming reports this tests passes in 20071019.

Also, since this fix was cherry picked from ACPICA 20071019
and shipped in linux-2.6.24-rc4 per bug 9429, this bug is now closed.

Note You need to log in before you can comment on or make changes to this bug.