Skip to content

Commit 4d0086d

Browse files
HikariKnightgnif
andcommitted
feat: Generate dummy rom for amd RX7000 series cards
By recommendation from gnif on discord. Co-authored-by: Geoffrey McRae <geoff@hostfission.com>
1 parent 1002f4d commit 4d0086d

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

internal/pages/03_vbios_extract.go

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,28 @@ func genVBIOS_dumper(config *configs.Config) {
3030
vbios_path := lsiommu.GetIOMMU("-g", "-i", config.Gpu_Group, "--rom")[0]
3131
configs.GenerateVBIOSDumper(vbios_path)
3232

33+
// Make the qemu config folder
34+
os.Mkdir(fmt.Sprintf("%s/%s", scriptdir, config.Path.QEMU), os.ModePerm)
35+
36+
// Generate a dummy rom (1MB rom of zeroes) for use with AMD RX 7000 series cards by recommendation from Gnif
37+
// Source: https://forum.level1techs.com/t/the-state-of-amd-rx-7000-series-vfio-passthrough-april-2024/210242
38+
command.Run("dd", "if=/dev/zero", fmt.Sprintf("of=%s/%s/dummy.rom", scriptdir, config.Path.QEMU), "bs=1M", "count=1")
39+
3340
// Write a title
3441
title := color.New(color.BgHiBlue, color.White, color.Bold)
35-
title.Println("Generated \"dump VBIOS\" script")
42+
title.Println("VBIOS roms for Passthrough")
3643

37-
// Tell users about the VBIOS dumper script
44+
// Tell users about the VBIOS dumper script and dummy rom for RX 7000 series cards
3845
fmt.Print(
39-
"For some GPUs, you will need to dump the VBIOS and pass the\n",
46+
"If you have an RX 7000 series (and possibly newer AMD cards) GPUs, please use the dummy.rom file\n",
47+
fmt.Sprintf("%s/%s/dummy.rom\n", scriptdir, config.Path.QEMU),
48+
"Or disable ROM BAR for the card in qemu/libvirt\n",
49+
"\n",
50+
"For some other GPUs, you will need to instead dump the VBIOS (and possibly patch it) and pass the\n",
4051
"rom to the VM along with the card in order to get a functional passthrough.\n",
4152
"In many cases you can find your vbios at https://www.techpowerup.com/vgabios/\n",
4253
"\n",
43-
"You can also attempt to dump your own vbios using the script in\n",
54+
"You can also attempt to dump your own vbios from TTY using the script in\n",
4455
fmt.Sprintf("%s/utils/dump_vbios.sh\n", scriptdir),
4556
"\n",
4657
)

0 commit comments

Comments
 (0)