Contribute
Register

DSDT compilation

Joined
Mar 10, 2020
Messages
2
Motherboard
Samsung Blerg
CPU
Intel Blerg
Graphics
Intel Extreme Blerg
EDIT: Sorry for the code formatting. if there is a way to get the indentation correct, do let me know and I will fix this.

Hi All,

I pulled all my SSDT & DSDT files and decompiled them using(v6) of iasl.

This is command is what I used to do the de-compilation as a group:
./iasl -da -dl *.dat

The point being that any variable referenced across files would be correctly mapped.

My ultimate goal is just to adjust my EmbeddedControl variables so that they are all a single byte in size. That seems pretty straight forward, but before I get there I wanted to ensure that my DSDT, in it's current state, compiles. Sadly it doesn't.

At current I'm experiencing two primary errors.

The first one seems pretty trivial:

Method (ADBG, 1, Serialized)
{
If (CondRefOf (MDBG))
{
Return (MDBG)
Arg0
}

Return (Zero)
}

It looks like that Arg0 following the first return shouldn't be there. It doesn't make sense as a code path anyway. The return above it is unconditional, so its unlikely that Arg0 would ever be executed. That said, I just wanted to be sure as I'm not super familiar with the ACPI syntax.

The second one is more of a head scratcher:

Method (_CRS, 0, NotSerialized) // _CRS: Current Resource Settings
{
Name (SBFI, ResourceTemplate ()
{
I2cSerialBusV2 (0x0020, ControllerInitiated, 0x00061A80,
AddressingMode7Bit, "\\_SB.PCI0.I2C0",
0x00, ResourceConsumer, _Y26, Exclusive, )
Interrupt (ResourceConsumer, Level, ActiveLow, Exclusive, , , )
{
0x0000001F,
}
})
/*snip*/
}

The error occurs at the call to Name(). I went looking through the ACPI spec and name is a method of two parameter, so that seems correct. The second parameter here is a call to ResourceTemplate() which take in nothing directly but accepts a macro/anonymous list of ResourceMarcroTerms.

As defined by:
ResourceMacroTerm := DMATerm | DWordIOTerm | DWordMemoryTerm | DWordSpaceTerm | EndDependentFnTerm | ExtendedIOTerm | ExtendedMemoryTerm | ExtendedSpaceTerm | FixedDMATerm | FixedIOTerm | GpioIntTerm | GpioIOTerm | I2CSerialBusTerm | InterruptTerm | IOTerm | IRQNoFlagsTerm | IRQTerm | Memory24Term | Memory32FixedTerm | Memory32Term | QWordIOTerm | QWordMemoryTerm | QWordSpaceTerm | RegisterTerm | SPISerialBusTerm | StartDependentFnTerm | StartDependentFnNoPriTerm | UARTSerialBusTerm | VendorLongTerm | VendorShortTerm | WordBusNumberTerm | WordIOTerm | WordSpaceTerm

The two methods called in that list are I2cSerialBusV2() which return something of type I2CSerialBusTerm, and Interrupt() which returns something of type InterruptTerm. Both of which are compatible with the ResourceMacroTerm typing listed above. I've checked the input list of both functions and they are, at least, being called with the correct number of terms (although some are obviously null).

The brackets/parens look correct and reflect the example code listed in the spec for acpi v6.1.

The error I receive is:
3/13/20, 12:30:29 PM, iASL4lyLQT.dsl(12598) : error 6126 - syntax error, unexpected PARSEOP_NAMESEG, expecting '('

I though maybe it might be the call to the parent Method(). The spec lists Method() as requriing 6 terms and a list, but there are identical looking calls to Method() all over the DSDT file that don't seem to throw an error.

At this point, I think I am perhaps compiling/decompiling with the wrong version of iasl, but can't be sure. Any ideas?
 
Last edited:
Joined
Mar 10, 2020
Messages
2
Motherboard
Samsung Blerg
CPU
Intel Blerg
Graphics
Intel Extreme Blerg
Actually it looks like if I decompile with 5.1, all but the first error are resolved. So I think I am in the clear.
 
Last edited:
Top