anyone know how to dump the vga firmware ? I have tried here but doesn't work. Anyone know how can I dump the vga bios or can try if the command at the link work for you ?
Thanks so much.
anyone know how to dump the vga firmware ? I have tried here but doesn't work. Anyone know how can I dump the vga bios or can try if the command at the link work for you ?
Thanks so much.
root@gonzo:/home/jasen# dd if=/dev/mem bs=64k skip=12 count=1 | strings | head
1+0 records in
1+0 records out
65536 bytes (66 kB, 64 KiB) copied, 8.9787e-05 s, 730 MB/s
K7400
VIDEO
IBM VGA Compatible
P10/24/11
DPMIDl
3GV-N560OC-1GI/F32
Version 70.24.21.00.02
Copyright (C) 1996-2011 NVIDIA Corp.
GF104B Board - 10400050
looks like a VGA ROM to me.
This is a great topic. Here follows now my way to get the vbios.rom under Kubuntu 20.04 LTS:
At first, I was unsure where I had to look for the rom file, fortunately there exist a command which finds and displays any rom file:
clemens@iMac-4:~$ find /sys/devices -name rom
This shows me then two files:
/sys/devices/pci0000:00/0000:00:1c.0/0000:02:00.0/rom
/sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/rom
But which is the right one? Also for this, there exist a nice command:
clemens@iMac-4:~$ lspci | grep 02:00.0
02:00.0 Ethernet controller: Marvell Technology Group Ltd. 88E8053 PCI-E Gigabit Ethernet Controller (rev 22)
That was the wrong one, this seem to be the rom of the Marvell network card. Another try...
clemens@iMac-4:~$ lspci | grep 01:00.0
01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] RV530/M56-P [Mobility Radeon X1600]
Here we are! That's the video bios of the AMD/ATI Mobility Radeon X1600 GPU card!
So I executed the other two commands but with a somewhat more logical syntax, first:
clemens@iMac-4:~$ echo 1 | sudo tee /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/rom
1
That one just has showed me a "1", - nice. But the second one gives me then finally the vbios.rom file which landed directly in my user folder:
sudo cat /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/rom > vbios.rom
Final note, - will try this out also under Mac OS. Maybe this works also there. Update: This doesn't work on Mac OS because Mac OS doesn't supports the sysfs functionality.
Source:
Colin Ian King - Using the PCI sysfs interface to dump the Video BIOS ROM
If you issue command to find your roms:
find /sys/devices -name rom
The result will be similar to this:
/sys/devices/pci0000:64/0000:64:00.0/0000:65:00.0/0000:66:08.0/0000:67:00.0/0000:68:00.0/0000:69:00.0/rom
/sys/devices/pci0000:64/0000:64:00.0/0000:65:00.0/0000:66:10.0/0000:6a:00.0/0000:6b:00.0/0000:6c:00.0/rom
/sys/devices/pci0000:16/0000:16:00.0/0000:17:00.0/0000:18:08.0/0000:19:00.0/0000:1a:10.0/0000:22:00.0/0000:23:00.0/0000:24:00.0/rom
/sys/devices/pci0000:16/0000:16:00.0/0000:17:00.0/0000:18:08.0/0000:19:00.0/0000:1a:04.0/0000:1b:00.0/rom
Let's say you want to copy the ROM from location 0000:24:00.0:
sudo su
setpci -s 0000:24:00.0 COMMAND=2:2 (manually manipulate the memory enable bit with setpci)
export PATH_TO_ROM=/sys/devices/pci0000:16/0000:16:00.0/0000:17:00.0/0000:18:08.0/0000:19:00.0/0000:1a:10.0/0000:22:00.0/0000:23:00.0/0000:24:00.0/rom
echo 1 > $PATH_TO_ROM
mkdir -p /var/lib/libvirt/vbios/
cat $PATH_TO_ROM > /var/lib/libvirt/vbios/gpu.rom
echo 0 > $PATH_TO_ROM
setpci -s 0000:24:00.0 COMMAND=0:2 (Clear memory enable bit with setpci)
exit