Jump to content
shiecldk

[WIP] Z97X-UD7 TH thunderbolt DSDT

22 posts in this topic

Recommended Posts

Advertisement

Use iasl5

Thanks!

I download a new MaciASL with new iasl5 inside, and now there is no errors at all.

(But coming with 81 Warrings and hundreds of Remarks and Optimzations.... lol)

Share this post


Link to post
Share on other sites

In order to test thunderbolt dsdt codes (for Hot swapping & TB Ethernet), I'm trying to embed Real Mac's OperationRegion GPIO into my dsdt.

But I have repeated names in OperationRegion GPR in my original dsdt and recognized as errors.

 

Could anyone help me to combine these two together? :rolleyes:

        OperationRegion (GPIO, SystemIO, \GPBS, 0x64)
        Field (GPIO, ByteAcc, NoLock, Preserve)
        {
                ,   5, 
            GU05,   1, 
            Offset (0x01), 
            Offset (0x02), 
            Offset (0x03), 
            Offset (0x04), 
            GD00,   1, 
                ,   3, 
            GD04,   1, 
                ,   5, 
            GD10,   1, 
                ,   1, 
            GD12,   1, 
                ,   1, 
            GD14,   1, 
            Offset (0x07), 
            GD24,   1, 
            Offset (0x08), 
            Offset (0x0C), 
                ,   3, 
            GP03,   1, 
            GP04,   1, 
            GP05,   1, 
            GP06,   1, 
            GP07,   1, 
            GP08,   1, 
            GP09,   1, 
            GP10,   1, 
            GP11,   1, 
            GP12,   1, 
            GP13,   1, 
            GP14,   1, 
            GP15,   1, 
            GP16,   1, 
            GP17,   1, 
            GP18,   1, 
            GP19,   1, 
            GP20,   1, 
            GP21,   1, 
            GP22,   1, 
            GP23,   1, 
            GP24,   1, 
                ,   2, 
            GP27,   1, 
            GP28,   1, 
            Offset (0x10), 
            Offset (0x18), 
            GB00,   8, 
            GB01,   8, 
            GB02,   8, 
            GB03,   8, 
            Offset (0x2C), 
            GI00,   1, 
                ,   2, 
            GI03,   1, 
            GI04,   1, 
            GI05,   1, 
            GI06,   1, 
            Offset (0x2D), 
            GI08,   1, 
            GI09,   1, 
            GI10,   1, 
            GI11,   1, 
            Offset (0x2E), 
            Offset (0x2F), 
            Offset (0x30), 
            Offset (0x31), 
            Offset (0x32), 
            Offset (0x33), 
            Offset (0x34), 
            Offset (0x35), 
            GD40,   1, 
            GD41,   1, 
            GD42,   1, 
                ,   1, 
            GD44,   1, 
                ,   1, 
            GD46,   1, 
            Offset (0x36), 
                ,   6, 
            GD54,   1, 
                ,   4, 
            GD59,   1, 
            GD60,   1, 
            Offset (0x38), 
                ,   1, 
            GP33,   1, 
                ,   2, 
            GP36,   1, 
            Offset (0x39), 
            GP40,   1, 
            GP41,   1, 
            GP42,   1, 
                ,   1, 
            GP44,   1, 
            GP45,   1, 
            GP46,   1, 
            Offset (0x3A), 
            GP48,   1, 
            GP49,   1, 
            GP50,   1, 
            GP51,   1, 
            GP52,   1, 
            GP53,   1, 
            GP54,   1, 
                ,   4, 
            GP59,   1, 
            GP60,   1, 
            Offset (0x3C), 
            Offset (0x40), 
            Offset (0x41), 
            Offset (0x42), 
            Offset (0x43), 
            Offset (0x44), 
                ,   4, 
            GD68,   1, 
            GD69,   1, 
            GD70,   1, 
            GD71,   1, 
            GD72,   1, 
            GD73,   1, 
            GD74,   1, 
                ,   4, 
                ,   8, 
                ,   8, 
            Offset (0x48), 
            GP64,   1, 
                ,   3, 
            GP68,   1, 
            GP69,   1, 
            Offset (0x49), 
            GP72,   1, 
            GP73,   1, 
            GP74,   1, 
            Offset (0x4A), 
            Offset (0x4B), 
            Offset (0x4C)
        }
        OperationRegion (GPR, SystemIO, GPBS (), 0x0400)
        Field (GPR, ByteAcc, NoLock, Preserve)
        {
            GU00,   8, 
            GU01,   8, 
            GU02,   8, 
            GU03,   8, 
            GIO0,   8, 
            GIO1,   8, 
            GIO2,   8, 
            GIO3,   8, 
            Offset (0x0C), 
            GL00,   8, 
            GL01,   8, 
            GL02,   8, 
            GP24,   1, 
                ,   2, 
            GP27,   1, 
            GP28,   1, 
            Offset (0x10), 
            Offset (0x18), 
            GB00,   8, 
            GB01,   8, 
            GB02,   8, 
            GB03,   8, 
            Offset (0x2C), 
            GIV0,   8, 
            GIV1,   8, 
            GIV2,   8, 
            GIV3,   8, 
            GU04,   8, 
            GU05,   8, 
            GU06,   8, 
            GU07,   8, 
            GIO4,   8, 
            GIO5,   8, 
            GIO6,   8, 
            GIO7,   8, 
            GL04,   8, 
            GL05,   8, 
            GL06,   8, 
            GL07,   8, 
            Offset (0x40), 
            GU08,   8, 
            GU09,   8, 
            GU0A,   8, 
            GU0B,   8, 
            GIO8,   8, 
            GIO9,   8, 
            GIOA,   8, 
            GIOB,   8, 
            GL08,   8, 
            GL09,   8, 
            GL0A,   8, 
            GL0B,   8
        }

Share this post


Link to post
Share on other sites

Sounds like your ACPI tables were disassembled incorrectly; when I did it (extracted them from the UEFI image), I got zero errors. You need to extract all of the SSDTs with the DSDT, place them in the same folder, and disassembled them properly with iasl:

iasl -da -dl *.aml

With this, I get zero errors in the DSDT:

ASL Input:     DSDT.dsl - 20243 lines, 632926 bytes, 9026 keywords
AML Output:    DSDT.aml - 74594 bytes, 2266 named objects, 6760 executable opcodes

Compilation complete. 0 Errors, 81 Warnings, 129 Remarks, 340 Optimizations

I'm not sure if GPIO is used for Thunderbolt hotplugging. I do not have any Thunderbolt hardware, but I think it might (key word might, I am not 100% sure) it has to do with the _GPE methods, or some of the other methods under the Thunderbolt device in a real Mac's ACPI tables. I've attached a disassembled ACPI table dump from an iMac15,1 (Retina 5K) [thanks to Pavo] which has the same Thunderbolt 2 controller (Intel DSL5520). SSDT-4 contains the Thunderbolt device. Perhaps it could be of some use.

 

Also, I think you can drop all of your OEM SSDTs except for the SaSsdt, which contains your graphics devices and HDMI audio devices.

iMac15,1 ACPI.zip

Share this post


Link to post
Share on other sites

Sounds like your ACPI tables were disassembled incorrectly; when I did it (extracted them from the UEFI image), I got zero errors. You need to extract all of the SSDTs with the DSDT, place them in the same folder, and disassembled them properly with iasl:

iasl -da -dl *.aml

With this, I get zero errors in the DSDT:

ASL Input:     DSDT.dsl - 20243 lines, 632926 bytes, 9026 keywords
AML Output:    DSDT.aml - 74594 bytes, 2266 named objects, 6760 executable opcodes

Compilation complete. 0 Errors, 81 Warnings, 129 Remarks, 340 Optimizations

I'm not sure if GPIO is used for Thunderbolt hotplugging. I do not have any Thunderbolt hardware, but I think it might (key word might, I am not 100% sure) it has to do with the _GPE methods, or some of the other methods under the Thunderbolt device in a real Mac's ACPI tables. I've attached a disassembled ACPI table dump from an iMac15,1 (Retina 5K) [thanks to Pavo] which has the same Thunderbolt 2 controller (Intel DSL5520). SSDT-4 contains the Thunderbolt device. Perhaps it could be of some use.

 

Also, I think you can drop all of your OEM SSDTs except for the SaSsdt, which contains your graphics devices and HDMI audio devices.

Thanks! I've figured it out. That's exactly what I've done.  :)

Btw, I use the latest complied iasl, which is 20150619, by google searching and found hackintoshosx.com... :P  As I don't know how to comply the newest 20150818 source code from acpica.org in OSX lol.

 

That's the same ACPI files I'm investigating right now! Ha ha. I'm trying to insert all thunderbolt-related codes located in SSDT-4 (PcieTbt) to my current DSDT. And some required keys is located in GPIO in DSDT. I'm dropping SSDTs like CpuPm and Cpu0Ist with help of Clover.

 

MaciAsl consoled errors of repeated names in "OperationRegion GPR", after I inserted "OperationRegion GPIO". So I tried to delete the entire "OperationRegion GPR", and there is another error of "Object does not exist (GL08)". Therefore, I added GPR's GL08 into GPIO:

        OperationRegion (GPIO, SystemIO, GPBS (), 0x64)
        Field (GPIO, ByteAcc, NoLock, Preserve)
        {
                ,   5, 
            GU05,   1, 
//skip...
            Offset (0x40),
            GL08,   8,
            Offset (0x41), 
//skip...
            Offset (0x4C)
        }

Hope it'll be no problem if I do nothing to "(GPIO, SystemIO, GPBS (), 0x64)" after adding it?

 

Thunderbolt DSDT fixes were tried and tested over a year ago with no success. On PCs the TB controller is not initialized in the same mode as on a Mac there for the Mac OS never sees it as TB but merely as normal PCIe. We even atempted to extract the TB EFI module from a mac pro and insert to a PC UEFI with no success.

 

While Ignoring warnings will let you compile, its still not good to ignore them, just use my patch for this mobo, its not that hard.

Good to see you in here PJALM! :D

 

I did see your repo fixs and fixed some warnings.

Could you help me fix the rests? This is my current DSDT with thunderbolt patches. (Not tested yet)

DSDT_TB_P1.dsl.zip

 

And this is my original DSDT extracted by iasl if you are interesting. Bios version is F6d

DSDT_F6d_Original.dsl.zip

 

 

Btw, I found out if I add this method (in the code boxes) under RP05.UPSB.DSM, OS X simply won't boot at all and stuck at PCI Configuration or FakeSMC.

And could you point me to the TB EFI module source?  :D

I'll post the exact screenshot later.

 

Scope (_SB.PCI0.RP05.UPSB)

    {
        Method (_DSM, 4, Serialized)  // _DSM: Device-Specific Method
        {
            Name (_T_1, Zero)  // _T_x: Emitted by ASL Compiler
            Name (_T_0, Zero)  // _T_x: Emitted by ASL Compiler
If (OSDW ())
                    {
                        If (LEqual (Arg0, Buffer (0x10)
                                {
                                    /* 0000 */   0xC6, 0xB7, 0xB5, 0xA0, 0x18, 0x13, 0x1C, 0x44,
                                    /* 0008 */   0xB0, 0xC9, 0xFE, 0x69, 0x5E, 0xAF, 0x94, 0x9B
                                }))
                        {
                            Store (Package (0x02)
                                {
                                    "PCI-Thunderbolt", 
                                    0x01
                                }, Local0)
                            DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
                            Return (Local0)
                        }
                    }

If ((Arg0 == ToUUID ("1730e71d-e5dd-4a34-be57-4d76b6a2fe37")))
//skip...
                Else
                {
                    Return (Buffer (One)
                    {
                         0x00                                             /* . */
                    })

 

                }
                    Return (Zero)
            }
        }

 

    }

 

 

Another tricky thing is that, if I put the DSDT into Clover without flash the DSDT into Bios, thunderbolt will not load at all when I check IOReg and thunderbolt-related kext won't load too.

 

RampageDev claims to have gotten one of the Thunderbolt ports on the GA-Z97X-UD7 TH working with hot plug support with an SSDT edit, but it appears he never released it.

I've seen that page too. Seems he's not gonna publish it, since according to his claim hot plug only work in one port sometimes?  :blink: I did ask him about thunderbolt problem too, he said the ports are usable without DSDT modifications, but my TB to Ethernet adapter just can't work... And I'd like to fix the slow boot speed problem without deleting AppleThunderboltNHI.kext after enabling thunderbolt. :P

Edited by shiecldk

Share this post


Link to post
Share on other sites

Thunderbolt DSDT fixes were tried and tested over a year ago with no success. On PCs the TB controller is not initialized in the same mode as on a Mac there for the Mac OS never sees it as TB but merely as normal PCIe. We even atempted to extract the TB EFI module from a mac pro and insert to a PC UEFI with no success.

 

While Ignoring warnings will let you compile, its still not good to ignore them, just use my patch for this mobo, its not that hard.

Could you tell us how and what are the advantages

to eliminate all Warnings and Remarks?

Share this post


Link to post
Share on other sites

 

While Ignoring warnings will let you compile, its still not good to ignore them, just use my patch for this mobo, its not that hard.

It's not hard to use your Patch, but It seems that your Patch was unable to fix all Warnings.

Don't believe everything he says. We have been working on a TB fix for over a year now with no luck.

 

I never mentioned 'Remarks' as a remark is just a comment but a warning is definitely something you need to pay attention too. Is it really that hard to fix them? 

 

However, even the remarks are easy fixes.

You answer a question with a question, you're really funny guy.

Share this post


Link to post
Share on other sites

Have you set the Thunderbolt Security mode to legacy in your BIOS? You also might need to boot Windows and install the Thunderbolt drivers before the ports will work (not 100% sure).

I'm already in Legacy mode ;), not even had I ever tried Unique ID mode. I haven't installed Windows yet, will try later. :) Does that means each time I want to use thunderbolt, I need to boot into Windows first? :cry:

Is it possible to develop a thunderbolt driver just like BTFirmwareUpdater but it's out of my ability as a student of dept. physics.  :|

Share this post


Link to post
Share on other sites

Don't believe everything he says. We have been working on a TB fix for over a year now with no luck.

 

I never mentioned 'Remarks' as a remark is just a comment but a warning is definitely something you need to pay attention too. Is it really that hard to fix them? 

 

However, even the remarks are easy fixes.

being so easy you could explain how to correct them?

Share this post


Link to post
Share on other sites

Hello!

I want to create my own DSDT for my Gigabyte GA-Z97X-UD7 TH. I used MaciASL with the PJALMpatch but when I try to compile it shows me this error:

Line: 20739
Code: 6126
Message: systax error, unexpected $end and premature End-Of-File. 

I attached the original DSDT (the one that opens when you open the program) and the patched one (with the error)
DOWNLOAD FILES

Thanks,
Elias.

Ps. The compiler is in ACPI 5.0

Share this post


Link to post
Share on other sites

Most likely caused by incorrect disassembly. Try dumping all of the original ACPI tables (DSDT+SSDTs in binary AML format), then use iasl to disassemble them with "iasl -da -dl DSDT.aml SSDT*.aml.

 

Also, your "original" DSDT is not original, it already has many patches (such as the DTGP method, not recommended) applied to it. You should start with a cleanly-extracted DSDT (from Linux or Clover F4), disassemble it properly, and then patch it.

 

I personally don't really use DSDT patches anymore, I use Clover config.plist binpatches in combination with a tinySSDT with the fixes I need.

Share this post


Link to post
Share on other sites

In response to JPALM's (now deleted?) post about Thunderbolt only showing as PCIe lanes or devices. That is not strictly accurate.

 

 

Several times now I have gotten Thunderbolt to show in System Profiler as being installed and the Thunderbolt Bridge to show in Network. I cloned a drive the last time I did it and set it on the shelf to study later, but haven't gotten back to it.

 

In each instance it involved me doing a fresh installation and having Thunderbolt already working (and in legacy mode I think) at the time of the installation. I tried re-triggering the setup wizard to see if that would recreate the circumstances, but it did not. You can find other people that have had the same sporadic results.

 

I had no special DSDT edits, just the latest BIOS on an X99 Deluxe. I have done it in both 10.9.5 & 10.10.5. Obviously 10.10.5 has additional complications if you are using IOPCIFamily or AppleACPIPlatform rollback kexts.

 

I believe the ThunderboltNIH kext is necessary to get this to happen. Don't delete it!

 

 

In the meantime, I have an ASRock motherboard that is driving me crazy as it has working thunderbolt (drives mount) after any CMOS reset, but not on subsequent restarts are power-ups. Gah...Advice anyone? ASRock Extreme4 /w ASUS dual TB card.

Share this post


Link to post
Share on other sites

Sup all,

 

Just started working on this with two boards. Asus X99e ws and GB X99 Designaire.

 

I've had similar drive issues on startup. Also, seems to work better when I reset the CMOS when using the Asus dual tb board...

 

BTW, it's critical to install Windows, install the TB driver and Update the FW. Nothing would work until this was done.

 

I'm currently on 10.12 Sierra, with 6950x Asus X99E WS

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By RamLalith
      I executed all my DSDT's and SSDTs with no errors 
      I can't patch the battery

      I need help
      I am attaching my ACPI folder
      ACPI.zip
    • By DiddyKong
      Fully optimizing DSDT & SSDT for OS X Sierra POST INSTALL on a Dell345MT with a i7 - 920(first gen) 
       
      I know how this forum feels about 3rd party software, but that was just a crutch, I'm 100% vanilla now which is why I'm now posting for help because I eliminated the possibility having to do with 3rd party. Anyways, with that said I just have a couple things I want to be sure of.
       
      I used a n---bistro to get a App Store copy of Sierra, as I didn't know there were other ways of getting it now from a windows10 machine. anyways, I was able to build a vanilla usb. I couldn't figure the EFI out on my vanilla Sierra-usb, but the EFI on the usb-ni---bistro I had would boot my pre-install and post-install. so I was able to install Sierra. After a few days of figuring out how to remake a EFI and config, I broke my EFI.
      So back to my windows10 SSD and I found BootDiskUtility, and that made a EFI usb with the newest version of clover(r4895). So then swapped SSDs back to my OS X, plugged in the BDU-usb, after trial and error I got back into my Sierra. Now with the newest version of clover and no traces of ni---bistro anymore. Then copied the BDU-usb to my SSD EFI and was able to boot without a usb again!! YAY.
       
      Then starting working on fixing my web drivers for my gtx 1050 2gb. Installed the os update so i'm at 10.12.6, pulled my hair out figuring out the web drivers, eventually got them installed and the cuda fixed.
       
      Now all 3 of my screens work, yet windows can't sit 'between' screens, I just simply haven't looked for that fix yet as I want the sys itself running like a top first.
      My screen saver works, I don't get stuck in screensaver, I did once before, I believe lilu.kext and whatevergreen.kext fixed that.
      Now with all that I felt it was time to give my config.plist a diet cos it was bloated, I generated a config copied the clover settings check for check instead of coping text cos I'm trying to shrink it.
      Config.plist boots my system with DSDT-1FE7B5D7
       
      So after the above, This is now where I'm stuck
       a 100% correct DSDT and SSDT, from my understanding with a patched DSDT I wouldn't need any options selected in clover on the ACPI page?
       
      So with the patching part that I think I understand how to do it now, but when I extract with F4 every file has RSDT in front of it, I have one that says RSDP.aml and RSDT.aml
      so would I just erase the RSDT from the beginning of each file then go from their, which would then leave me with a DSDT.aml and 17 SSDTs?
      I know I have to decompile and patch them, but with my file names[DSDT table extract] not matching tutorials online I'm having a difficult time understanding which files I need.
      IS the RDST-DSDT.aml my DSDT? it is the biggest file.
      which ones that have SSDT in the filename is the SSDT(s) I need to patch?
       
      also how do I know if everything is patched correctly? like if my CPU is fully working and not just sorta working that way when I start running software like photoshop, unity, 10 chrome tabs, my hackintosh doesn't crash
       
      System details
      i7 920 (first gen) very similar to nehelam
      GeForce 1050 2Gb (3 monitors connected all work, one acer on HD connection, two HP s2031 on HD, using adapters to change all ports on GPU card to HD for screens)
          display port, HDMI, and HD
      4x 1Gg + 2x 8Gb RAM running at 1066 after injecting smbios with ram info macOS sees all my ram correctly
      Samsung SSD 860 EVO 500Gb
       
      Thanks to anyone that can help me out, I've been working on my system for about two weeks and this is basically the wall I finally can't seem to figure out how to pass
      I can post another info also if it helps
       
      Boot.log
      DSDTdump.Log

    • By MaLd0n
      ---INSTALLATION TUTORIAL---
       
      ---Original Post---
      https://olarila.com/forum/viewtopic.php?p=77102#p77102
       
      ---CLOVER FOLDER---
       
      CLOVER.zip
       
      --MOBO
      GigaByte Z390 M Gaming



      --PROCESSOR
      Intel Core i9-9900K


      --COOLER
      CoolerMaster MasterLiquid ML120R RGB


      --MEMORY
      Corsair Dominator Platinum 16GB (2 x 8GB)


      --GPU
      Sapphiretech Radeon RX 590 8 GB GDDR5


       
      --SSD
      Samsung 970 EVO NVMe M2 Flash Drive


      --POWER SUPPLY
      EVGA 750 N1, 750W


      --WIRELESS
      TP-Link Archer T9E


      --BLUETOOTH
      Orico BTA-403


      --CASE
      Thermaltake View 21 Tempered Glass Edition


      --DSDT Patches--
      -FIX ERRORS AND WARNINGS -FIX ACPI ERRORS -REMOVE UNUSED SCOPES / DEVICES -HIGH PRECISION EVENT TIMER -SATA SERIE 10 ID -DMAC -REMOVE 22K LINES, PROBLEMATIC and UNUSED -FIX K.P in REBOOT -NVRAM / REAL TIME CLOCK -SLPB -DARWIN / WINDOWS 2015 -XHCI -PLUGIN TYPE -HDAS to HDEF -HDEF -REAL TIME CLOCK -ARTC -IRQs -SBUS -MIKEY -BUS1 -MCHC -ALS0 -SHUTDOWN -UAR1 -LAN -FWHD -USBX -PMCR -PPMC -XSPI -GMM -IMEI -EC -PNLF -ARPT -GFX0 -NVME -DTGP -ACQUIRE MUT0 0XFFFF -OPERATION REGION GPIO -MUTEX MUT0 0x00 -EXTERNAL REFERENCES -UNKNOWNOBJ -HDMI / HDAU -FULL RENAMED DEVICES  
      --SCREENSHOTS--





























      --BruceX--
       
      --USB-C-- test with SanDisk Ultra USB-STICK 128gb


       
      -Credits and thanks to the old and new people in the community who developed patches, kexts and bootloaders!
      Slice, Kabyl, usr-sse2, jadran, Blackosx, dmazar, STLVNUB, pcj, apianti, JrCs, pene, FrodoKenny, skoczy, ycr.ru, Oscar09, xsmile, SoThOr, RehabMan, Download-Fritz, Zenit432, cecekpawon, Intel, Apple, Oracle, Chameleon Team, crazybirdy, Mieze, Mirone, Oldnapalm, netkas, Elconiglio, artut-pt, ErmaC, Pavo, Toleda, Master Chief and family, bcc9, The King, PMheart, Sherlocks, Micky1979, vit9696, vandroiy2013, Voodoo Team, Pike R. Alpha, lvs1974, Austere.J, CVad, Sampath007, onemanosx, erroruser, Jenny David, Olarila Facebook Community, Hackintosh Facebook Community and many others!
      We're all here to have fun and learn from each other!
    • By bradipi15
      Ciao ragazzi ho un problema strano... 
      Praticamente quando avvio il pc usando il dsdt, appena connetto la tavoletta grafica huion h640p, il pc si riavvia... 
      Se invece tolgo il dsdt, funziona tutto perfettamente... 
    • By bradipi15
      Ciao ragazzi, ho bisogno di un aiuto per verificare che ho fatto tutto giusto, perché penso che la mx150 non sia effettivamente disabilitata. Ho utilizzato un dsdt fatto da gengik84 per un pc simile al mio.. Al momento penso di avere solo due problemi : la mx150, appunto... E poi il trackpad riesco ad usarlo in modalità advanced da bios proprio grazie al dsdt, però il doppio tap per trascinare oggetti ecc non va... L'ho abilitato anche dal menu accessibilità.. 
      Grazie mille! 
       
×