Contribute
Register

[DSDT] - Fixing and compiling a DSDT

Status
Not open for further replies.
Joined
Feb 15, 2015
Messages
16
Motherboard
HP 500-159EG
CPU
i5-4440
Graphics
GT 640
Mac
  1. MacBook Pro
Mobile Phone
  1. iOS
Hi there,
for the past few hours i've been trying to extract my DSDT and fix it so it will work with Clover. I managed to extract all tables from Ubuntu and created a .dsl file with "iasl -e SSDT* -d DSDT" It created a DSDT, but after opening it with MaciASL this is what caught my attention:

Code:
/*     * iASL Warning: There were 10 external control methods found during
     * disassembly, but only 3 were resolved (7 unresolved). Additional
     * ACPI tables may be required to properly disassemble the code. This
     * resulting disassembler output file may not compile because the
     * disassembler did not know how many arguments to assign to the
     * unresolved methods.
     *
     * If necessary, the -fe option can be used to specify a file containing
     * control method external declarations with the associated method
     * argument counts. Each line of the file must be of the form:
     *     External (<method pathname>, MethodObj, <argument count>)
     */
    External (_SB_.PCI0.PAUD.PUAM, MethodObj)    // Warning: Unresolved Method, guessing 0 arguments (may be incorrect, see warning above)
    External (_SB_.PCI0.PEG0.PEGP.EPON, MethodObj)    // Warning: Unresolved Method, guessing 0 arguments (may be incorrect, see warning above)
    External (_SB_.PCI0.RP05.PEGP.EPON, MethodObj)    // Warning: Unresolved Method, guessing 0 arguments (may be incorrect, see warning above)
    External (_SB_.PCI0.XHC_.DUAM, MethodObj)    // Warning: Unresolved Method, guessing 0 arguments (may be incorrect, see warning above)
    External (_SB_.TPM_.PTS_, MethodObj)    // Warning: Unresolved Method, guessing 1 arguments (may be incorrect, see warning above)
    External (PS0X, MethodObj)    // Warning: Unresolved Method, guessing 0 arguments (may be incorrect, see warning above)
    External (PS3X, MethodObj)    // Warning: Unresolved Method, guessing 0 arguments (may be incorrect, see warning above)
...
After applying several cosmetic fixes i managed to save the .dsl file with only one remark:
Code:
13378, 2089, Object is not referenced (Name is within method [HWMC])
(0 errors, 0 warnings, 0 optimizations)
The problem is that after saving it as a ACPI Machine Language Binary, everything i fixed went back to it's original state...

Has anyone an idea how to fix this? Thanks very much.

View attachment tables (copy).zip
PS: I haven't applied any patches like DTGP etc yet.
 
There is just one little problem :p
Im not on a Gigabyte Motherboard which means that im currently on the IDT Audio Codec, but that's not a big deal. Im using the VoodooHDA Kext and im totally happy with it. (I tried to patch the Apple HDA once to support my IDT Codec, the only problem was that almost all Nodes were using EAPD and neither EAPDFix nor CodecCommander managed to fix it. Sound just randomly stopped working and i had to enter Sleep Mode to bring it back online)

P.S.: BTW i dont undestand any of Toledas guides to make Audio/HDMI Audio work.... It seems i need a guide of the guide haha xD
 
After applying several cosmetic fixes i managed to save the .dsl file with only one remark:
Code:
13378, 2089, Object is not referenced (Name is within method [HWMC])
(0 errors, 0 warnings, 0 optimizations)
The problem is that after saving it as a ACPI Machine Language Binary, everything i fixed went back to it's original state...

It is normal. You cannot expect to disassemble an AML standalone. You always must disassemble with SSDTs as context.
 
It is normal. You cannot expect to disassemble an AML standalone. You always must disassemble with SSDTs as context.
I think i did disassemble the DSDT with the SSDTs.... I used " sudo iasl -e SSDT* -d DSDT "
 
I think i did disassemble the DSDT with the SSDTs.... I used " sudo iasl -e SSDT* -d DSDT "

This implies you opened the resulting DSDT.aml directly: "The problem is that after saving it as a ACPI Machine Language Binary, everything i fixed went back to it's original state..."
 
This implies you opened the resulting DSDT.aml directly: "The problem is that after saving it as a ACPI Machine Language Binary, everything i fixed went back to it's original state..."

Wait..
Here is what i did, step by step:
First i booted into Ubuntu and copied all Tables from /sys/firmware/tables to a USB drive
After that i opened the Terminal, installed acpica and entered this command " sudo iasl -e SSDT* -d DSDT " which created the DSDT.dsl file.
I booted back into Yosemite, opened the DSDT.dsl with MaciASL and did some cosmetic patches like renaming _T_0 and 0x00 to Zero....
Finally i saved the DSDT first as DSDT.dsl and then as DSDT.aml.

I wanted to check if the DSDT was correct so I opened the DSDT.aml with MaciASL and all the patches were gone. I think I understand now that this last step is unnecessary...
 
..
I wanted to check if the DSDT was correct so I opened the DSDT.aml with MaciASL and all the patches were gone. I think I understand now that this last step is unnecessary...

This is your mistake. That will disassemble DSDT.aml standalone without context of the related SSDTs.
 
This is your mistake. That will disassemble DSDT.aml standalone without context of the related SSDTs.

Ok thanks, so after saving the DSDT as a ACPI Machine Language Binary file, I just need to copy it to Clover/ACPI/patched? That's all?
But still, should i just ignore all the unresolved methods? I think i've read somewhere that they are used by Windows and not necessary for Mac....

I patched my DSDT with all the necessary patches like IRQ/RTC/HPET fix and so on but sometimes my Mac reboots/crashes without any KP and nothing in the Log...
 
Ok thanks, so after saving the DSDT as a ACPI Machine Language Binary file, I just need to copy it to Clover/ACPI/patched? That's all?

Yes.

But still, should i just ignore all the unresolved methods? I think i've read somewhere that they are used by Windows and not necessary for Mac....

It depends... An unresolved symbol that is accessed during runtime will cause an ACPI interpreter abort, causing whatever method that was executing to be terminated unexpectedly. A careful review to be certain any unresolved externals are protected by a check of CondRefOf is a good idea.

I patched my DSDT with all the necessary patches like IRQ/RTC/HPET fix and so on but sometimes my Mac reboots/crashes without any KP and nothing in the Log..

Remove EmuVariableUefi-64.efi to use native nvram, and you may find you get a notification/report after restart.
 
Status
Not open for further replies.
Back
Top