Contribute
Register

Solved > Syntax Problem with SSDT-7 file

Joined
Jan 18, 2020
Messages
3
Motherboard
MSI z370 Gaming PLUS
CPU
Intel i5 8600k
Graphics
AMD Radeon RX580
Hello,

I have compiled every DSDT/SSDT.dsl files to .aml successfully except one file. It says that there is a syntax error within the code and I cannot resolve it by my self as I am not familiar with the syntax. (All other files worked ootb using the newest iasl without the -da option (as I am running a Coffe Lake Intel CPU, i5 8600k))
Only thing MaciASL showed me were some warnings in one or two files but no errors at all and for most of the files not even a warning - except this one file. So even if the SSDT-7-sensrhub file might not be needed (which is said by some other websites) I'd love to have it successfully compiled - if possible - to have everything 100% done.

I hope some of you are familiar with the syntax and are able to find the mistake:

Code:
/*
* Intel ACPI Component Architecture
* AML/ASL+ Disassembler version 20180427 (64-bit version)(RM)
* Copyright (c) 2000 - 2018 Intel Corporation
*
* Disassembling to non-symbolic legacy ASL operators
*
* Disassembly of SSDT-7-sensrhub.aml, Sat Jan 25 11:33:59 2020
*
* Original Table Header:
*     Signature        "SSDT"
*     Length           0x0000029F (671)
*     Revision         0x02
*     Checksum         0x48
*     OEM ID           "INTEL "
*     OEM Table ID     "sensrhub"
*     OEM Revision     0x00000000 (0)
*     Compiler ID      "INTL"
*     Compiler Version 0x20160422 (538313762)
*/
DefinitionBlock ("", "SSDT", 2, "INTEL ", "sensrhub", 0x00000000)
{
    External (_SB_.GGOV, MethodObj)    // 1 Arguments (from opcode)
    External (_SB_.PCI0.I2C0.DFUD, DeviceObj)    // (from opcode)
    External (_SB_.SGOV, MethodObj)    // 2 Arguments (from opcode)
    External (GPBS, UnknownObj)    // (from opcode)
    External (SDS0, UnknownObj)    // (from opcode)
    External (SHAP, UnknownObj)    // (from opcode)
    External (USBH, UnknownObj)    // (from opcode)

    Scope (\)
    {
        Device (SHAD)
        {
            Name (_HID, EisaId ("INT33D0"))  // _HID: Hardware ID
            Name (_CID, EisaId ("PNP0C02"))  // _CID: Compatible ID
            Method (_STA, 0, Serialized)  // _STA: Status
            {
                If (LOr (And (SDS0, One), And (USBH, One)))
                {
                    Return (0x0F)
                }

                Return (Zero)
            }

            Method (_DSM, 4, Serialized)  // _DSM: Device-Specific Method
            {
                Name (PGCE, Zero)
                Name (PGCD, Zero)
                Name (PGCG, 0x2E)
                Name (DFUE, Zero)
                Name (DFUD, Zero)
                Name (OLDV, Zero)
                Name (PGCV, Zero)
                Name (DFUV, Zero)
                If (LEqual (Arg0, ToUUID ("03c868d5-563f-42a8-9f57-9a18d949b7cb")))
                {
                    If (LEqual (SHAP, One))
                    {
                        Store (0x3A, PGCG)
                    }

                    If (LGreaterEqual (ToInteger (Arg1), One))
                    {
                        Switch (ToInteger (Arg2))
                        {
                            Case (Zero)
                            {
                                Return (Buffer (One)
                                {
                                     0x0F                                          
                                })
                            }
                            Case (One)
                            {
                                Store (DerefOf (Index (Arg3, Zero)), PGCE)
                                Store (DerefOf (Index (Arg3, One)), PGCD)
                                Store (\_SB.GGOV (0x02010016), OLDV)
                                \_SB.SGOV (0x02010016, PGCE)
                                If (LGreater (PGCD, Zero))
                                {
                                    Sleep (PGCD)
                                    \_SB.GGOV (0x02010016)
                                    OLDV
                                }

                                If (LEqual (\_SB.GGOV (0x02010016), One))
                                {
                                    Sleep (0x96)
                                    If (LEqual (\_SB.GGOV (0x02010014), One)){}
                                    Else
                                    {
                                        Notify (\_SB.PCI0.I2C0.DFUD, One)
                                    }
                                }

                                Return (Zero)
                            }
                            Case (0x02)
                            {
                                Store (DerefOf (Index (Arg3, Zero)), DFUE)
                                Store (DerefOf (Index (Arg3, One)), DFUD)
                                Store (\_SB.GGOV (0x02010014), OLDV)
                                \_SB.GGOV (0x02010014)
                                DFUE
                                If (LGreater (DFUD, Zero))
                                {
                                    Sleep (DFUD)
                                    \_SB.GGOV (0x02010014)
                                    OLDV
                                }

                                Return (Zero)
                            }
                            Case (0x03)
                            {
                                Store (\_SB.GGOV (0x02010014), DFUV)
                                Store (\_SB.GGOV (0x02010016), PGCV)
                                Return (Package (0x02)
                                {
                                    PGCV,
                                    DFUV
                                })
                            }

                        }

                        Return (Zero)
                    }

                    Return (Zero)
                }

                Return (Buffer (One)
                {
                     0x00                                          
                })
            }
        }
    }
}

Bildschirmfoto 2020-01-25 um 13.13.38.png


There are no patches applied to any of my files. They are vanilla and disassembled with newest version of iASL.
 

Attachments

  • SSDT-7-sensrhub.dsl
    5.1 KB · Views: 20
Last edited:
Joined
Jan 18, 2020
Messages
3
Motherboard
MSI z370 Gaming PLUS
CPU
Intel i5 8600k
Graphics
AMD Radeon RX580
Solved it by myself, you need to put the variables like OLDV into the () of the methods as a parameter. E.g.:

Code:
\_SB.GGOV (0x02010014)
OLDV

to

Code:
\_SB.GGOV (0x02010014, OLDV)

Needed to do that with 3 variables that for some reasons where out of the ().
 
Joined
Sep 2, 2020
Messages
1
Motherboard
Asus UN68U
CPU
Intel i7-8550U
Graphics
Intel Iris UHD 620
@Aurash:
I have an Asus UN68U and the SSDT-7-sensrhub.dsl I extracted was exactly the same as yours. Obviously, the MacIASL compilation yielded exactly the same errors:

Screenshot 2020-09-02 at 15.03.12.png


Read line #23 in the DSL you posted:

Code:
    External (_SB_.GGOV, MethodObj)    // 1 Arguments (from opcode)

Function _SB.GGOV takes only one argument. You overloaded it with 2 arguments...

You are better off skipping that aml file than using the one with your "corrections".

Unfortunately there isn't much about fixing those compilation errors. Rehabman's guide states the following:

'For some errors, you can simply remove the line of code causing the error.'

I did that, removing the 2 offending 'OLDV' and 'DFUE' on their own, and was able to compile the dsl file and export it to aml error free. I think you're better off doing that.
 
Last edited:
Top