Contribute
Register

[SUCCESS] Gigabyte Designare Z390 (Thunderbolt 3) + i7-9700K + AMD RX 580

Okay, the procedure for the edit went fine, but the USB stick won't boot via F12. Every time I select it, the screen goes dark for a moment and goes back to the F12 boot-option page.
Hi Jiffyslot, how did you work this out?
 
Hey Everyone! I hope everything is going well see yall are still hard at work on the Titan Ridge, Just checking in just recently saw there are new updates for WEG, Lilu, and AppleALC.

Have there been any noticeable changes in behaviors for the Designare and 5700xt combo after updates for anyone or any fixes that it brought about?

@CaseySJ and Everyone

EDIT: Machine has been working wonders since my last check-in haven't made any changes minus getting rid of Photos library cause of random reboot being caused in 10.15.3 with face-scanning in the background that causes reboot that Casey mentioned when 10.15.3 first released

I've been running those latest kext (Lilu, AppleALC, WEG) for a few days on Clover now without issues. Stuff was flawless before, so I don't really notice any difference to be honest.
 
@jleahy2 Do you currently use an XFX Radeon VII?
From my understanding Sapphire cards are mostly recommended for Hackintosh, so I would really like to know if you encountered any problems with the XFX.

I am using the XFX Radeon VII. I was a bit weary, as I've heard some really bad things about compatibility with XFX products on Hackintoshes, but I've had zero issues since swapping over to this card. In my research, *all* the Radeon VII's are reference cards, so they should all function the same. I'm shocked at the price differences between brands, if this is truly the case.

Worst case scenario, I was expecting to try flashing a different manufacturer's BIOS to this card, OR use Clover to inject it if there were any issues. However, the card was working flawlessly for me on Catalina. I have since reinstalled and downgraded to Mojave to get a bit more stable/compatible environment for audio production though and again, no issues using it on 10.14.6.
 
Yes, I love precision... done!

Using the same online CRC calculator, I'm unable to compute byte 1, CRC8. So this is still a mystery...
@CaseySJ

No longer for me :) .. Calculator can be found here
Confirmation has been done on other Macs ! It work :mrgreen: .. Finally, first added 0x00 has to be removed, result is same :)
Capture d’écran 2020-03-17 à 17.43.53.png
 
Last edited:
@CaseySJ

No longer for me :) .. Calculator can be found here
Confirmation has been done on other Macs ! It work :mrgreen: .. Finally, first added 0x00 has to be removed, result is same :)
View attachment 455158
@Elias64Fr,

That is amazing detective work!! :) Just confirmed your findings using all six Thunderbolt DROMs from the Mac Pro 7,1.

The parameters for CRC-8 are:
  • Polynomial = 0x07
  • Initial Value = 0x00
  • Final XOR Value = 0xdb
Results:
  1. 02 XX XX XX XX 5e 00 00 --> Calculated CRC-8 = 0x03 --> correct
  2. 03 XX XX XX XX 5e 00 00 --> Calculated CRC-8 = 0x10 --> correct
  3. 00 XX XX XX XX 5e 00 00 --> Calculated CRC-8 = 0x25 --> correct
  4. 01 XX XX XX XX 5e 00 00 --> Calculated CRC-8 = 0x36 --> correct
  5. 04 XX XX XX XX 5e 00 00 --> Calculated CRC-8 = 0x69 --> correct
  6. 05 XX XX XX XX 5e 00 00 --> Calculated CRC-8 = 0x7a --> correct
 
@CaseySJ

Look at this, the first byte after CRC8 is REALLY the number of thunderbolt bus :mrgreen:

Can you please clarify this because the screenshot is in French? For example:
  • What UID did you use for this test?
  • Why are there 4 Thunderbolt ports instead of 2?
    • There are two "Receptacles" with ID = 1
    • There are two "Receptacles" with ID = 2
 
@CaseySJ

No longer for me :) .. Calculator can be found here
Confirmation has been done on other Macs ! It work :mrgreen: .. Finally, first added 0x00 has to be removed, result is same :)
View attachment 455158

My MacBook Air 2018 agrees with your results. The first section of its ThunderboltDROM is "0f 00 XX XX XX 33 82 01 00".

If "XX XX XX 33 82 01 00" is placed into calculator, the result is 0xF.

So does that means that (from CaseySJ's post, here):
  • 11 22 33 44 55 ED 00 -- is the UID header (??)
***

On MacBook Air, for the Thunderbolt Bus (on the PCI Thunderbolt pane), the UID: is reverse of DROM UID section.

Example, if DROM (fake UID) starts as "0f 00 26 12 58 33 82 01 00..., the UID would be 0x0001823358122600, reverse ordering (little-endian).
 
Last edited:
** Thunderbolt DROM Decoded **
Vital Contribution by @Elias64Fr
Thanks to @S1lla and @qthegaijin for providing much needed supplementary information
Please do not quote this entire post; use a link instead

Here is a complete sample Thunderbolt DROM as extracted from the Designare Z390 firmware:
  • ------- UID and CRC-8 -------
  • 71 -- CRC-8 (cyclic redundancy check for entire 8-byte UID below)
  • 00 00 00 00 00 00 ED 00 -- UID (first byte = Thunderbolt Bus ID)
  • ------- CRC32_C -------
  • E0 40 34 98 -- CRC-32C (for all remaining bytes below )
  • ------- Offset 0x0D : 9-byte Preamble -------
  • 01 -- Device ROM Revision
  • 69 -- Length of DROM from offset 0x0D to end of DROM (must be specified correctly)
  • 00
  • ED 00 -- Vendor ID
  • 08 C0 -- Device ID
  • 01 -- Device Revision
  • 01 -- EEPROM Revision
  • ------- Port Definitions/Flags -------
  • 08 81 80 02 80 00 00 00 -- TBPort1 DualLinkport2 HPMAddr0 (add Bus ID to purple bytes)
  • 08 82 90 01 80 00 00 00 -- TBPort2 DualLinkport1 HPMAddr0 (add Bus ID to purple bytes)
  • 08 83 80 04 80 01 00 00 -- TBPort3 DualLinkport4 HPMAddr1 (add Bus ID to purple bytes)
  • 08 84 90 03 80 01 00 00 -- TBPort4 DualLinkport3 HPMAddr1 (add Bus ID to purple bytes)
  • 05 85 50 00 00 -- TBPort5 DisplayPort Adapter
  • 05 86 50 00 00 -- TBPort6 DisplayPort Adapter
  • 02 C7 -- TBSwitch7 -- Change this to 02 87
  • 0B 88 20 01 00 64 00 00 00 00 00 -- TBPort8 PCI Down Adapter DSB1
  • 03 89 80 -- TBPort9 PCI Down Adapter DSB4
  • 05 8A 50 40 00 -- TBPortA DisplayPort Adapter
  • 05 8B 50 40 00 -- TBPortB DisplayPort Adapter
  • ------- Vendor and Device Strings -------
  • 0B 01 47 49 47 41 42 59 54 45 00 -- Vendor String: The string "GIGABYTE"
  • 11 02 5A 33 39 30 20 44 45 53 49 47 4E 41 52 45 00 -- Device String: The string "Z390 DESIGNARE"
Screen Shot 2020-07-06 at 8.09.24 AM.png
More details on the first 22 bytes as follows:
  • 71 -- CRC-8 (cyclic redundancy check)
  • 00 00 00 00 00 00 ED 00 -- 8-Byte UID, where first byte in red is Thunderbolt Bus ID
  • E0 40 34 98 -- CRC-32C
  • 01 69 00 ED 00 08 C0 01 01 -- 9-Byte Preamble (assigned by PciThunderbolt.efi driver on real Macs?)
Some real examples of 9-Byte Preambles:
  • 01 58 00 01 00 10 00 01 00 Mac Pro 7,1
  • 01 58 00 01 00 0D 00 01 00 iMac 19,1
  • 01 58 00 01 00 0D 00 01 00 MacBook Pro 15,2
  • 01 5E 00 01 00 0C 00 01 00 iMac 18,3
  • 01 5E 00 01 00 0C 00 01 00 iMacPro 1,1

Specifying Thunderbolt Bus ID:
If a system has more than one Thunderbolt card or controller, each should be given a unique Thunderbolt Bus ID. The valid range of IDs is 0x0 to 0xF (or decimal 0 to 15). Bus ID is specified as follows:
  • First byte of Unique ID or UID located at DROM offset 0x01.
  • Least significant 4 bits of TBPort1, TBPort2, TBPort3, TBPort4 as shown in the 8 purple bytes under --- Port Definitions/Flags ---
  • We can simply add (i.e. mathematical add) BusID to the default values of those 8 purple bytes.
  • For example, to select Bus ID 0x02, those purple bytes become:
    • 0x80 + 0x02 = 0x82, 0x80 + 0x02 = 0x82
    • 0x90 + 0x02 = 0x92, 0x80 + 0x02 = 0x82
    • 0x80 + 0x02 = 0x82, 0x80 + 0x02 = 0x82
    • 0x90 + 0x02 = 0x92, 0x80 + 0x02 = 0x82
  • Therefore a total of 9 bytes are modified.
  • Please see this post for details on how to make these changes using a command-line tool called ThunderboltUtil.

CRC-8 is computed as follows:
  • Polynomial = 0x07
  • Initial Value = 0x00
  • Final XOR Value = 0xdb
CRC-8 is based on the first 8 bytes following CRC-8 (all 8 bytes of UID). We can compute CRC-8 using this website:
  • Set CRC Width to CRC-8
  • Set CRC parameterization to Custom
  • Set Final Xor Value to 0xdb
  • Enter the data under CRC Input Data with Bytes radio button selected
CRC-32C is a 4-byte CRC computed from all the bytes of Thunderbolt DROM after the CRC-32C bytes. We can compute CRC-32C using the same website:
  • Set CRC Width to CRC-32
  • Set CRC parameterization to Predefined, then from the pop-up menu, select CRC32_C
  • Enter the data under CR Input Data with Bytes radio button selected (results will appear in reverse byte order)
Therefore if we have a full DROM string as follows (where 8-byte UID in red has been altered for privacy reasons):

03 02 11 22 33 44 55 00 00 2d ea 01 bd 01 58 00 01 00 10 00 01 00 08 81 82 02 82 00 00 00 08 82 92 01 82 00 00 00 08 83 82 04 82 01 00 00 08 84 92 03 82 01 00 00 05 85 09 01 00 05 86 09 01 00 02 87 03 88 20 03 89 80 02 ca 02 cb 0d 01 41 70 70 6c 65 20 49 6e 63 2e 00 0c 02 4d 61 63 69 6e 74 6f 73 68 00

It means:
  • Byte 1 (03) is a single-byte CRC for the UID bytes: 02 11 22 33 44 55 00 00
  • After UID, the next 4 bytes are a 32-bit or 4-byte CRC-32C for all the remaining bytes: 2d ea 01 bd
  • And then the rest of DROM follows.
So the above DROM can be color-coded like this:

03 02 11 22 33 44 55 00 00 2d ea 01 bd 01 58 00 01 00 10 00 01 00 08 81 82 02 82 00 00 00 08 82 92 01 82 00 00 00 08 83 82 04 82 01 00 00 08 84 92 03 82 01 00 00 05 85 09 01 00 05 86 09 01 00 02 87 03 88 20 03 89 80 02 ca 02 cb 0d 01 41 70 70 6c 65 20 49 6e 63 2e 00 0c 02 4d 61 63 69 6e 74 6f 73 68 00
  • Green = CRC-8 for the red UID
  • Red = UID (first byte of UID "02" is Thunderbolt Bus ID)
  • Blue = CRC-32C for all the remaining bytes (yellow and black)
  • Yellow = 9-byte Preamble

Update 5 Jul 2020: Thanks to @joevt for providing additional information.
 
Last edited:
The latest decoding sounds really awesome, and I can't wait till you guys can use it for PCIe firmware, etc., as well. One step further to a perfect Thunderbolt solution under macOS.

You guys rock!

@CaseySJ @Elias64Fr
 
Last edited:
Back
Top