cmd2001 / build-edk2-gvtd

Automatically Build GVT-d Ready OVMF and OpROM
The Unlicense
88 stars 18 forks source link

Errors when boot New tianocore BIOS #6

Open SeddonShen opened 8 months ago

SeddonShen commented 8 months ago

Machine: NUC8 i5BEK Intel i5-8259 PVE 8.0.3

SeddonShen commented 8 months ago

After I try to use myself build OVMF_CODE_4MB.fd and OVMF_CODE_4MB.secboot.fd to replace old files in PVE, it seems ok to display in default display by PVE Console and show the tianocore BIOS logo, but after passthrough to the virtual system, it can't display anything, but after nearly 2 minutes, the Apple Logo can show and successfully enter the system, and I also try boot without any system or windows when set ready for iGPU passthrough, they all can't show BIOS logo, what problem you will think to be? Thanks a lot. :-)

SeddonShen commented 8 months ago

By the way, the iGPU is Intel Iris Plus Graphics 655

cmd2001 commented 8 months ago

Try to add -debugcon file:/root/d-debug.log -global isa-debugcon.iobase=0x402 in the line of args: of your vm configuration file and provide /root/d-debug.log for more infomation.

By the way, updating BIOS to the latest version and extracting GOP from the same version of BIOS may help.

Intel Iris Plus Graphics 655 may not use the same GOP as other Coffee Lake platform, and you have to extract GOP from machines come with the exactly same iGPU.

SeddonShen commented 8 months ago

这是我编译生成的文件,在替换OVMF_CODE_4M.fd和OVMF_CODE_4M.secboot.fd之后,使用args: -set device.hostpci0.addr=02.0 -set device.hostpci0.x-igd-gms=6 -set device.hostpci0.x-igd-opregion=on和B660_GOP.rom驱动windows,是会蓝屏的。 ovmf_UHD.zip 然后在替换fd后使用这个intel-iris-655.rom作为显卡直通的rom,bios的时候啥也看不到,但是不需要args: -set device.hostpci0.addr=02.0 -set device.hostpci0.x-igd-gms=6 -set device.hostpci0.x-igd-opregion=on这个参数就能在bios黑屏之后进入windows的时候,看到画面,加上这个args参数反而无法启动。 我现在非常不理解这些行为背后的原因,还请指教。(物理机BIOS和提取BIOS版本是一致的)

SeddonShen commented 8 months ago

d-debug_noargs.log 没有args参数,使用替换过的OVMF_CODE_4M.fd和OVMF_CODE_4M.secboot.fd作为BIOS,启动Windows,在黑屏一分钟后(应该是BIOS到系统完全启动的过程),进入Windows登录页面,完美使用。

SeddonShen commented 8 months ago

d-debug.log 使用args: -set device.hostpci0.addr=02.0 -set device.hostpci0.x-igd-gms=6 -set device.hostpci0.x-igd-opregion=on参数, hostpci0: 0000:00:02,legacy-igd=1,romfile=intel-iris-655.rom作为参数(这个romfile=intel-iris-655.rom从上述提到的github仓库中下载,并没有采用自行编译的ROM)

SeddonShen commented 8 months ago

我现在想先能够在启动的时候就能看到BIOS,不然不知道到底是哪里报错了呀。谢谢!

cmd2001 commented 8 months ago

Have you ever seen the BIOS screen when using the first combination(self-builded ovmf and B660_GOP.rom, adding args)? We also need log file from this case for cross-comparing.

Do not worry about the bluescreen as it could be solved by switching the system type to Linux(instead of Windows) as some extra CPU feature provided for Windows guest may cause Intel iGPU driver to crash the system.

As for intel-iris-655.rom, we do not have the source code from which the rom was builded, and I have no idea about its capability with this project. However, it seems like this rom does not work with ovmf builded from this project.

SeddonShen commented 8 months ago

OK, the log is here: d-debug_withselfbuild_ROM.log when i use self-builded ovmf and B660_GOP.rom and add args, the conf: args: -debugcon file:/root/d-debug.log -global isa-debugcon.iobase=0x402 -set device.hostpci0.addr=02.0 -set device.hostpci0.x-igd-gms=6 -set device.hostpci0.x-igd-opregion=on hostpci0: 0000:00:02,legacy-igd=1,romfile=Iris655_GOP.rom bios: ovmf boot: order=virtio0 cores: 8 cpu: host efidisk0: local-lvm:vm-102-disk-0,efitype=4m,pre-enrolled-keys=1,size=4M machine: pc-i440fx-8.0 memory: 12288 meta: creation-qemu=8.0.2,ctime=1702975353 name: Windows11 net0: e1000=32:DC:D0:D7:D4:C0,bridge=vmbr0,firewall=1 numa: 0 ostype: l26 scsihw: virtio-scsi-single smbios1: uuid=da6d79b2-460c-427a-ab7b-d8137b1e5d40 sockets: 1 tpmstate0: local-lvm:vm-102-disk-1,size=4M,version=v2.0 usb0: host=1-2,usb3=1 usb1: host=8087:0aaa usb4: host=1-1,usb3=1 vga: none virtio0: local-lvm:vm-102-disk-2,iothread=1,size=100G vmgenid: afa0b468-a735-4ccb-9311-9201f9055123

The boot process is that after a minute of black screen, it goes to a blurred screen when windows startup and then crashes in auto recovery.

image image

Thanks a lot, have a good night!

SeddonShen commented 8 months ago

By the way, I have switched the system type to Linux

cmd2001 commented 7 months ago

Try to boot pre-installed Windows from virtual disk, which can be installed without iGPU passthrough.

It seems that the rom only works when Intel Graphical Driver is loaded on some Skylake platform.