We've provided the -cr option to disable the resource descriptor error checking.
This is an interesting problem. On one hand, we would like to provide static (compile
time) error checking as much as possible. On the other hand, the resource descriptors (as
well as most any other ASL/AML object) can be dynamically changed.
We've seen many ACPI tables with invalid resource descriptors (at both compile time
and runtime), and that is the reason the resource descriptor validation was added to the
compiler in the first place.
I don't want to just remove this validation, but yes, perhaps iASL should be able to
recognize that this descriptor may be modified at runtime and therefore a static
validation cannot be performed.
There are at least a few indicators:
1) The descriptor is basically all zeroes
2) There is a CreateXxxField reference to the descriptor
3) There is a Store to the created field
So, perhaps we could detect the above conditions and then disable validation for this
particular descriptor. Note, conditions (2) and (3) may be difficult to detect.
I'm open to suggestions.
From: devel-bounces(a)acpica.org [mailto:email@example.com] On Behalf
Of Thomas Renninger
Sent: Friday, September 10, 2010 2:34 AM
Cc: linux-acpi(a)vger.kernel.org; bjorn.helgaas(a)hp.com
Subject: [Devel] False positive iasl compiler error on resource object?
I have a machine with a _CRS function which shows:
Method (_CRS, 0, NotSerialized)
Name (XY0, ResourceTemplate ()
WordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode,
0x0000, // Granularity
0x0000, // Range Minimum
0x0000, // Range Maximum
0x0000, // Translation Offset
0x0000, // Length
,, _Y10, TypeStatic)
This produces the compiler error:
DSDT.dsl.orig 2364: 0x0000, // Length
Error 4122 - ^ Invalid combination of
Length and Min/Max fixed flags
Because iasl thinks this hits this condition:
Advanced Configuration and Power Interface Specification
Revision 3.0b October 10, 2006
184.108.40.206 Address Space Resource Descriptors
Table 6-38 Valid combination of Address Space Descriptors fields
_LEN _MIF _MAF Definition
0 1 1 (Illegal combination)
But the _CRS function can still fill up the length of this resource object
parts while _CRS gets executed (and the compiler probably does not
take this into account), by e.g.:
CreateWordField (XY0, \_SB.PCI0._CRS._Y10._LEN, LEN9)
Store (Local0, LEN9)
and the resource, returned to OS, might fulfill the ACPI specification and
return a valid length, _MIF, _MAF combination:
_LEN _MIF _MAF Definition
>0 1 1 Fixed size, fixed location resource
_GRA must be 0 and _LEN must be
(_MAX - _MIN +1).
I wonder whether my above assumptions are correct and the
Error 4122 should get removed from the iasl compiler, at least in this
Devel mailing list