Force radeon module to load video ROM BIOS from file

I’m trying to get passthrough working on VMware ESXi with a Linux VM. Problem is the GPU I’m using, the AMD 8490, doesn’t seem to have a ROM BIOS in linux-firmware-nonfree. So I keep seeing these lovely messages everytime I try to start the VM:
[ 7.076146] [drm] radeon kernel modesetting enabled.
[ 7.076358] radeon 0000:13:00.0: enabling device (0000 → 0003)
[ 7.077545] radeon 0000:13:00.0: BAR 6: can’t assign [??? 0x00000000 flags 0x20000000] (bogus alignment)
[ 7.077564] radeon 0000:13:00.0: BAR 6: can’t assign [??? 0x00000000 flags 0x20000000] (bogus alignment)
[ 7.077566] [drm:radeon_get_bios [radeon]] ERROR Unable to locate a BIOS ROM
[ 7.077817] radeon 0000:13:00.0: Fatal error during GPU init
[ 7.077935] [drm] radeon: finishing device.
[ 7.085562] radeon: probe of 0000:13:00.0 failed with error -22

Others have supposedly had luck applying a patch to force the radeon driver to load the ROM BIOS from a file instead of trying to probe the card directly. Is there any way I can accomplish this without patching the kernel module and recompiling the entire kernel? That’s a bit beyond my skill level.

First, make sure that you have the ROM it is looking for. Check the firmware directory. I believe these cards still use the Atom BIOS? You should not need to patch anything since the card should be covered under the Radeon kernel driver.

Also what is the distro. Sounds like a Debian derivative from the term “linux-firmware-nonfree”

1 Like

AFAIK it should be one of these ROM files (or all of them?):

@ubuntu-test:~$ ls /lib/firmware/radeon/CAICOS*.*
/lib/firmware/radeon/CAICOS_mc.bin   /lib/firmware/radeon/CAICOS_smc.bin
/lib/firmware/radeon/CAICOS_me.bin   /lib/firmware/radeon/CAICOS_uc.bin

And to the best of my knowledge, they’re right where they should be.

EDIT: Distro is Ubuntu 20.04.

Could you try to use the amdgpu driver instead of the readeon driver and see if there is a difference? I don’t know if the VII card can live in both worlds.

AMDGPU - ArchWikiand_Sea_Islands(CIK)_support

This is a Northern Islands (Terascale 2, not GCN) card. amdgpu doesn’t even have experimental support for this card.

Oh wow. I forgot the marketing games that AMD used to play with their numbering.

In that case, on the guest, make sure that the card and drivers are not black listed and then do a mkinicpio or mkiniramfs (What ever your distro’s preferred version is) and then boot it up. Also ensure that modeset is not disabled. You should be supported on Radeon and if the firmware is there but it cannot be found, I would imagine that there is a blacklisting issue or the card is not being passed correctly.

Your host has multiple GPUs I assume?

Yes, that’s right. The primary GPU is a Matrox GXXX, fairly useless for anything other than a basic desktop UI. I thought it might help if I made the PCIe card primary, but the system won’t even boot with the Matrox disabled.

I thought I had checked and double checked blacklisting (both in /etc/grub/default and /etc/modprobe.d) but I’ll take another look.

I have rarely messed with mkinitcpio or the other command, but I’ll do some research on the proper syntax.

mkinitcpio is an Archlinux thing. mkinitramfs is a Debian thing. Basically, this should auto run after a new kernel is installed. If you are running custom kernels or building your own modules, you will need to run your distribution’s equivalent to ensure that the kernel and kernel drivers are build and loaded into your initram at boot.

I think Ubuntu’s “update_grub” script does this automatically. But I’ll check the man page to make sure…

I believe you are right. or you can run the update-initramfs as well. Basically, if you are using grub, use the grub method, it will use the correct method for your distro, otherwise use the method that is the official process for your distro.

I have seen in the past that the update scripts sometimes fail or do not run for whatever reason and a manual update usually fixes the issue.