> On Jun 20, 2022, at 12:08 AM, Corvin Köhne wrote:
>
> first of all, the ROM is only required for Linux/BSD amdgpu driver. Windows
> works without a ROM file. Additionally, the ROM is required for pre-OS
> graphics (e.g. EFI boot, bootloader, etc.).
>
> Currently, OVMF doesn't processes the ROM file. Processing the ROM would
> include:
> - executing the ROM
> - shadowing the ROM
>
> The amdgpu driver searches for the shadowed ROM. So, for Linux/BSD guest, a
> patched OVMF is required. If you like to try a patched OVMF, please apply
> following commits to BhyveX64.dsc:
> https://github.com/Beckhoff/edk2/commit/bed77d4bb374fa6450fa2781eeddfbc3604edf6a
> https://github.com/Beckhoff/edk2/commit/aeaa9c4c1d1222723cbf9c1c7dd7f5ff3911deac
> https://github.com/Beckhoff/edk2/commit/a7b01394682874508d65c6f4b5815cdbb6c6eb6c
Thank you for the detailed response. I will try these for my own curiosity. Is
there a reason these patches aren’t in the upstream project or otherwise
available as a FreeBSD port/package?
> As said, Windows requires no ROM. So, that's not the issue. For many years
> AMD GPUs have issues to reset themselves. It's a well known hardware bug. You
> didn't mention which AMD GPU your using so I can't check if your GPU is
> affected too. A possible workaround is descripted at:
> https://curtisshoward.com/post/fixing-amd-gpu-passthrough-reset-issues-in-windows/
I have a Radeon RX 580 FWIW. Disabling the card in Windows for every boot is a
pretty ugly hack but I might play around with it. Too bad Windows Update is so
heavy handed in the consumer editions of Windows.
> Btw: On Linux there's some work to solve the GPU reset bug by hardware
> specific reset routines (https://github.com/gnif/vendor-reset) but I don't
> think that such kind of work will be merged soon into FreeBSD.
>
>> PS: Is there a known/supported way to get a GPU ROM file from FreeBSD? The
>> one I have I obtained from a Linux host where this GPU was secondary.
>
> No, there's no known/supported way yet. The best way is to boot another OS.