public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Lange Tang" <lange_tang@163.com>
To: devel@edk2.groups.io
Subject: The arm virtual machine displays problems in QXL during the UEFI phase
Date: Tue, 2 Nov 2021 20:55:39 +0800 (CST)	[thread overview]
Message-ID: <4914966b.cc0d.17ce0b82fe9.Coremail.lange_tang@163.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 2821 bytes --]

Hi everyone:


In order to support QXL display during the UEFI phase of the arm64 virtual machine, the modified code is as follows (based on master branch, commit id:17143c4837393d42c484b42d1789b85b2cff1aaf):


diff --git a/ArmVirtPkg/ArmVirtQemu.dsc b/ArmVirtPkg/ArmVirtQemu.dsc
index 7ef5e7297b..d73cf6aba0 100644
--- a/ArmVirtPkg/ArmVirtQemu.dsc
+++ b/ArmVirtPkg/ArmVirtQemu.dsc
@@ -501,6 +501,7 @@
   OvmfPkg/QemuRamfbDxe/QemuRamfbDxe.inf
   OvmfPkg/VirtioGpuDxe/VirtioGpu.inf
   OvmfPkg/PlatformDxe/Platform.inf
+  OvmfPkg/QemuVideoDxe/QemuVideoDxe.inf
 
   #
   # USB Support
diff --git a/ArmVirtPkg/ArmVirtQemu.fdf b/ArmVirtPkg/ArmVirtQemu.fdf
index b5e2253295..289d0c580b 100644
--- a/ArmVirtPkg/ArmVirtQemu.fdf
+++ b/ArmVirtPkg/ArmVirtQemu.fdf
@@ -126,3 +126,8 @@ READ_LOCK_STATUS   = TRUE
   }
 
 !include ArmVirtRules.fdf.inc
+
+#
+# VGA Module
+#
+# INF OvmfPkg/QemuVideoDxe/QemuVideoDxe.inf


Compiled it and generate QEMU_EFI.fd, Create virtual machines by qemu, as follows:


./qemu-6.0.0/build/qemu-system-aarch64 \
-machine virt,accel=kvm,usb=off,dump-guest-core=off,gic-version=3 \
-cpu host \
-m 8192 \
-smp 16 \
-bios QEMU_EFI.fd \
-vnc 127.0.0.1:19 \
-device pcie-root-port,port=0x8,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x1 \
-device pcie-root-port,port=0x9,chassis=2,id=pci.2,bus=pcie.0,addr=0x1.0x1 \
-device pcie-root-port,port=0xa,chassis=3,id=pci.3,bus=pcie.0,addr=0x1.0x2 \
-device pcie-root-port,port=0xb,chassis=4,id=pci.4,bus=pcie.0,addr=0x1.0x3 \
-device pcie-root-port,port=0xc,chassis=5,id=pci.5,bus=pcie.0,addr=0x1.0x4 \
-device pcie-root-port,port=0xd,chassis=6,id=pci.6,bus=pcie.0,addr=0x1.0x5 \
-device pcie-root-port,port=0xe,chassis=7,id=pci.7,bus=pcie.0,addr=0x1.0x6 \
-device pcie-root-port,port=0xf,chassis=8,id=pci.8,bus=pcie.0,addr=0x1.0x7 \
-device pcie-pci-bridge,id=pci.9,bus=pci.6,addr=0x0 \
-netdev user,id=hostnet0 \
-device virtio-net-pci,id=hostnet0,mac=52:54:00:14:72:20,bus=pci.1,addr=0x0 \
-drive file=/var/lib/libvirt/images/tlj-kylin.qcow2,format=qcow2,if=none,id=drive-virtio-disk0 \
-device virtio-blk-pci,scsi=off,bus=pcie.0,addr=0x6,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 \
-device qxl-vga,id=video0,bus=pci.7,addr=0x0


The test results are as follows:
1. When the QXL device hangs on the bus=pci.9, addr=0x1 or bus=pci.7, addr=0x0, there is no display during the UEFI phase, and the following error is found by debug UEFI firmware log:
  QemuVideo: BochsID mismatch (got 0x0). From the OgmfPkg/QemuVideoDxe/Driver .c
2. When the qxl device hangs in the bus=pci.8, addr=0x0, it can be displayed normally during the UEFI phase. BochsID=0xb0c5


The way to read BochsID is PIO, and ARM does not support PIO commands, should it be changed to MMIO? Or others?
Hope to receive your suggestions or comments. Thank you!


Best regards



[-- Attachment #2: Type: text/html, Size: 5120 bytes --]

             reply	other threads:[~2021-11-02 12:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-02 12:55 Lange Tang [this message]
2021-11-02 13:35 ` [edk2-devel] The arm virtual machine displays problems in QXL during the UEFI phase Gerd Hoffmann
2021-11-03  1:46   ` Lange Tang
2021-11-03  6:03     ` Gerd Hoffmann
2021-11-08  9:30       ` Lange Tang
2021-11-08 11:49         ` Gerd Hoffmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4914966b.cc0d.17ce0b82fe9.Coremail.lange_tang@163.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox