RehabMan
Moderator
- Joined
- May 2, 2012
- Messages
- 181,011
- Motherboard
- Intel DH67BL
- CPU
- i7-2600K
- Graphics
- HD 3000
- Mac
- Mobile Phone
Hello RehabMan,
I have question regarding AML files decompiled with the IASL you linked to in your guide. I followed everything exactly as the guide says. Your statement regarding never to open an AML in MAcIASL and to always decompile with IASL first then use the DSL generated file with MacIASL. Your main reason was for difficult errors to handle but mostly for External References am I correct?
What I have found with the IASL is a strange way it handles Operands such as the Store, If, And, Or etc etc. Something seems odd with the way IASL handles this compared to MacIASL. MacIASL handles this quite well actually.
This example below shows IASL strips the "And" where the MacIASL does not. I have to re-write my Logical "And" error fix patch because of this as one example only. The IASL DSL DSDT in the example below has stripped out the "And". Wouldn't it be more difficult to fix these errors over Externals especially when you can have so many operands in a DSDT, that could be a very complex thing to fix/handle (patches)?
Examples:
AML File opened directly in MacIASL:
Code:Scope (\_SB.PCI0) { Name (SUPP, 0x00) Name (CTRL, 0x00) Method (_OSC, 4, NotSerialized) // _OSC: Operating System Capabilities { If (LEqual (Arg0, ToUUID ("33db4d5b-1ff7-401c-9657-7441c03dd766") /* PCI Host Bridge Device */)) { CreateDWordField (Arg3, 0x00, CDW1) CreateDWordField (Arg3, 0x04, CDW2) CreateDWordField (Arg3, 0x08, CDW3) Store (CDW2, SUPP) Store (CDW3, CTRL) If (LNotEqual (And (SUPP, 0x16), 0x16)) { And (CTRL, 0x1E) }
DSL Decompiled with IASL:
Code:Scope (\_SB.PCI0) { Name (SUPP, 0x00) Name (CTRL, 0x00) Method (_OSC, 4, NotSerialized) // _OSC: Operating System Capabilities { If ((Arg0 == ToUUID ("33db4d5b-1ff7-401c-9657-7441c03dd766") /* PCI Host Bridge Device */)) { CreateDWordField (Arg3, 0x00, CDW1) CreateDWordField (Arg3, 0x04, CDW2) CreateDWordField (Arg3, 0x08, CDW3) SUPP = CDW2 CTRL = CDW3 If (((SUPP & 0x16) != 0x16)) { (CTRL & 0x1E) }
Nothing strange there. New version of iasl supports "C" style operands, both in the compiler and disassembler.
You failed to use the "-dl" flag as recommended in the guide.