Contribute
Register

[solved] Help me fix DSDT error

Joined
Aug 8, 2017
Messages
11
Motherboard
Dell Vostro 15 3568
CPU
i5 7200U
Graphics
Intel HD620
My DSDT file has some errors when compiling by using MacIASL :

Syntax error, unexpected PARSEOP_IF, expecting PARSEOP_CLOSE_PAREN or ','
Syntax error, unexpected PARSEOP_CLOSE_PAREN
Syntax error, unexpected PARSEOP_SCOPE, expecting $end and premature End-Of-File

Please help me fix this error.

Thanks
 

Attachments

Feartech

Moderator
Joined
Aug 3, 2013
Messages
9,075
Motherboard
Asus N752VX-Clover
CPU
i7-6700HQ / HM170
Graphics
HD530 + GTX 950m 1920 x 1080
Mac
iMac
Mobile Phone
iOS
My DSDT file has some errors when compiling by using MacIASL :

Syntax error, unexpected PARSEOP_IF, expecting PARSEOP_CLOSE_PAREN or ','
Syntax error, unexpected PARSEOP_CLOSE_PAREN
Syntax error, unexpected PARSEOP_SCOPE, expecting $end and premature End-Of-File

Please help me fix this error.

Thanks
moved to laptop support
 

RehabMan

Moderator
Joined
May 3, 2012
Messages
192,090
Motherboard
Intel DH67BL
CPU
Core i7-2600K
Graphics
Intel HD 3000
Mac
MacBook Air
Mobile Phone
iOS
My DSDT file has some errors when compiling by using MacIASL :

Syntax error, unexpected PARSEOP_IF, expecting PARSEOP_CLOSE_PAREN or ','
Syntax error, unexpected PARSEOP_CLOSE_PAREN
Syntax error, unexpected PARSEOP_SCOPE, expecting $end and premature End-Of-File

Please help me fix this error.

Thanks
It is a very common error caused by an iasl bug. Easy to fix.

Replace:
Code:
                If (LEqual (PM6H, One))
                {
                    CreateBitField (BUF0, \_SB.PCI0._Y0C._RW, ECRW)  // _RW_: Read-Write Status
                    Store (Zero, ECRW (If (PM0H)
                            {
                                CreateDWordField (BUF0, \_SB.PCI0._Y0D._LEN, F0LN)  // _LEN: Length
                                Store (Zero, F0LN)
                            }))
                }
With:
Code:
                If (LEqual (PM6H, One))
                {
                    CreateBitField (BUF0, \_SB.PCI0._Y0C._RW, ECRW)  // _RW_: Read-Write Status
                    Store (Zero, ECRW)
                }
If (PM0H)
                            {
                                CreateDWordField (BUF0, \_SB.PCI0._Y0D._LEN, F0LN)  // _LEN: Length
                                Store (Zero, F0LN)
                            }
 
Joined
Aug 8, 2017
Messages
11
Motherboard
Dell Vostro 15 3568
CPU
i5 7200U
Graphics
Intel HD620
It is a very common error caused by an iasl bug. Easy to fix.

Replace:
Code:
                If (LEqual (PM6H, One))
                {
                    CreateBitField (BUF0, \_SB.PCI0._Y0C._RW, ECRW)  // _RW_: Read-Write Status
                    Store (Zero, ECRW (If (PM0H)
                            {
                                CreateDWordField (BUF0, \_SB.PCI0._Y0D._LEN, F0LN)  // _LEN: Length
                                Store (Zero, F0LN)
                            }))
                }
With:
Code:
                If (LEqual (PM6H, One))
                {
                    CreateBitField (BUF0, \_SB.PCI0._Y0C._RW, ECRW)  // _RW_: Read-Write Status
                    Store (Zero, ECRW)
                }
If (PM0H)
                            {
                                CreateDWordField (BUF0, \_SB.PCI0._Y0D._LEN, F0LN)  // _LEN: Length
                                Store (Zero, F0LN)
                            }
@RehabMan : Thanks for your support.

I had fixed DSDT as your comment.
But now meet some new errors as my attachment.
My Complile option is ACPI 6.1
 

Attachments

RehabMan

Moderator
Joined
May 3, 2012
Messages
192,090
Motherboard
Intel DH67BL
CPU
Core i7-2600K
Graphics
Intel HD 3000
Mac
MacBook Air
Mobile Phone
iOS
@RehabMan : Thanks for your support.

I had fixed DSDT as your comment.
But now meet some new errors as my attachment.
My Complile option is ACPI 6.1
Remove the superfluous External declarations for each symbol mentioned in the errors.
I have no errors with your file because I'm using the latest iasl (built from source).
 
Joined
Aug 8, 2017
Messages
11
Motherboard
Dell Vostro 15 3568
CPU
i5 7200U
Graphics
Intel HD620
Remove the superfluous External declarations for each symbol mentioned in the errors.
I have no errors with your file because I'm using the latest iasl (built from source).
@RehabMan Please explain in more detail. I'm not proficient in the command.

Thanks
 
Joined
Aug 8, 2017
Messages
11
Motherboard
Dell Vostro 15 3568
CPU
i5 7200U
Graphics
Intel HD620
Simple/obvious...

Look for:
External (IDMN
External (IDPC
External (DLPN

Remove the lines you find.
Thanks @RehabMan .

My DSDT file is fixed. Awesome, Battery status works well without patch after that. :thumbup:
 
Joined
Aug 8, 2017
Messages
11
Motherboard
Dell Vostro 15 3568
CPU
i5 7200U
Graphics
Intel HD620
Simple/obvious...

Look for:
External (IDMN
External (IDPC
External (DLPN

Remove the lines you find.
@RehabMan

Please help explain : I compile DSDT.dsl without errors by fixing 3 errors in Post#1. For the next step, I save it to DSDT.aml. So this DSDT.aml has some error as Post#1. However, My Sierra still work well with this DSDT.aml.

Thanks
 

RehabMan

Moderator
Joined
May 3, 2012
Messages
192,090
Motherboard
Intel DH67BL
CPU
Core i7-2600K
Graphics
Intel HD 3000
Mac
MacBook Air
Mobile Phone
iOS
@RehabMan

Please help explain : I compile DSDT.dsl without errors by fixing 3 errors in Post#1. For the next step, I save it to DSDT.aml. So this DSDT.aml has some error as Post#1. However, My Sierra still work well with this DSDT.aml.

Thanks
By definition an AML has no errors.
Any errors you see after you open it are due to imperfect disassembly.
 
Top