Contribute
Register

Asus Rampage IV Extreme Guide: Create your DSDT in 5 min using MacIASL.

Status
Not open for further replies.

shilohh

Moderator
Joined
Jan 1, 2012
Messages
1,752
Motherboard
Asus Prime Z490-A
CPU
i9-10850K
Graphics
RX 5700 XT
Mac
  1. MacBook Pro
  2. Mac Pro
Mobile Phone
  1. Android
Asus X79 DSDT Guide: Create your DSDT in 5 min using MacIASL.

Tested and working for:
Rampage IV Extreme BIOSs 4206, 4802, 4804 & 4901
Rampage IV Gene BIOS? Tested by TurbineSeaplane. Just use the R4E patch list.
Rampage IV Black Edition - Work in progress. Need people to post IORegs and report issues.
X79-Deluxe (plan to attempt some edits for the Marvell SATA that only show as ejectable ESATA)


NOTES:
I use the DSDT (Differentiated System Description Table) to rectify IRQ conflicts and patch or add onboard devices to make them functional or more compatible with OS X. You could also choose to add code to inject external devices like PCI cards or USB Bluetooth dongles in the DSDT but I choose to use SSDTs (Secondary System Description Table) for this because they are more modular and you may use many of them in conjunction with each other. They can also easily be removed or modified if the removable hardware they reference is moved or removed. SSDTs add to or override code from the DSDT when the ACPI tables are being loaded by the OS.

Because the DSDT is extracted from the motherboards BIOS (or UEFI), using a DSDT that was extracted on a different machine with different devices installed, may not work on your system. Even if you have an identical motherboard and BIOS version. It is always best extract, patch, and compile a DSDT from your own system. Also, whenever you update your BIOS you need to first delete your patched DSDT and then extract and patch a new one from the new BIOS.


Basic terminology for those of you who are new:

"/Extra" = The folder named "Extra" at the root of your boot drive that was created by Chameleon/Chimera when the bootloader was installed if you use Chameleon/Chimera.

"/System/Library/Extensions" ( /S/L/E or SLE ) = The folder named "Extensions" that is located inside the folder named "Library" that is located inside the folder named "System" that is located at the rood of your boot drive.

"EFI Partition" = A hidden 200MB partition created by OS X on every Mac OS Extended (HFS+) formatted drive. The EFI System partition (ESP) is only used by OS X on real Macs for storing and then booting from and installing EFI firmware updates but the Clover bootloader installs all it's files to and boots from this partition in UEFI mode. It is also possible to install the Chameleon bootloader to the EFI partition.

Motherboard Abbreviations:

R4E = Rampage IV Extreme
R4BE = Rampage IV Black Edition
R4G = Rampage IV Gene
X79D = X79-Deluxe

Guide:


Download MacIASL and the appropriate list of DSDT patches for your motherboard (Links at the bottom of this post).


Make sure you have all your PCI devices functioning correctly and installed in the locations you want them.

1) Delete your old DSDT if you already have one installed. If you don't, your old DSDT will be extracted instead of the unmodified one from the BIOS.

Clover EFI:
Mount your boot drive's EFI partition and Delete DSDT.aml from /Volumes/EFI/EFI/CLOVER/ACPI/patched if present and re-boot.

89993-10a.jpg


Chameleon & Chimera:

Delete DSDT.aml from /Extra if present and re-boot.


72119-02trashdsdt.jpg


2) Make sure your BIOS is updated to the version you want. If it is not, update it before you continue.

3) Extract & patch your DSDT.

Clover EFI:
Boot your system into the Clover GUI and press the F4 key at the Clover GUI to extract your motherboard's ACPI files to EFI/CLOVER/ACPI/origin. Boot your system.

3a) Set MaciASL's ACPI version.

Open MacIASL.app.


72118-03open.jpg


Set MacIASL to “ACPI 5.0” in it’s Preferences. EDIT: Set MacIASL to “ACPI 4.0” in it’s Preferences. Apple still compiles their DSDTs with ACPI 4.0. If you use 5.0 you'll be fighting unnecessarily with errors that don't exist in 4.

72117-04prefs.jpg



72116-04prefs3.jpg


Close the Preferences window.

3b) Open your
unmodified DSDT.

Clover EFI:
Close the Pre-Edited DSDT window if one is open. Mount clover's EFI partition. Navigate to /Volumes/EFI/EFI/CLOVER/ACPI/origin and right click DSDT.aml. Choose open with MaciASL.
138591-screen-shot-2015-05-25-12-06-41-am.png
Chameleon & Chimera:
choose File > New From ACPI > DSDT if a
Pre-Edited DSDT window isn't already open.

72115-05new.jpg


Click Patch.

72114-06patchbut.jpg


A "Patch Text" widow will open.

72111-08close.jpg


Download and open the "***_DSDT_Patch_***.txt" from the attachments at the bottom of this post that corresponds to your motherboard.

72112-07opntxt.jpg


Select all the text from the "***_DSDT_Patch_***.txt" and copy it.

72110-08ctext.jpg


Then paste it into the top half of the “Patch Text” window that opened in the previous step.

72109-08vtxt.jpg


Wait a moment until the “Apply” button activates and click it.


When it finishes, close the window.

Click the “Compile” button.

72107-09compile.jpg


If you set the compiler to ACPI 5.0, you will see some comments left over. These are not a problem and can be ignored. If you really want to fix them, click them in the "Compiler Summary" window. MacIASL will skip to and momentarily highlight the corresponding method. Change the referenced method from “NotSerialized” to “Serialized” and repeat for each one. Again, this is not necessary and the comments are not a problem so I won't go into further detail. This guide is meant to get you your new DSDT in as little time as possible. I didn't fix them in my DSDT.

72108-09coments.jpg


From the "File" menu choose "Save As" to open the save dialog.

72106-10save.jpg


Change the File Format to "ACPI Machine Language Binary" from the drop down menu.

72105-10save1.jpg


Change the "Save As" name to "DSDT.aml". Click "Save" and close MacIASL.

72103-10save3.jpg



4) Install your new DSDT

Clover EFI:
Mount your boot drive's EFI partition and
Place your new DSDT.aml in /Volumes/EFI/EFI/CLOVER/ACPI/patched.

89993-10a.jpg


Chameleon & Chimera:

Place your new DSDT.aml in /Extra.

72102-11mov.jpg




IMPORTANT: If you have previously installed “Without DSDT” audio from MultiBeast, delete “HDAEnabler1.kext” from /System/Library/Extensions before continuing.

Install your AppleHDA.kext if you haven’t already done so. Either choose “With DSDT” from MultiBeast or place your AppleHDA.kext on the Desktop and run KextBeast. You will need to re-install this kext after OS updates overwrite it so keep a copy handy.

72101-12kext.jpg


Re-Boot and you're done
:D

EDIT LOG:
07-10-2014 - Changed the name from "Ausus Rampage IV Extreme" to "Asus X79 DSDT Guide".
07-09-2014 - Updated patch list. Removed Interim IvyBridge AppleHDA (Not working in 10.9.4) and info.
04-27-2014 - Updated patch list.
04-24-2014 - Updated patch list.
04-23-2014 - Major update to the patch list.
 

Attachments

  • 89993-10a.jpg
    89993-10a.jpg
    46.8 KB · Views: 924
  • R4E_DSDT_Patch_10-2014.txt
    23.7 KB · Views: 1,550
  • R4BE_DSDT_Patch_10-2014.txt
    20.8 KB · Views: 1,178
  • X79D_DSDT_Patch_10-2014.txt
    15 KB · Views: 922
Last edited by a moderator:
Hi and thanks for the patches!

I´m building a new machine with this motherboard and i7 4820k cpu.

I´ve updated to latest bios 4503. DSDT was extracted with Ubuntu live usb. After applying the patches when i try to compile the DSDT i get a lot of errors like:

Code:
Invalid object type for reserved name (_PLD: found Integer at index 0, Buffer required)

After some reading i need to change a bunch of these:

Code:
Name (_PLD, Package (0x10)  // _PLD: Physical Location of Device
                        {
                            0x81, 
                            Zero, 
                            Zero, 
                            Zero, 
                            [... different values ...]
                            Zero, 
                            Zero, 
                            Zero
                        })

into this:

Code:
Name (_PLD, Package ([COLOR=#ff0000]One[/COLOR])  // _PLD: Physical Location of Device
                        {
                            [COLOR=#ff0000]Buffer () {[/COLOR]
                            0x81, 
                            Zero, 
                            Zero, 
                            Zero, 
                            [... different values ...]
                            Zero, 
                            Zero, 
                            Zero
                            [COLOR=#ff0000]}[/COLOR]
                        })

But i don´t know how to do it automatically. If it isn´t too much work for you, could you help me writing the code for this patch?

Thanks
 
Solved!

I read your patches code and I found the usb patch:

Code:
# Fix USB
into_all all code_regex (Name\s*\(_PLD,\s*)Buffer(\s\(0x10\)[^\)]*) replaceall_matched begin %1Package(0x01) { Buffer%2} end;

where there was a problem:

Code:
# Fix USB
into_all all code_regex (Name\s*\(_PLD,\s*)[COLOR=#ff0000]Package[/COLOR](\s\(0x10\)[^\)]*) replaceall_matched begin %1Package(0x01) { Buffer%2} end;

Cool! Now I can compile.
Thanks for your work
 
Solved!

I read your patches code and I found the usb patch:
Code:
# Fix USB
into_all all code_regex (Name\s*\(_PLD,\s*)Buffer(\s\(0x10\)[^\)]*) replaceall_matched begin %1Package(0x01) { Buffer%2} end;
where there was a problem:
Code:
# Fix USB
into_all all code_regex (Name\s*\(_PLD,\s*)[COLOR=#ff0000]Package[/COLOR](\s\(0x10\)[^\)]*) replaceall_matched begin %1Package(0x01) { Buffer%2} end;
Thanks! Patch Lists Fixed and Updated in Links.

Issue: Some versions of the BIOS have missing "Package" for the PLD and some have missing "Buffer". OSX DSDT need both a Package and a Buffer for these values.

Solution: Added your modified patch to the lists so now the name matching will detect and fix it for either one.
 
Thank you for your great effort. It's really helpful! By the way, could you let us know what's been changed between v4 and v5 please?
 
Thank you for your great effort. It's really helpful! By the way, could you let us know what's been changed between v4 and v5 please?
Fixed some bad edits so you should update
 
Hi Shilohh,

just tried your DSDT patches, and one thing I saw is that then - compared to my current SSDT based solution - the PCI slots information is gone again in Sys profiler - maybe still a bug in your patches?

And I also noticed that you use a LOT more patches than Andrews SSDT solution I am using right now.

So I would be quite curious what all these additional patches actually do! Apart from the issue I noted above, these two solutions seem to run the same way, so I wonder where is the additional benefit.

While I know what some of these patches mean, I have no clue about others:

XRES, CBDx, IOC0, PP70, SASP, HECI, MBSD etc

maybe include a more thorough description in the patch files?

Any insights would be greatly appreciated, and keep up the good work :)
 
@F-Dev
The Ethernet isn't a pci card but he has it injected that way for some reason. I never asked him why. He also adds HDMI gpu edits to slots 1&2 but they look specific to newer GPUs to me (with the ports he's added). I don't use hdmi audio so I've never added these. He may have added edits to these slots to make them appear in the pci cards section of profiler but it's just cosmetic if he did. I can do this in the dsdt too but I haven't yet (not a bug). Until recently I've kept my edits limited to only the ones that gave measurable functionality but with the release of the Mac Pro, I've started adding the missing things that the OS might look for (only if they DON'T correspond to actual hardware that doesn't exist on my motherboard). I guess I can start adding the cosmetic stuff too. The devices you asked about are present in the Mac Pro 6,1 dsdt and the OS uses them for it's own internal workings. They don't correspond to apple only devices from the Mac Pro. They are there for the OSs internal function with the x79 hardware. That said you probably won't notice a difference if you remove them (for now). Some of them are for Vt-d. Some are for power management and more.

The only reason I haven't switched to SSDT injection is because I haven't been able to find a way to change the irq mapping in the ssdt. This must be done in the dsdt and to me, it's indispensable. It allows the USB header to work for front panel case usb2 ports and prevents random USB freezes and system crashes as well as other conflicts throughout the pci chain. If I'm doing anything in the dsdt, I'll do as much as I can there. This also eliminates the need for an extra ssdt. If I could do everything in an ssdt, I'd just use 2 ssdts but I see no reason to use a dsdt and 2 ssdts.
 
@F-Dev
The Ethernet isn't a pci card but he has it injected that way for some reason. I never asked him why. He also adds HDMI gpu edits to slots 1&2 but they look specific to newer GPUs to me (with the ports he's added).

OK I see your point, but my TITAN is also missing, so the PCI-Slots section in Sys Profiler is completely empty then. I think this is merely cosmetic, but still ...

The devices you asked about are present in the Mac Pro 6,1 dsdt and the OS uses them for it's own internal workings. They don't correspond to apple only devices from the Mac Pro. They are there for the OSs internal function with the x79 hardware. That said you probably won't notice a difference if you remove them (for now). Some of them are for Vt-d. Some are for power management and more.

Yeah, VT-d may be a good point! I am sure you know this was enabled with BIOS 4804, but when activating this setting, I get an unstable system. So here your DSDT might in fact fix something.

But still I am quite curious about the specific nature of these patches. It is very hard to obtain Information about this, and I like to know what I am doing ;)

The only reason I haven't switched to SSDT injection is because I haven't been able to find a way to change the irq mapping in the ssdt. This must be done in the dsdt and to me, it's indispensable. It allows the USB header to work for front panel case usb2 ports and prevents random USB freezes and system crashes as well as other conflicts throughout the pci chain.

Ahhh I know this problem very well - have been battling this for months now! As it seems there are different DSDT Edits which do basically the same, and there is also the possibility of doing a clover patch which also brings back the USB ports. Doing this via SSDT edit only seems in fact to be impossible :(

If I'm doing anything in the dsdt, I'll do as much as I can there. This also eliminates the need for an extra ssdt. If I could do everything in an ssdt, I'd just use 2 ssdts but I see no reason to use a dsdt and 2 ssdts.

Well, why not? Personally I'd prefer as much as possible done via SSDT. So, why not using 2 SSDTs, and patch the IRQs _only_ via DSDT patch? That's what I do at the moment, so that my DSDT is as "native" as possible.
 
OK, so I tried your patched DSDT with VT-d enabled and unfortunately my System is still not able to boot.

As before, as soon as I enable VT-d I get a lot of "SMCReadKey" Errors when booting up, and System just hangs shortly after that, does not finish booting:

Code:
04.05.14 18:23:58,000 kernel[0]: SMC::smcReadKeyAction ERROR: kSMCReadKeyComm/kSMCReadKeyWithSMCComm failed for key BEMB (kSMCSuccess)
04.05.14 18:23:58,000 kernel[0]: SMC::smcReadKeyAction ERROR: kSMCReadKeyComm/kSMCReadKeyWithSMCComm failed for key DICT (kSMCSuccess)
04.05.14 18:23:58,000 kernel[0]: SMC::smcReadKeyAction ERROR: kSMCReadKeyComm/kSMCReadKeyWithSMCComm failed for key BEMB (kSMCSuccess)
04.05.14 18:23:58,000 kernel[0]: SMC::smcReadKeyAction ERROR WKTP kSMCBadArgumentError(0x89) fKeyHashTable=0x0xffffff808740f100
04.05.14 18:23:58,000 kernel[0]: SMC::smcReadKeyAction ERROR: kSMCReadKeyComm/kSMCReadKeyWithSMCComm failed for key F0Ac (kSMCSuccess)
04.05.14 18:23:58,000 kernel[0]: SMC::smcReadKeyAction ERROR: kSMCReadKeyComm/kSMCReadKeyWithSMCComm failed for key PCTR (kSMCSuccess)
04.05.14 18:23:58,000 kernel[0]: SMC::smcReadKeyAction ERROR: kSMCReadKeyComm/kSMCReadKeyWithSMCComm failed for key PG0R (kSMCSuccess)

(and lots more)

But I am not sure if this could also be due to the "HAXM" kext (needed for Android Emu) installed, bc I also get a lot of HAXM Errors then.
 
Status
Not open for further replies.
Back
Top