public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Gerd Hoffmann" <kraxel@redhat.com>
To: devel@edk2.groups.io, lange_tang@163.com
Subject: Re: [edk2-devel] The arm virtual machine displays problems in QXL during the UEFI phase
Date: Wed, 3 Nov 2021 07:03:22 +0100	[thread overview]
Message-ID: <20211103060322.h672asv47ev4ybpe@sirius.home.kraxel.org> (raw)
In-Reply-To: <5f7d5f39.1789.17ce3797a48.Coremail.lange_tang@163.com>

On Wed, Nov 03, 2021 at 09:46:01AM +0800, Lange Tang wrote:
> Hi Gerd:
> Thanks for your reply. In fact, I have no choice, only QXL in my work.
> 1. I wonder why the device display be normal when it hung on bus=pci.8,addr=0x0, but it is abnormal when bus=pci.9,addr=0x1 or bus=pci.7,addr=0x0.

Placing qxl behind a pci bridge is problematic too (even on x86).
I'm surprised it works at all.  qxl needs io ports 0x01ce + 0x1cf for
programming video modes in vga compatibility mode, and pci bridges
typically don't pass that though.

Maybe the working bridge got the 0x0000 -> 0x0fff io window assigned.
Wouldn't happen on x86 because of the legacy hardware in the 0x000 ->
0x3ff range, but maybe it is used for pci-pci bridges on arm.

> 2. Why cache properties are going to cause QXL display abnormal on
> ARM. Are there any links or materials? Thanks.

The fundamental issue is that the pci memory br for vram is virtual.
The guest maps it as io memory, but it actually is normal ram, so guest
and host map the same memory with different attributes.  That just
doesn't work on arm and results in display corruption when actually
running on arm hardware (when running in emulation, for example using
qemu on a x86 machine, this doesn't happen).

This is the reason why QemuVideoDxe is not compiled into ArmVirt.

take care,
  Gerd


  reply	other threads:[~2021-11-03  6:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-02 12:55 The arm virtual machine displays problems in QXL during the UEFI phase Lange Tang
2021-11-02 13:35 ` [edk2-devel] " Gerd Hoffmann
2021-11-03  1:46   ` Lange Tang
2021-11-03  6:03     ` Gerd Hoffmann [this message]
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=20211103060322.h672asv47ev4ybpe@sirius.home.kraxel.org \
    --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