Created attachment 301701 [details] dmesg output without TH4 card Device Info: Motherboard : MSI MEG-X570 Godlike (MS-7C34) Processor : Ryzen 9 5950x Graphics: Radeon VII ( Vega 20 ) Thunderbolt : Asus ThunderboltEx 4 (Maple Ridge 4C 2020) kernel cmdline : pcie_ports=native pci=assign-busses,hpbussize=0x33,realloc,hpmmiosize=128M,hpmmioprefsize=16G Problem Description: I am attempting to enable the TB4 card on my system and have discovered some issues that prevent me from initialize the card and plug in a eGPU. However, I am unable to set kernel parameters that result in a successful boot. When I have no kernel command-line parameters, I have a successful boot but no BAR address space to support ePGU plugin. With command-line parameters set, I have boot failure and a initramfs ( rootfs ) prompt, there seems to be misconfiguration of PCIe, neither the SATA or NVMe controller show up in dmesg.
Created attachment 301702 [details] dmesg with TB4 card inserted, no kernel cmdline
Created attachment 301703 [details] dmesg output with TB4, and cmdline arguments
If it helps any, I have my PCIe sub-settings configured in bios as: Re-size BAR support - Enabled Above 4G memory/Crypto Currency mining - Enabled PCI_E1 Gen switch - Auto PCI_E2 Gen switch - Auto PCI_E3 Gen switch - Auto Chipset Gen switch - Auto PCI_E1 Lanes Config - Auto SR-IOV Support - Enabled
Any chance you can contrast this to Windows on the same system? > When I have no kernel command-line parameters, I have a successful boot but > no BAR address space to support ePGU plugin. I think that's the case with memory allocation today in Linux. If you plug in your eGPU to the system before you boot up and don't set up any kernel options, does the BIOS do a better job at the memory allocation than Linux?
I suspect there is not enough space reserved on the TB thunderbolt PCI bridge window for hotplug devices. I believe Linux only reserves something 256K for hotplug. Does adding `pci=hpmmiosize=4MB,hpmmioprefsize=64GB` to the kernel command line help?
That got it to boot at least. The eGPU is another story however, appears that something is hung up and timing out [ 1260.072776] pci 0000:0b:00.0: Adding to iommu group 46 [ 1260.210153] AMD-Vi: Completion-Wait loop timed out [ 1260.338703] AMD-Vi: Completion-Wait loop timed out [ 1260.462120] AMD-Vi: Completion-Wait loop timed out [ 1260.599125] AMD-Vi: Completion-Wait loop timed out [ 1260.722275] AMD-Vi: Completion-Wait loop timed out [ 1260.859516] AMD-Vi: Completion-Wait loop timed out
Created attachment 301707 [details] Increased hpmmio sizes, pci=hpmmiosize=4MB,hpmmioprefsize=64GB
(In reply to Babak Rezai from comment #7) > Created attachment 301707 [details] > Increased hpmmio sizes, pci=hpmmiosize=4MB,hpmmioprefsize=64GB I have attached the dmesg output containing the snippet in comment 6.
In kernel 6.9 we changed the policy for the USB4 CM so that it will reset the router at bootup. This typically helps this type of problem. Can you still reproduce this on the latest 6.10.y?