Skip to content

Commit

Permalink
added forgotten files
Browse files Browse the repository at this point in the history
  • Loading branch information
HouQiming committed Apr 27, 2020
1 parent 4e46ba5 commit 3d3a3ec
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 31 deletions.
5 changes: 0 additions & 5 deletions Makefile

This file was deleted.

12 changes: 11 additions & 1 deletion README.md
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Disclaimer: When used in direct passthrough, this VBIOS could produce bad pixel

This is an independent Video BIOS for Intel integrated GPUs. It provides a boot display and sets up an OpRegion so that Windows guests can produce monitor output.

The OpRegion code comes from IgdAssignmentsDxe and should work everywhere. The boot display works for GVT-g and can safely replace ramfb. For direct passthrough, the boot display only works with the exact combination of an HDMI monitor and an Intel Skylake processor.
The OpRegion code comes from IgdAssignmentDxe and should work everywhere. The boot display works for GVT-g and can safely replace ramfb. For direct passthrough, the boot display only works with the exact combination of an HDMI monitor and an Intel Skylake processor.

## How to build

Expand All @@ -22,3 +22,13 @@ sudo mkfs.vfat disk
```

Then run `./t` to build and test. Due to GVT-g and EFI shenanigans, the testing process needs root.

If you just want to use it for your VM, grab the rom file in Releases.

## License

I have no idea what this should be licensed in, but the code came from:
- managarm OS: https://github.com/managarm/managarm/
- IgdAssignmentDxe: non-upstreamed Intel patch to OVMF
- EDK II: https://github.com/tianocore/edk2
- The Linux kernel
12 changes: 0 additions & 12 deletions default.qpad_notebook

This file was deleted.

Empty file modified i915ovmf.dsc
100644 → 100755
Empty file.
1 change: 1 addition & 0 deletions mmio
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
#!/bin/sh
# Dump a MMIO register
sudo dd if=/dev/mem iflag=skip_bytes skip=`printf "%d" 0x$1` "bs=4" count=1 | xxd -e -g 4
10 changes: 4 additions & 6 deletions test
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,16 @@ then
true
else
modprobe kvmgt || exit
#TODO
sudo dd if=/sys/class/drm/card0-HDMI-A-1/edid of=/sys/class/drm/card0/gvt_edid bs=128 count=1
#sudo dd if=/sys/class/drm/card0-HDMI-A-1/edid of=/sys/class/drm/card0/gvt_edid bs=128 count=1
echo 2aee154e-7d0d-11e8-88b8-6f45320c7162 > /sys/bus/pci/devices/0000:00:02.0/mdev_supported_types/i915-GVTg_V5_4/create || exit
fi

# Create an UEFI disk that immediately shuts down the VM when booted
mkdir -p tmpfat
mount ../uefi_fun/disk tmpfat
mount disk tmpfat
mkdir -p tmpfat/EFI/BOOT
cp shutdown.efi tmpfat/EFI/BOOT/BOOTX64.EFI
umount tmpfat
rmdir tmpfat

#~/gpdvm/bin/qemu-system-x86_64 -k en-us -name uefitest,debug-threads=on -serial stdio -m 2048 -M pc -cpu host -global PIIX4_PM.disable_s3=1 -global PIIX4_PM.disable_s4=1 -machine kernel_irqchip=on -nodefaults -rtc base=localtime,driftfix=slew -no-hpet -global kvm-pit.lost_tick_policy=discard -enable-kvm -bios /home/hqm/gpdvm/bin/ovmf.fd --display egl-headless,gl=es -vga none -device vfio-pci,sysfsdev=/sys/bus/pci/devices/0000:00:02.0/2aee154e-7d0d-11e8-88b8-6f45320c7162,addr=02.0,display=on,x-igd-opregion=on,romfile=`pwd`/i915ovmf.rom -device qemu-xhci,p2=8,p3=8 -device usb-kbd -device usb-tablet -drive format=raw,file=../uefi_fun/disk

~/gpdvm/bin/qemu-system-x86_64 -k en-us -name uefitest,debug-threads=on -serial stdio -m 2048 -M pc -cpu host -global PIIX4_PM.disable_s3=1 -global PIIX4_PM.disable_s4=1 -machine kernel_irqchip=on -nodefaults -rtc base=localtime,driftfix=slew -no-hpet -global kvm-pit.lost_tick_policy=discard -enable-kvm -bios /home/hqm/gpdvm/bin/ovmf.fd -display gtk,gl=on,grab-on-hover=on -full-screen -vga none -device vfio-pci,sysfsdev=/sys/bus/pci/devices/0000:00:02.0/2aee154e-7d0d-11e8-88b8-6f45320c7162,addr=02.0,display=on,x-igd-opregion=on,romfile=`pwd`/i915ovmf.rom -device qemu-xhci,p2=8,p3=8 -device usb-kbd -device usb-tablet -drive format=raw,file=../uefi_fun/disk
qemu-system-x86_64 -k en-us -name uefitest,debug-threads=on -serial stdio -m 2048 -M pc -cpu host -global PIIX4_PM.disable_s3=1 -global PIIX4_PM.disable_s4=1 -machine kernel_irqchip=on -nodefaults -rtc base=localtime,driftfix=slew -no-hpet -global kvm-pit.lost_tick_policy=discard -enable-kvm -bios /home/hqm/gpdvm/bin/ovmf.fd -display gtk,gl=on,grab-on-hover=on -full-screen -vga none -device vfio-pci,sysfsdev=/sys/bus/pci/devices/0000:00:02.0/2aee154e-7d0d-11e8-88b8-6f45320c7162,addr=02.0,display=on,x-igd-opregion=on,romfile=`pwd`/i915ovmf.rom -device qemu-xhci,p2=8,p3=8 -device usb-kbd -device usb-tablet -drive format=raw,file=disk
7 changes: 0 additions & 7 deletions testmem.sh

This file was deleted.

0 comments on commit 3d3a3ec

Please sign in to comment.