[edk2-devel] Graphic Output on qemu

Alireza Banejad alibanejad1376 at gmail.com
Wed Feb 8 08:03:54 UTC 2023


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 at 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 at windriver.com | Master of Unix-Fu - Wind River
> Systems
>
> =============================================================================
>    "I put a dollar in a change machine. Nothing changed." - George Carlin
>
> =============================================================================
>
>
>


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#99789): https://edk2.groups.io/g/devel/message/99789
Mute This Topic: https://groups.io/mt/96810830/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/edk2-devel-archive/attachments/20230208/a9d233fc/attachment-0001.htm>


More information about the edk2-devel-archive mailing list