Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 Jun 2022 06:07:44 +0000
From:      =?utf-8?B?Q29ydmluIEvDtmhuZQ==?= <C.Koehne@beckhoff.com>
To:        John Nielsen <lists@jnielsen.net>, "freebsd-virtualization@freebsd.org" <freebsd-virtualization@freebsd.org>
Subject:   RE: bhyve GPU passthrough + romfile
Message-ID:  <e12e35fd3e73429a9cb65cb3ec74d002@beckhoff.com>
In-Reply-To: <B3CCF8A5-AFFC-4B28-9F90-14AEAD845083@jnielsen.net>
References:  <B3CCF8A5-AFFC-4B28-9F90-14AEAD845083@jnielsen.net>

next in thread | previous in thread | raw e-mail | index | archive | help

Hi John,

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

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/

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.


Best regards
Corvin

Beckhoff Automation GmbH & Co. KG | Managing Director: Dipl. Phys. Hans Beckhoff
Registered office: Verl, Germany | Register court: Guetersloh HRA 7075




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?e12e35fd3e73429a9cb65cb3ec74d002>