RE: Latest acpica

Moore, Robert
2005-09-08T16:50:03Z

The compilation errors of this form:

dsdt_org.dsl 149: , AddressRangeMemory,
TypeStatic)

Error 1094 - Missing ResourceSource string (required)
^

are caused by specifying a ResourceIndex with no corresponding
ResourceString. We recently tightened up the iASL compiler to detect
this condition and flag it as an error, as per the following text from
the ACPI specification, 3.0:

DWord Address Space Descriptor

Byte 46
Resource Source Index
(Optional) Only present if Resource Source (below) is present. This
field gives an index to the specific resource descriptor that this
device consumes from in the current resource template for the device
object pointed to in Resource Source.

A relevant ASL source statement is below.

DWordMemory (ResourceProducer, PosDecode, MinFixed,
MaxFixed, Cacheable, ReadWrite,

0x00000000, // Address Space Granularity

0x000A0000, // Address Range Minimum

0x000BFFFF, // Address Range Maximum

0x00000000, // Address Translation Offset

0x00020000, 0x00,,

, AddressRangeMemory, TypeStatic)

It is the 0x00 that is causing the issue, it should not be there.

However, we recently changed the disassembler to detect this condition
within existing AML code and to emit ASL code that is compilable. In
this case, the statement comes out of the disassembler like this:

DWordMemory (ResourceProducer, PosDecode, MinFixed,
MaxFixed, Cacheable, ReadWrite,

0x00000000, // Address Space Granularity

0x000A0000, // Address Range Minimum

0x000BFFFF, // Address Range Maximum

0x00000000, // Address Translation Offset

0x00020000,,,

, AddressRangeMemory, TypeStatic)

Which is compilable code.

This change to the disassembler appeared in ACPICA version 20050617:

Enhanced the disassembler to emit compilable code in the face of
incorrect AML resource descriptors. If the optional ResourceSourceIndex
is present, but the ResourceSource is not, do not emit the
ResourceSourceIndex in the disassembly. Otherwise, the resulting code
cannot be compiled without errors.

> -----Original Message-----
> From: acpi-devel-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org [mailto:acpi-devel-
> admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org] On Behalf Of Thomas Renninger
> Sent: Thursday, September 08, 2005 3:16 AM
> To: ML ACPI-devel
> Subject: [ACPI] Latest acpica
>
> acpica-unix-20050902.tar.gz
> is now available under:
> http://developer.intel.com/technology/iapc/acpi/downloads.htm
> Thanks.
>
> There is one concern:
> This has been discussed some weeks ago.
> The compiler throws dozens of errors on some DSDTs:
>
> DSDT.dsl 777: , AddressRangeMemory, TypeStatic)
> Error 1084 - Missing ResourceSource string (required) ^
>
> I cannot find the mail now, but IIRC Len said this was added to
identify
> how many DSDTs violate specs (is it optional or not?) and should be
> removed
> again later.
>
> The patch attached lowers the error to a warning, so that you get a
> compiled
> DSDT as output.
> Not sure, maybe the error/warning case should be reverted totally?
>
>
> Thomas

-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf