linux-efi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: Matt Fleming <matt-mF/unelCI9GS6iBeEJttW/XRex20P6io@public.gmane.org>
Cc: "Thomas Gleixner" <tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>,
	"H. Peter Anvin" <hpa-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org>,
	"Kővágó,
	Zoltán" <dirty.ice.hu-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	"Matthew Garrett" <mjg59-1xO5oi07KQx4cg9Nei1l7Q@public.gmane.org>,
	stable-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	"Matt Fleming"
	<matt.fleming-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Subject: Re: [PATCH] x86/efi: Fix multiple GOP device support
Date: Wed, 14 Oct 2015 16:51:04 +0200	[thread overview]
Message-ID: <20151014145103.GB17890@gmail.com> (raw)
In-Reply-To: <20151014144715.GA17890-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>


* Ingo Molnar <mingo-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> wrote:

> * Matt Fleming <matt-mF/unelCI9GS6iBeEJttW/XRex20P6io@public.gmane.org> wrote:
> 
> > From: Kővágó, Zoltán <dirty.ice.hu-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> > 
> > When multiple GOP devices exists, but none of them implements ConOut,
> > the code should just choose the first GOP (according to the comments).
> > But currently fb_base will refer to the last GOP, while other parameters
> > to the first GOP, which will likely result in a garbled display.
> > 
> > I can reliably reproduce this bug using my ASRock Z87M Extreme4
> > motherboard with CSM and integrated GPU disabled, and two PCIe video
> > cards (NVidia GT640 and GTX980), booting from efi-stub (booting from
> > grub works fine).  On the primary display the asrock logo remains and on
> > the secondary screen is garbled up completely.
> > 
> > Signed-off-by: Kővágó, Zoltán <DirtY.iCE.hu@gmail.com>
> > Cc: Matthew Garrett <mjg59-1xO5oi07KQx4cg9Nei1l7Q@public.gmane.org>
> > Cc: <stable-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
> > Signed-off-by: Matt Fleming <matt.fleming-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
> > ---
> >  arch/x86/boot/compressed/eboot.c | 8 ++++++--
> >  1 file changed, 6 insertions(+), 2 deletions(-)
> > 
> > diff --git a/arch/x86/boot/compressed/eboot.c b/arch/x86/boot/compressed/eboot.c
> > index ee1b6d346b98..db51c1f27446 100644
> > --- a/arch/x86/boot/compressed/eboot.c
> > +++ b/arch/x86/boot/compressed/eboot.c
> > @@ -667,6 +667,7 @@ setup_gop32(struct screen_info *si, efi_guid_t *proto,
> >  		bool conout_found = false;
> >  		void *dummy = NULL;
> >  		u32 h = handles[i];
> > +		u32 current_fb_base;
> 
> Sigh, fb_base is u64...
> 
> > @@ -770,6 +772,7 @@ setup_gop64(struct screen_info *si, efi_guid_t *proto,
> >  		bool conout_found = false;
> >  		void *dummy = NULL;
> >  		u64 h = handles[i];
> > +		u32 current_fb_base;
> 
> Ditto.
> 
> So I've applied it with that obvious bug fixed, but could you guys please double 
> check how on earth this patch could possibly have worked fine in testing, without 
> crashing 64-bit kernels?

Ah, I see, this is a subtle semantic conflict with pending v4.4 EFI changes in 
tip:core/efi, which changed fb_base from u32 to u64:

  ae2ee627dc87 ("efifb: Add support for 64-bit frame buffer addresses")

(Interestingly there was no textual conflict between this patch and that commit.)

So the fix patch is fine as-is for v4.3, but needs a conflict resolution for the 
pending v4.4 commit.

I've applied it that way.

Thanks,

	Ingo

  parent reply	other threads:[~2015-10-14 14:51 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-12 14:13 [GIT PULL] EFI urgent fix Matt Fleming
2015-10-12 14:13 ` [PATCH] x86/efi: Fix multiple GOP device support Matt Fleming
     [not found]   ` <1444659236-24837-2-git-send-email-matt-mF/unelCI9GS6iBeEJttW/XRex20P6io@public.gmane.org>
2015-10-14 14:47     ` Ingo Molnar
     [not found]       ` <20151014144715.GA17890-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-10-14 14:51         ` Ingo Molnar [this message]
2015-10-14 15:02           ` Matt Fleming
     [not found]             ` <20151014150215.GC2782-mF/unelCI9GS6iBeEJttW/XRex20P6io@public.gmane.org>
2015-10-14 15:04               ` Ingo Molnar
2015-10-14 15:10                 ` Matt Fleming
  -- strict thread matches above, loose matches on Subject: below --
2015-09-19 13:40 [PATCH] x86/efi: fix " Kővágó, Zoltán
     [not found] ` <fce1886dc0b07f374eb49a13746df5e47518d338.1442666763.git.DirtY.iCE.hu-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-10-07 20:48   ` Matt Fleming

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-all 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=20151014145103.GB17890@gmail.com \
    --to=mingo-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
    --cc=dirty.ice.hu-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=hpa-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org \
    --cc=linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=matt-mF/unelCI9GS6iBeEJttW/XRex20P6io@public.gmane.org \
    --cc=matt.fleming-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=mjg59-1xO5oi07KQx4cg9Nei1l7Q@public.gmane.org \
    --cc=stable-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org \
    /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;
as well as URLs for NNTP newsgroup(s).