]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
x86, efi: Fix display detection in EFI boot stub
authorDavid Woodhouse <David.Woodhouse@intel.com>
Mon, 7 Jan 2013 21:52:16 +0000 (21:52 +0000)
committerH. Peter Anvin <hpa@linux.intel.com>
Mon, 28 Jan 2013 04:19:37 +0000 (20:19 -0800)
When booting under OVMF we have precisely one GOP device, and it
implements the ConOut protocol.

We break out of the loop when we look at it... and then promptly abort
because 'first_gop' never gets set. We should set first_gop *before*
breaking out of the loop. Yes, it doesn't really mean "first" any more,
but that doesn't matter. It's only a flag to indicate that a suitable
GOP was found.

In fact, we'd do just as well to initialise 'width' to zero in this
function, then just check *that* instead of first_gop. But I'll do the
minimal fix for now (and for stable@).

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Cc: <stable@kernel.org>
Link: http://lkml.kernel.org/r/1358513837.2397.247.camel@shinybook.infradead.org
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Cc: Matt Fleming <matt.fleming@intel.com>
arch/x86/boot/compressed/eboot.c

index 18e329ca108e5f720adf1974fa1e90c8b2626991..448a86e154a94baa93f620b7761e1500bb7eb7c0 100644 (file)
@@ -432,10 +432,9 @@ static efi_status_t setup_gop(struct screen_info *si, efi_guid_t *proto,
                         * Once we've found a GOP supporting ConOut,
                         * don't bother looking any further.
                         */
+                       first_gop = gop;
                        if (conout_found)
                                break;
-
-                       first_gop = gop;
                }
        }