This repository has been archived by the owner on Nov 1, 2023. It is now read-only.
forked from HouQiming/i915ovmfPkg
-
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from RotatingFans/opregion-decoding
Added Automatic Display Detection. Also General Fixes.
- Loading branch information
Showing
22 changed files
with
2,775 additions
and
130 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/bash | ||
shopt -s nullglob | ||
for g in /sys/kernel/iommu_groups/*; do | ||
echo "IOMMU Group ${g##*/}:" | ||
for d in $g/devices/*; do | ||
echo -e "\t$(lspci -nns ${d##*/})" | ||
done; | ||
done; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/bin/bash | ||
export WORKSPACE=/home/patrick/i915dev/Release | ||
export PCILOC=0000:00:02.0 | ||
export PCIID=8086:9bca | ||
|
||
cd $WORKSPACE | ||
|
||
cd ./i915_simple | ||
|
||
# Create an UEFI disk that immediately shuts down the VM when booted | ||
mkdir -p tmpfat | ||
mount disk tmpfat | ||
mkdir -p tmpfat/EFI/BOOT | ||
umount tmpfat | ||
rmdir tmpfat | ||
systemctl stop display-manager.service | ||
echo $PCIID > /sys/bus/pci/drivers/vfio-pci/new_id | ||
echo $PCILOC> /sys/bus/pci/devices/$PCILOC/driver/unbind | ||
echo $PCILOC > /sys/bus/pci/drivers/vfio-pci/bind | ||
#qemu-system-x86_64 -k en-us -name uefitest,debug-threads=on -nographic -vga none -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 $WORKSPACE/OVMF_CODE.fd -device vfio-pci,host=$PCILOC,romfile=`pwd`/i915ovmf.rom -device qemu-xhci,p2=8,p3=8 -device usb-kbd -device usb-tablet -drive format=raw,file=disk -usb | ||
timeout --foreground -k 1 8 qemu-system-x86_64 -k en-us -name uefitest,debug-threads=on -nographic -vga none -chardev stdio,id=char0,logfile=serial.log,signal=off \ | ||
-serial chardev:char0 -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 $WORKSPACE/OVMF_CODE.fd -device vfio-pci,host=$PCILOC,romfile=`pwd`/i915ovmf.rom -device qemu-xhci,p2=8,p3=8 -device usb-kbd -device usb-tablet -drive format=raw,file=disk -usb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/bin/bash | ||
export WORKSPACE=/home/patrick/development | ||
export PCILOC=00:02.0 | ||
export PCIID=8086:9bca | ||
export GVTMODE=i915-GVTg_V5_4 | ||
|
||
|
||
cd ./i915_simple | ||
|
||
if [ -e /sys/bus/pci/devices/0000:$PCILOC/2aee154e-7d0d-11e8-88b8-6f45320c7162 ] | ||
then | ||
true | ||
else | ||
modprobe kvmgt || exit | ||
#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:$PCILOC/mdev_supported_types/$GVTMODE/create || exit | ||
fi | ||
|
||
# Create an UEFI disk that immediately shuts down the VM when booted | ||
mkdir -p tmpfat | ||
mount disk tmpfat | ||
mkdir -p tmpfat/EFI/BOOT | ||
umount tmpfat | ||
rmdir tmpfat | ||
|
||
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 $WORKSPACE/OVMF_CODE.fd -display gtk,gl=on,grab-on-hover=on -full-screen -vga none -device vfio-pci,sysfsdev=/sys/bus/pci/devices/0000:$PCILOC/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 |
Oops, something went wrong.