public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Alireza Banejad" <alibanejad1376@gmail.com>
To: "Paul, Bill" <Bill.Paul@windriver.com>
Cc: "devel@edk2.groups.io" <devel@edk2.groups.io>
Subject: Re: [edk2-devel] Graphic Output on qemu
Date: Wed, 8 Feb 2023 11:33:54 +0330	[thread overview]
Message-ID: <CADH3hnK-YsgNQKjzR_yUm=D0dbOG=md2SJjGB_kvEeeUhg4Z+Q@mail.gmail.com> (raw)
In-Reply-To: <6558368.1D856uYhSO@core>

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

Hi Bill,

Yes, I have the graphics window with the logo showing and I see the setup
menu.
In fact, I have designed a HII form with my specific applications. The
problem is that it just uses the SimpleTextOutput. It doesn't use the GOP
or UgaDraw libraries.
Plus, I am able to locate the protocol and it returns the status code of 0.
the actual issue happens with the HandleProtocol Function.
After I compile my code with the debug macros enabled, the status code for
HandleProtocol() function is RETURN_UNSUPPORTED (Both for UgaDraw and GOP)
and if I were to use the GOP or UgaDraw methods, my application would
simply crash.
Below is how I use the HandleProtocol function:

  Status = gBS->HandleProtocol (
                  gST->ConsoleOutHandle,
                  &gEfiGraphicsOutputProtocolGuid,
                  (VOID **)&GraphicsOutput
                  );

Last but not least, whether using the virtio-gpu I get the same result.
Based on what I mentioned above, since I find the protocol but I'm not able
to open it, I concluded there might be something wrong with my qemu
settings.

On Tue, Feb 7, 2023, 23:25 Paul, Bill <Bill.Paul@windriver.com> wrote:

> Of all the gin joints in all the towns in all the world, Alireza Banejad
> had
> to walk into mine at 02:22:32 on Tuesday, 7 February 2023 and say:
>
> > Do not click links or open attachments unless you recognize the sender
> and
> > know the content is safe. Hello everyone,
> > I am trying to use the GOP library for my uefi development. But no matter
> > what code whenever i want to open the GOP handle RETURN_UNSUPPORTED is
> > returned. I think this may be a qemu problem as if it doesn't support the
> > GOP at all. This is how I run my qemu
> >
> > qemu-system-x86_64 -bios $FIRMWARE -hda fat:rw:$DRIVE -global
> > isa-debugcon.iobase=0x402  -net none -debugcon file:debug2.log  -machine
> > pc-q35-6.2 -device virtio-gpu
> >
> > Should I add any specific options for the qemu command or should I just
> use
> > another lib for GOP on qemu?
>
> One question: when you launch QEMU, do you actually see a graphics window
> pop
> up with the Tianocore logo? If you press F2 as it launches, are you able
> to
> enter the setup menu?
>
> I'm trying to understand if QEMU/OVMF's graphics display is working all
> all.
> If it is, then in theory the GOP support should work.
>
> If I may suggest, omit the -device virtio-gpu option. In my experience,
> the
> OVMF firmware for Intel works with the QEMU built-in emulated VGA display
> device. With the code I've written in the past, calling
> BS->LocateProtocol()
> with the GOP GUID returns a valid handle. Once you have that, you should
> be
> able to use the GOP methods, e.g. GOP->Blt().
>
> -Bill
>
> --
>
> =============================================================================
> -Bill Paul            (510) 749-2329 | VxWorks Software Architect,
>                  wpaul@windriver.com | Master of Unix-Fu - Wind River
> Systems
>
> =============================================================================
>    "I put a dollar in a change machine. Nothing changed." - George Carlin
>
> =============================================================================
>
>
>

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

  reply	other threads:[~2023-02-08  8:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-07 10:22 Graphic Output on qemu Alireza Banejad
2023-02-07 19:55 ` [edk2-devel] " Paul, Bill
2023-02-08  8:03   ` Alireza Banejad [this message]
2023-02-08  9:06     ` Michael Brown
2023-02-08  9:55       ` Alireza Banejad
2023-02-08 10:00         ` Michael Brown

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='CADH3hnK-YsgNQKjzR_yUm=D0dbOG=md2SJjGB_kvEeeUhg4Z+Q@mail.gmail.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