Jump to content

ThunderBolt Drivers


406 posts in this topic

Recommended Posts

Thanks.

 

Checked that I have "Above 4G Decoding" in bios and replaced my dsdt.aml with the one that you've sent.

 

I'm attaching the the new ioreg - Is it how you expected it to be?

 

Also, a couple of question just for sanity :wink_anim: :

  • These changes are just for the hot swap of the TB3 controller right ?
  • I'm guessing we are still far way from having a full TB3 implementation as did Mork vom Ork with his Gigabyte Thunderbolt3 AlpineRidge on post #3 of this thread, right ?

 

Boa sorte,

Paulo

Now in you ioreg everything look similar to me. Just make test with connecting and disconnecting you device. Check if device is mounted after sleep. 

Yes. I thing we are still far way from full TB3 implementation. Now some coder should take care this. Im just simple user but I see good point out in this ssdt.

Link to comment
Share on other sites

  • 2 weeks later...

All the attachments comes out as 0 bytes file (or a php error). Is this a permanent problem or will it be fixed shortly?

Anyhow, I have a Gigabyte X299 Designare EX, which uses the JHL6540 TB3 controller (same as the iMac Pro or the ASRock TB3 as per @maleorderbride post)

On this board, the TB3 is loaded to SB.PC00.RP05.PXSX, I have followed the instructions provided earlier, disable PXSX via STA method, renamed PC00 into PCI00.

Looking side by side with the ioreg of a real iMac Pro and the designare, I can't see much difference anymore.

It's all loaded under SB.PCI0.RP05.UPSB

    Device (_SB.PCI0.RP05.UPSB)
    {
        Name (_ADR, Zero)  // _ADR: Address
        Method (_DSM, 4, NotSerialized)  // _DSM: Device-Specific Method
        {
            If (LNot (Arg2))
            {
                Return (Buffer (One)
                {
                     0x03                                           
                })
            }

            Return (Package (0x02)
            {
                "PCI-Thunderbolt",
                One
            })
        }

        Device (DSB0)
        {
            Name (_ADR, Zero)  // _ADR: Address
            Method (_DSM, 4, NotSerialized)  // _DSM: Device-Specific Method
            {
                If (LNot (Arg2))
                {
                    Return (Buffer (One)
                    {
                         0x03                                           
                    })
                }

                Return (Package (0x06)
                {
                    "PCIHotplugCapable",
                    One,
                    "built-in",
                    Buffer (One)
                    {
                         0x00                                           
                    },

                    "name",
                    "pci-bridge"
                })
            }

            Device (NHI0)
            {
                Name (_ADR, Zero)  // _ADR: Address
                Name (_STR, Unicode ("Thunderbolt"))  // _STR: Description String
                Method (_DSM, 4, NotSerialized)  // _DSM: Device-Specific Method
                {
                    Store (Package (0x0F)
                        {
                            "built-in",
                            Buffer (One)
                            {
                                 0x00                                           
                            },

                            "device_type",
                            Buffer (0x19)
                            {
                                "Thunderbolt 3 Controller"
                            },

                            "AAPL,slot-name",
                            Buffer (0x09)
                            {
                                "Built In"
                            },

                            "model",
                            Buffer (0x20)
                            {
                                "Intel JHL6540 Thunderbolt 3 NHI"
                            },

                            "name",
                            Buffer (0x27)
                            {
                                "Intel JHL6540 Thunderbolt 3 Controller"
                            },

                            "compatible",
                            Buffer (0x0D)
                            {
                                "pci8086,1578"
                            },

                            "power-save",
                            One,
                            Buffer (One)
                            {
                                 0x00                                           
                            }
                        }, Local0)
                    DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
                    Return (Local0)
                }
            }
        }

        Device (DSB1)
        {
            Name (_ADR, 0x00010000)  // _ADR: Address
            If (LNot (Arg2))
            {
                Return (Buffer (One)
                {
                     0x03                                           
                })
            }

            Return (Package (0x04)
            {
                "built-in",
                Buffer (One)
                {
                     0x00                                           
                },

                "name",
                "pci-bridge"
            })
        }

        Device (DSB2)
        {
            Name (_ADR, 0x00020000)  // _ADR: Address
            If (LNot (Arg2))
            {
                Return (Buffer (One)
                {
                     0x03                                           
                })
            }

            Return (Package (0x04)
            {
                "built-in",
                Buffer (One)
                {
                     0x00                                           
                },

                "name",
                "pci-bridge"
            })
            Device (XHC3)
            {
                Name (_ADR, Zero)  // _ADR: Address
                Device (RHUB)
                {
                    Name (_ADR, Zero)  // _ADR: Address
                    Device (SSP1)
                    {
                        Name (_ADR, One)  // _ADR: Address
                        Name (_UPC, Package (0x04)  // _UPC: USB Port Capabilities
                        {
                            0xFF,
                            0x09,
                            Zero,
                            Zero
                        })
                        Name (_PLD, Package (0x01)  // _PLD: Physical Location of Device
                        {
                            Buffer (0x10)
                            {
                                /* 0000 */  0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
                                /* 0008 */  0x31, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
                            }
                        })
                        Method (_DSM, 4, NotSerialized)  // _DSM: Device-Specific Method
                        {
                            If (LEqual (Arg2, Zero))
                            {
                                Return (Buffer (One)
                                {
                                     0x03                                           
                                })
                            }

                            Return (Package (0x02)
                            {
                                "UsbCPortNumber",
                                One
                            })
                        }
                    }

                    Device (SSP2)
                    {
                        Name (_ADR, 0x02)  // _ADR: Address
                        Name (_UPC, Package (0x04)  // _UPC: USB Port Capabilities
                        {
                            0xFF,
                            0x09,
                            Zero,
                            Zero
                        })
                        Name (_PLD, Package (0x01)  // _PLD: Physical Location of Device
                        {
                            Buffer (0x10)
                            {
                                /* 0000 */  0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
                                /* 0008 */  0x31, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
                            }
                        })
                        Method (_DSM, 4, NotSerialized)  // _DSM: Device-Specific Method
                        {
                            If (LEqual (Arg2, Zero))
                            {
                                Return (Buffer (One)
                                {
                                     0x03                                           
                                })
                            }

                            Return (Package (0x02)
                            {
                                "UsbCPortNumber",
                                0x02
                            })
                        }
                    }

                    Device (HS01)
                    {
                        Name (_ADR, 0x03)  // _ADR: Address
                        Name (_UPC, Package (0x04)  // _UPC: USB Port Capabilities
                        {
                            0xFF,
                            0x09,
                            Zero,
                            Zero
                        })
                        Name (_PLD, Package (0x01)  // _PLD: Physical Location of Device
                        {
                            Buffer (0x10)
                            {
                                /* 0000 */  0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
                                /* 0008 */  0x31, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
                            }
                        })
                    }

                    Device (HS02)
                    {
                        Name (_ADR, 0x04)  // _ADR: Address
                        Name (_UPC, Package (0x04)  // _UPC: USB Port Capabilities
                        {
                            0xFF,
                            0x09,
                            Zero,
                            Zero
                        })
                        Name (_PLD, Package (0x01)  // _PLD: Physical Location of Device
                        {
                            Buffer (0x10)
                            {
                                /* 0000 */  0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
                                /* 0008 */  0x31, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
                            }
                        })
                    }
                }
            }
        }

        Device (DSB4)
        {
            Name (_ADR, 0x00040000)  // _ADR: Address
            If (LNot (Arg2))
            {
                Return (Buffer (One)
                {
                     0x03                                           
                })
            }

            Return (Package (0x04)
            {
                "built-in",
                Buffer (One)
                {
                     0x00                                           
                },

                "name",
                "pci-bridge"
            })
        }
    }

    Name (_SB.PCI0.RP05.PXSX._STA, Zero)  // _STA: Status

TB3 works (as it always has been), hotplug doesn't work.

The only USB-C device I have is a Samsung S9, and when connected via a TB3->TB3 (usbc connector) active cable, "sometimes" I see the android device being connected. Typically for it to work, I need to reboot into windows first.

if I disconnect the USB device and replug it, it will no longer work.

On the Gigabyte TB3 Port 2, I have an Apple Thunderbolt display connected. If I hotplug to that screen (which has a TB1 hub), then things will go bad. The TB screen will start to flicker, requiring power cycle, and typically the box will hang after a short while

I had read somewhere else , about inserting the property PCI-Thunderbolt into the UPSB device, but that didn't work for me.

Any help would be appreciated. I attach the iojones of my box, the one of the imac pro, and the SSDT I'm using.

Also, can't put this box to sleep, not sure if that's related.

5aa705fd7d05c_ScreenShot2018-03-12at11_56_34pm.thumb.png.7320b8989eeacfe21d29a908e3e5f021.png

SSDT-X299-Designare-iMacPro.aml

DSDT.aml

iMac Pro.iojones.zip

jya7980xe.iojones.zip

Link to comment
Share on other sites

Thanks for the super quick answer...

Weird that it should be data, the IOReg on the imac pro certainly shows being used as number one, and same for what some people are using via clover injection...

Anything else obviously wrong otherwise?

Link to comment
Share on other sites

So I modified the SB.PCI0.RP05.UPSB device (originally SB.PCI0.RP05.PXSX) DSM method for

        Method (_DSM, 4, NotSerialized)  // _DSM: Device-Specific Method
        {
            If (LNot (Arg2))
            {
                Return (Buffer (One)
                {
                     0x03                                           
                })
            }

            Return (Package (0x02)
            {
                "PCI-Thunderbolt",
                Buffer (0x04)
                {
                     0x01, 0x00, 0x00, 0x00                         
                }
            })

 

It is showing as your screen capture IORegistryExplorer in the same fashion, all other TB devices are showing where they should be.

Something I did notice in the screen captures you guys posted earlier, is that the TB devices are showing in the PCI list with a "Thunderbolt" as location. This isn't the case for me. They aren't showing. The only entries in there are the ones I added via SSDT.

I'm at a loss now to understand what is different for you guys, I've attached my patched DSDT.aml and the injected SSDT. Any help would be much appreciated.

(screen capture doesn't want to attach, so I uploaded it there: 20fz5tg.png

 

Screen Shot 2018-03-13 at 1.21.54 pm.png

Pre-Edited DSDT.aml

SSDT-X299-Designare-iMacPro-v2.aml

Screen Shot 2018-03-13 at 1.21.54 pm.png

Link to comment
Share on other sites

You have a lot of unnesesery entry in your ssdt. May be try delete this all and start only inject thunderbolt. 

I m using only Arbitrary to enabled hot plug in TB3. Maybe try this method. 

Find in boot log first entry about device id 15d3 and copy adres to device arbitrary. 

<dict>
				<key>Comment</key>
				<string>PCI THUNDERBOLT 15d3 first entry</string>
				<key>CustomProperties</key>
				<array>
					<dict>
						<key>Disabled</key>
						<false/>
						<key>Key</key>
						<string>PCI-Thunderbolt</string>
						<key>Value</key>
						<integer>1</integer>
					</dict>
					<dict>
						<key>Disabled</key>
						<false/>
						<key>Key</key>
						<string>IOName</string>
						<key>Value</key>
						<string>pci-bridge</string>
					</dict>
				</array>
				<key>PciAddr</key>
				<string>01:00.00</string>
			</dict>

Then look for device id from DSB0 and find adres in boot.log. 

Add this entry:

<dict>
				<key>Comment</key>
				<string>THUNDERBOLT 1577</string>
				<key>CustomProperties</key>
				<array>
					<dict>
						<key>Disabled</key>
						<false/>
						<key>Key</key>
						<string>model</string>
						<key>Value</key>
						<string>Thunderbolt EX3</string>
					</dict>
					<dict>
						<key>Disabled</key>
						<false/>
						<key>Key</key>
						<string>AAPL,slot-name</string>
						<key>Value</key>
						<string>Slot-4</string>
					</dict>
					<dict>
						<key>Disabled</key>
						<false/>
						<key>Key</key>
						<string>name</string>
						<key>Value</key>
						<string>Thunderbolt 3 Controller</string>
					</dict>
					<dict>
						<key>Disabled</key>
						<false/>
						<key>Key</key>
						<string>device_type</string>
						<key>Value</key>
						<string>Thunderbolt 3</string>
					</dict>
					<dict>
						<key>Disabled</key>
						<false/>
						<key>Key</key>
						<string>IOName</string>
						<key>Value</key>
						<string>Thunderbolt</string>
					</dict>
				</array>
				<key>PciAddr</key>
				<string>03:00.00</string>
			</dict>

In my case this device is 1577. 

Then try to boot whiteout any DSDT or SSDTs. 

Link to comment
Share on other sites

1 hour ago, Matthew82 said:
You have a lot of unnesesery entry in your ssdt. May be try delete this all and start only inject thunderbolt. 
I m using only Arbitrary to enabled hot plug in TB3. Maybe try this method. 
Find in boot log first entry about device id 15d3 and copy adres to device arbitrary. 

CommentPCI THUNDERBOLT 15d3 first entryCustomPropertiesDisabledKeyPCI-ThunderboltValue1DisabledKeyIONameValuepci-bridgePciAddr01:00.00
 

Then look for device id from DSB0 and find adres in boot.log. 
Add this entry:


CommentTHUNDERBOLT 1577CustomPropertiesDisabledKeymodelValueThunderbolt EX3DisabledKeyAAPL,slot-nameValueSlot-4DisabledKeynameValueThunderbolt 3 ControllerDisabledKeydevice_typeValueThunderbolt 3DisabledKeyIONameValueThunderboltPciAddr03:00.00
 

In my case this device is 1577. 
Then try to boot whiteout any DSDT or SSDTs. 

I had tried with only the Arbitrary entry, to no available. Though, I had only attempted to inject PCI-Thunderbolt to the UPSB device, nothing else.
The issue with the Arbitrary, is that the 15d3 pcipath changes very often on that box, it goes from 10 to 43 or 70. It seems to be random.
It also doesn't show on the Clover boot.log, maybe that's because it's located on the motherboard rather than a Pcie card.

Ill retry with a ssdt only including the UPSB set-up.
And I can't sleep that box, I had hoped it would work with hose ssdt settings.

Sent from my SM-G950F using Tapatalk
 

Edited by jya
Link to comment
Share on other sites

On 28/02/2018 at 4:59 PM, Matthew82 said:

Great Work! Working well on Asus X299 to. And it solve me problem with sleep when thunderbolt card is enabled. 

Just a quick question, did you find the need to change the TB3 authorisation settings in the BIOS? The setting I am referring is to usually to prevent rouge devices getting DMA via TB3 and the setting values are uusually "No Security" or "User Authorization".

I am attempting to get TB3 working on my laptop, but has the limitation of not having the "No Security". Which causes TB3 to be detected as valid in System Profiler (TB3 drivers are not being loaded), but no devices show up (without hotswapping).

Edited by 68x
Link to comment
Share on other sites

Hi, I'm trying to perform this procedure on a Gigabyte Z370 motherboard with a PCI Gigabyte Alpine Ridge thunderbolt 3 card.
Can someone help me understand a little please?

Precisely, where do I find the addresses to be used on my SSDT?

5aad63296a2ff_Schermata2018-03-17alle19_45_55.thumb.png.fd187fb1f9117e036a9552fa81b9e79e.png

Lele’s iMac.zip

Link to comment
Share on other sites

5 hours ago, Matthew82 said:

This will help. SSDT-TB1.aml

Hi @Matthew82, thanks for your fast reply!

Unfortunately the hotswap does not work...
I have 3 devices connected in chain with an apple thunderbolt 3 to thunderbolt 2 adapter:
Belkin thunderbolt 2 dock> UAD Setellite quad> UAD Apollo Twin.

Any possible solution?

Link to comment
Share on other sites

2 minutes ago, lelet said:

Hi @Matthew82, thanks for your fast reply!

Unfortunately the hotswap does not work...
I have 3 devices connected in chain with an apple thunderbolt 3 to thunderbolt 2 adapter:
Belkin thunderbolt 2 dock> UAD Setellite quad> UAD Apollo Twin.

Any possible solution?

If you don't see "PCI-Thunderbolt" properties in ioreg then I made some error in your ssdt construction. 

Link to comment
Share on other sites

1 hour ago, Matthew82 said:

Here is my ioreg vs your. Only "PCI-Thunderbolt" must be inject to make hot swap working. TB.thumb.png.8ca2b5d34c237b354ec237f1d08a0591.png

And this is for exemple my ssdt. SSDT-TB1.aml

And theoretically this one should work for you. SSDT-RP05.aml

 

Thanks but unfortunately the PCI-Thunderbolt entry is still missing somehow... 

I don't understand whats going on...

Link to comment
Share on other sites

Could it be that the problem is related to this upsb part ?

Normally there is non on my board if you compare the first ioreg file with the last one or should this be this way?

5aaea41db6689_Bildschirmfoto2018-03-18um18_34_02.thumb.png.266bddd1d0a0132f5e7dcba9ee266103.png

EDIT: The Gigabyte X299 Designare EX doesn't have an 4G decoding option in bios at all.

 

Edited by DSM2
Forget to mention something
Link to comment
Share on other sites

This only renaming for the device like in iMacPro. It have no influence for hardware working. I don't know where is the issue. I only have expired with Asus TB3. 

Maybe in Gigabyte TB is some big differences.  

Link to comment
Share on other sites

 Share

×
×
  • Create New...