From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754029AbbJNOvm (ORCPT ); Wed, 14 Oct 2015 10:51:42 -0400 Received: from mail-wi0-f181.google.com ([209.85.212.181]:37296 "EHLO mail-wi0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753101AbbJNOvk (ORCPT ); Wed, 14 Oct 2015 10:51:40 -0400 Date: Wed, 14 Oct 2015 16:51:04 +0200 From: Ingo Molnar To: Matt Fleming Cc: Thomas Gleixner , "H. Peter Anvin" , =?utf-8?B?S8WRdsOhZ8OzLCBab2x0w6Fu?= , linux-kernel@vger.kernel.org, linux-efi@vger.kernel.org, Matthew Garrett , stable@vger.kernel.org, Matt Fleming Subject: Re: [PATCH] x86/efi: Fix multiple GOP device support Message-ID: <20151014145103.GB17890@gmail.com> References: <1444659236-24837-1-git-send-email-matt@codeblueprint.co.uk> <1444659236-24837-2-git-send-email-matt@codeblueprint.co.uk> <20151014144715.GA17890@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20151014144715.GA17890@gmail.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Ingo Molnar wrote: > * Matt Fleming wrote: > > > From: Kővágó, Zoltán > > > > 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 > > Cc: Matthew Garrett > > Cc: > > Signed-off-by: Matt Fleming > > --- > > 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