linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* efi/gop: do we need to check ConOut any more?
@ 2019-12-12 22:23 Arvind Sankar
  2019-12-13 10:06 ` Ard Biesheuvel
  0 siblings, 1 reply; 2+ messages in thread
From: Arvind Sankar @ 2019-12-12 22:23 UTC (permalink / raw)
  To: Ard Biesheuvel, Eugene Cohen, Matthew Garrett, Matt Fleming
  Cc: linux-efi, linux-kernel

Since commit 38cb5ef4473c ("X86: Improve GOP detection in the EFI boot
stub") we check for a GOP device that implements ConOut protocol to find
our primary output device. The commit log says that this was done to
avoid problems with the ConSplitter device, which exports a virtual GOP
interface. The original version by Matt Fleming checked for PCIIO
protocol, with a note that says there are some Apple machines have GOPs
without hardware, I assume that that was the same case, GOPs from
ConSplitter.

However, since commit 540f4c0e894f ("efi/libstub: Skip GOP with
PIXEL_BLT_ONLY format") we skip GOP's that don't have a framebuffer.

Looking at the EDK2 implementation of ConSplitter, the virtual GOP will
advertise a framebuffer iff it is attached to exactly one GOP device, in
which case it passes through all the information. If it is attached to a
UGA device or to more than one GOP, it will show as a non-framebuffer
GOP, so we will skip it anyway in those cases.

Given that, is it still necessary to check for conout at all, or would
it be enough to rely on the framebuffer check?

PS I hope I got the latest email addresses correct for everyone

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: efi/gop: do we need to check ConOut any more?
  2019-12-12 22:23 efi/gop: do we need to check ConOut any more? Arvind Sankar
@ 2019-12-13 10:06 ` Ard Biesheuvel
  0 siblings, 0 replies; 2+ messages in thread
From: Ard Biesheuvel @ 2019-12-13 10:06 UTC (permalink / raw)
  To: Arvind Sankar
  Cc: Ard Biesheuvel, Eugene Cohen, Matthew Garrett, Matt Fleming,
	linux-efi, Linux Kernel Mailing List

On Thu, 12 Dec 2019 at 23:23, Arvind Sankar <nivedita@alum.mit.edu> wrote:
>
> Since commit 38cb5ef4473c ("X86: Improve GOP detection in the EFI boot
> stub") we check for a GOP device that implements ConOut protocol to find
> our primary output device. The commit log says that this was done to
> avoid problems with the ConSplitter device, which exports a virtual GOP
> interface. The original version by Matt Fleming checked for PCIIO
> protocol, with a note that says there are some Apple machines have GOPs
> without hardware, I assume that that was the same case, GOPs from
> ConSplitter.
>
> However, since commit 540f4c0e894f ("efi/libstub: Skip GOP with
> PIXEL_BLT_ONLY format") we skip GOP's that don't have a framebuffer.
>
> Looking at the EDK2 implementation of ConSplitter, the virtual GOP will
> advertise a framebuffer iff it is attached to exactly one GOP device, in
> which case it passes through all the information. If it is attached to a
> UGA device or to more than one GOP, it will show as a non-framebuffer
> GOP, so we will skip it anyway in those cases.
>
> Given that, is it still necessary to check for conout at all, or would
> it be enough to rely on the framebuffer check?
>

If it doesn't hurt to check, I'd prefer to keep it in. UEFI is a can
of worms, given how many buggy implementations exist in the field.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-12-13 10:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-12 22:23 efi/gop: do we need to check ConOut any more? Arvind Sankar
2019-12-13 10:06 ` Ard Biesheuvel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).