CaseySJ
Moderator
- Joined
- Nov 11, 2018
- Messages
- 22,239
- Motherboard
- Asus ProArt Z690-Creator
- CPU
- i7-12700K
- Graphics
- RX 6800 XT
- Mac
- Classic Mac
- Mobile Phone
@Elias64Fr,
Finally found some time to continue testing Thunderbolt. Here are some observations:
TNODE/TBUS will appear under these circumstances:
Finally found some time to continue testing Thunderbolt. Here are some observations:
TNODE/TBUS will appear under these circumstances:
- Device Path Properties:
- ThunderboltDROM must be specified. When booting without a valid ThunderboltDROM, TNODE/TBUS never appeared in many attempts.
- ThunderboltConfig must be specified. When booting without ThunderboltConfig, TNODE/TBUS never appeared in many attempts.
- Both of these parameters must be specified. They are being specified currently in config.plist.
- ThunderboltConfig:
- If an invalid ThunderboltConfig is specified, TNODE/TBUS will not appear.
- This means macOS is parsing and using the information in ThunderboltConfig.
- The following byte arrays have been tested:
- 00021C00 02000503 01000400 05030200 03000503 01000000 03030200 01000200
- Result: Causes TNODE/TBUS to appear if SSP1=UsbCPortNumber 0x01 and SSP2=UsbCPortNumber 0x02.
- 1C might be referring to root port (RP05@1C,4)
- 01 and 02 seem to correspond to UsbCPortNumber for SSP1 and SSP2
- If SSP1 is set to UsbCPortNumber 0x01 and SSP2 is set to UsbCPortNumber 0x02, then TNODE/TBUS will appear only if last 4 bytes of ThunderboltConfig are 01000200.
- But if we intentionally reverse this by setting SSP1 to 0x02 and SSP2 to 0x01, but leave the last 4 bytes as 01000200, this causes a mismatch and TNODE/TBUS do not appear.
- But if now we only change last 4 bytes of ThunderboltConfig to 02000100, then TNODE/TBUS will appear.
- 0002FFFF 04000301 01000400 05010200 03000301 01000000 03010200 02000100
- Result: This also causes TNODE/TBUS to appear, but only if:
- SSP1 UsbCPortNumber is 0x02
- SSP1 UsbCPortNumber is 0x01
- Result: This also causes TNODE/TBUS to appear, but only if:
- 00021C00 02000503 01000400 05030200 03000503 01000000 03030200 01000200
- Conclusion:
- ThunderboltConfig is important, and it is being used by macOS.
- Strong correlation between last 4 bytes of ThunderboltConfig and UsbCPortNumber for SSP1/SSP2.
- We may have to figure out what the other bytes mean, and set them correctly...
- When above 2 conditions are satisfied, then we can make TNODE/TBUS appear every time by doing this:
- Either hot-plug or hot-unplug a Thunderbolt device (not a USB-C device).
- Wait for system to freeze (in about 2-3 seconds).
- Press physical Reset button to reboot.
- When system starts up again, just login to macOS.
- TNODE/TBUS will not appear (a) at cold boot with or without TB3 device, (b) warm boot with or without TB3 device.
- Instead, we must first hot-plug or hot-unplug a TB3 device, then press Reset button to reboot.
- From this point onwards, TNODE/TBUS will appear with every reboot (even if we do not hot-plug or hot-unplug a device).
- This means that after a hot-plug/hot-unplug event, the state of Thunderbolt registers/devices changes in such a way that TNODE/TBUS will appear from this point onwards.
- So a hot-plug or hot-unplug is triggering something that then allows TNODE/TBUS to appear.
- Can we figure out what this trigger is?
- Open IORegistryExplorer and you will see TNODE/TBUS.
- But system will freeze after about 10 seconds.
- I am trying to comment-out various parts of NHI0 ACPI methods to see if this can be isolated. Will provide more details on this soon.
- UPDATE: Removing the call to CTBT() from inside NHI0._PS0() consistently prevents the hot-plug/hot-unplug hang. However, this does not necessarily mean that the freeze is happening inside CTBT(). Instead, the freeze can be happening inside the Thunderbolt kext after it calls or returns from CTBT().
- Here's an example of TNODE/TBUS appearing this morning at 4:51am, but system hanged after 10 seconds.
Last edited: