Contribute
Register

[solved] Help me fix DSDT error

Status
Not open for further replies.
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

  • DSDT.aml.zip
    33.7 KB · Views: 214
  • MacIASL_complie_error.png
    MacIASL_complie_error.png
    44.3 KB · Views: 1,258

Feartech

Moderator
Joined
Aug 3, 2013
Messages
27,618
Motherboard
Asus N752VX-OpenCore
CPU
i7-6700HQ / HM170
Graphics
HD 530 1920 x 1080
Mac
  1. iMac
Mobile Phone
  1. 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 2, 2012
Messages
183,968
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
  1. MacBook Air
Mobile Phone
  1. 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

  • MacIASL_DSDT_New error.png
    MacIASL_DSDT_New error.png
    46 KB · Views: 1,199
  • DSDT_fixed_as_Post#3.dsl.zip
    67.6 KB · Views: 185

RehabMan

Moderator
Joined
May 2, 2012
Messages
183,968
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
  1. MacBook Air
Mobile Phone
  1. 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 2, 2012
Messages
183,968
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
  1. MacBook Air
Mobile Phone
  1. 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.
 
Status
Not open for further replies.
Top