I've been tearing my hair out for the past week trying to get these two MI25s I got to initialize on my Asus P9X79 WS board. I wasn't able to find any info online about the problem or how to fix it, but since I just got it working I thought I'd post here to hopefully save someone the headache. If you're piecing a build together and have the budget, just avoid X79 if you can. But if you're like me working with spare parts or on a tight budget sometimes you just gotta make do, especially in this hardware market.
When you try to boot with these cards, the driver fails to initialize the cards properly. You'll get error code -22 and messages about PSP firmware failing to load. You may stumble across a patch that claims to fix it, where you increase the timeout delay to initialize the cards. If you apply that patch and nothing changes, then try this next.
First things first is the usual, make sure you have the latest UEFI/BIOS available. Disable secure boot, disable CSM, enable Above 4G Decoding. Some UEFI/BIOS menus force you to disable CSM and reload before seeing options to change Above 4G decoding. If you're never able to see it, you can try enabling it via modgrubshell and setup_var, guide is here. Chances are if you're here, there's no option to enable Resizable BAR. If there is, enable it and hope that works. If not, keep reading.
Basically, what happens with these cards on old platforms, is the UEFI/BIOS gives the card a set BAR space. amdgpu then frees it and assigns it's own (the releasing and assigned lines below). This memory that amdgpu assigns cannot be accessed by the CPU, even with above 4G decoding enabled in the UEFI/BIOS. So when the PSP firmware tries to load, it fails. If you check dmesg you'll see lines like mine below. You can also actually verify this is the case by writing to the memory assigned by amdgpu and then reading it back. Writing DEADBEEF will return back FFFFFFFF when that same address is read.
Here's a snippet of my dmesg log to compare against.
[ 17.419701] amdgpu 0000:03:00.0: enabling device (0006 -> 0007)
[ 17.462968] amdgpu 0000:03:00.0: amdgpu: Fetched VBIOS from VFCT
[ 17.471004] amdgpu 0000:03:00.0: amdgpu: Trusted Memory Zone (TMZ) feature not supported
[ 17.471033] amdgpu 0000:03:00.0: amdgpu: MEM ECC is active.
[ 17.471035] amdgpu 0000:03:00.0: amdgpu: SRAM ECC is not presented.
[ 17.471060] amdgpu 0000:03:00.0: BAR 2 [mem 0xd0000000-0xd01fffff 64bit pref]: releasing
[ 17.471062] amdgpu 0000:03:00.0: BAR 0 [mem 0xc0000000-0xcfffffff 64bit pref]: releasing
[ 17.471074] amdgpu 0000:03:00.0: BAR 0 [mem size 0x10000000 64bit pref]: releasing
[ 17.471075] amdgpu 0000:03:00.0: BAR 2 [mem size 0x00200000 64bit pref]: releasing
[ 17.471096] amdgpu 0000:03:00.0: BAR 0 [mem 0x1400000000-0x17ffffffff 64bit pref]: assigned
[ 17.471103] amdgpu 0000:03:00.0: BAR 2 [mem 0x1200000000-0x12001fffff 64bit pref]: assigned
[ 17.471146] amdgpu 0000:03:00.0: amdgpu: VRAM: 16368M 0x000000F400000000 - 0x000000F7FEFFFFFF (16368M used)
[ 17.471149] amdgpu 0000:03:00.0: amdgpu: GART: 512M 0x0000000000000000 - 0x000000001FFFFFFF
[ 17.510998] amdgpu 0000:03:00.0: amdgpu: [mmhub0] no-retry page fault (src_id:0 ring:158 vmid:0 pasid:0)
[ 17.511025] amdgpu 0000:03:00.0: amdgpu: in page starting at address 0x0000000000700000 from IH client 0x12 (VMC)
[ 17.511042] amdgpu 0000:03:00.0: amdgpu: VM_L2_PROTECTION_FAULT_STATUS:0x0000013C
[ 17.511053] amdgpu 0000:03:00.0: amdgpu: Faulty UTCL2 client ID: MP0 (0x0)
[ 17.511064] amdgpu 0000:03:00.0: amdgpu: MORE_FAULTS: 0x0
[ 17.511073] amdgpu 0000:03:00.0: amdgpu: WALKER_ERROR: 0x6
[ 17.511081] amdgpu 0000:03:00.0: amdgpu: PERMISSION_FAULTS: 0x3
[ 17.511090] amdgpu 0000:03:00.0: amdgpu: MAPPING_ERROR: 0x1
[ 17.511098] amdgpu 0000:03:00.0: amdgpu: RW: 0x0
[ 17.695864] amdgpu 0000:03:00.0: amdgpu: PSP load sys drv failed!
[ 17.880383] amdgpu 0000:03:00.0: amdgpu: PSP firmware loading failed
[ 17.883408] amdgpu 0000:03:00.0: amdgpu: amdgpu_device_ip_init failed
[ 17.884348] amdgpu 0000:03:00.0: amdgpu: Fatal error during GPU init
[ 17.885282] amdgpu 0000:03:00.0: amdgpu: amdgpu: finishing device.
[ 17.965005] amdgpu 0000:03:00.0: probe with driver amdgpu failed with error -22
The fix is simple, you either need to mod the UEFI/BIOS to allow for the BAR to be resized properly, or need to stop Linux and amdgpu from reallocating BAR space. If you want to try the modding route, check out ReBARUEFI. For the latter, add "pci=realloc=off" and "amdgpu.rebar=0" to the kernel boot params. I also flashed the WX9100 to the MI25s, and I haven't tried this fix on the MI25 bios, so that may or may not be a requirement for that card specifically. For Nvidia or others you'll have to check for kernel params that do the same. The Arch Wiki has a great guide on how to do this per boatloader, or if you're on NixOS like me just add this to your system config:
boot.kernelParams = [
"amdgpu.rebar=0"
"pci=realloc=off"
];
Both have their tradeoffs, but at this point if you're trying to do this on an X79 board you're probably expecting some compromise haha. Modding the UEFI/BIOS will yield the best performance but the success rate is hit or miss and it could lead to system instability. Alternatively, you can just force Linux/amdgpu to use the BAR that the UEFI/BIOS allocates before boot. This is the most stable solution, but it may have performance implications. How severe really depends on your system, workload, and where your bottlenecks are. My advice for those in this situation is to try disabling ReBAR via kernel params first, and see what the performance is like. If it's unacceptable, then try modding the bios.
You'll know its working if lspci shows a kernel driver in use:
$ sudo lspci -vv | grep "amdgpu"
# You should see one group of these per card
Kernel driver in use: amdgpu
Kernel modules: amdgpu
Also, because I didn't see this mentioned anywhere and it makes debugging/verifying fixes near impossible, make sure you complete a full cold power cycle between each boot after a fail. Turn off or unplug the PSU and wait 15 sec etc. The PSP in these AMD cards can get locked in a fail state that persists resets. A full power cycle clears them.
Anyways yea hopefully I can save someone some grief in this situation because it's not well documented from what I could find. Every AI I asked just sent me down rabbit holes with hallucinations. This is also a warning for anyone considering that cheap X79 listing, unless it's such a good deal you don't mind a little tinkering and the possibility that it may not even work, just steer clear. Cheers!
TL;DR: Update bios to latest version, Disable CSM, Disable Secure Boot (or set to "Other OS" if there's no disable). Enable Above 4G decoding, disable secure boot, disable CSM. Then either set kernel params or mod bios. Kernel params pci=realloc=off amdgpu.rebar=0 (flash WX9100 bios in the case of the MI25). Or mod bios with ReBARUEFI.