HomeFreeBSD

bhyve: add ROM emulation

Description

bhyve: add ROM emulation

Some PCI devices especially GPUs require a ROM to work properly.
The ROM is executed by boot firmware to initialize the device.
To add a ROM to a device use the new ROM option for passthru device
(e.g. -s passthru,0/2/0,rom=<path>/<to>/<rom>).

It's necessary that the ROM is executed by the boot firmware.
It won't be executed by any OS.
Additionally, the boot firmware should be configured to execute the
ROM file.
For that reason, it's only possible to use a ROM when using
OVMF with enabled bus enumeration.

Differential Revision: https://reviews.freebsd.org/D33129
Sponsored by: Beckhoff Automation GmbH & Co. KG
MFC after: 1 month

(cherry picked from commit e47fe3183e1f2d531230ffc627ec165ea23e72cb)

Details

Provenance
corvinkAuthored on Mar 10 2022, 10:28 AM
manuCommitted on May 16 2022, 12:41 PM
Differential Revision
D33129: bhyve: add ROM emulation
Parents
rG7c6d3eb00932: bhyve: export funcs for read/write pci config
Branches
Unknown
Tags
Unknown