From: "tip-bot for Cohen, Eugene" <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: ard.biesheuvel@linaro.org, peterz@infradead.org,
mingo@kernel.org, torvalds@linux-foundation.org, eugene@hp.com,
hpa@zytor.com, linux-kernel@vger.kernel.org, tglx@linutronix.de,
matt@codeblueprint.co.uk
Subject: [tip:efi/urgent] efi/libstub: Skip GOP with PIXEL_BLT_ONLY format
Date: Wed, 5 Apr 2017 00:57:55 -0700 [thread overview]
Message-ID: <tip-540f4c0e894f7e46a66dfa424b16424cbdc12c38@git.kernel.org> (raw)
In-Reply-To: <20170404152744.26687-2-ard.biesheuvel@linaro.org>
Commit-ID: 540f4c0e894f7e46a66dfa424b16424cbdc12c38
Gitweb: http://git.kernel.org/tip/540f4c0e894f7e46a66dfa424b16424cbdc12c38
Author: Cohen, Eugene <eugene@hp.com>
AuthorDate: Tue, 4 Apr 2017 16:27:43 +0100
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Wed, 5 Apr 2017 09:20:18 +0200
efi/libstub: Skip GOP with PIXEL_BLT_ONLY format
The UEFI Specification permits Graphics Output Protocol (GOP) instances
without direct framebuffer access. This is indicated in the Mode structure
with a PixelFormat enumeration value of PIXEL_BLT_ONLY. Given that the
kernel does not know how to drive a Blt() only framebuffer (which is only
permitted before ExitBootServices() anyway), we should disregard such
framebuffers when looking for a GOP instance that is suitable for use as
the boot console.
So modify the EFI GOP initialization to not use a PIXEL_BLT_ONLY instance,
preventing attempts later in boot to use an invalid screen_info.lfb_base
address.
Signed-off-by: Eugene Cohen <eugene@hp.com>
[ Moved the Blt() only check into the loop and clarified that Blt() only GOPs are unusable by the kernel. ]
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: <stable@vger.kernel.org> # v4.7+
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Matt Fleming <matt@codeblueprint.co.uk>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: leif.lindholm@linaro.org
Cc: linux-efi@vger.kernel.org
Cc: lorenzo.pieralisi@arm.com
Fixes: 9822504c1fa5 ("efifb: Enable the efi-framebuffer platform driver ...")
Link: http://lkml.kernel.org/r/20170404152744.26687-2-ard.biesheuvel@linaro.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
drivers/firmware/efi/libstub/gop.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/firmware/efi/libstub/gop.c b/drivers/firmware/efi/libstub/gop.c
index 932742e..24c461d 100644
--- a/drivers/firmware/efi/libstub/gop.c
+++ b/drivers/firmware/efi/libstub/gop.c
@@ -149,7 +149,8 @@ setup_gop32(efi_system_table_t *sys_table_arg, struct screen_info *si,
status = __gop_query32(sys_table_arg, gop32, &info, &size,
¤t_fb_base);
- if (status == EFI_SUCCESS && (!first_gop || conout_found)) {
+ if (status == EFI_SUCCESS && (!first_gop || conout_found) &&
+ info->pixel_format != PIXEL_BLT_ONLY) {
/*
* Systems that use the UEFI Console Splitter may
* provide multiple GOP devices, not all of which are
@@ -266,7 +267,8 @@ setup_gop64(efi_system_table_t *sys_table_arg, struct screen_info *si,
status = __gop_query64(sys_table_arg, gop64, &info, &size,
¤t_fb_base);
- if (status == EFI_SUCCESS && (!first_gop || conout_found)) {
+ if (status == EFI_SUCCESS && (!first_gop || conout_found) &&
+ info->pixel_format != PIXEL_BLT_ONLY) {
/*
* Systems that use the UEFI Console Splitter may
* provide multiple GOP devices, not all of which are
next prev parent reply other threads:[~2017-04-05 8:02 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20170405100833epcas1p4b5076679dc4f8644fa789b421a66f953@epcas1p4.samsung.com>
2017-04-04 15:27 ` [GIT PULL 0/2] EFI fixes for v4.11 Ard Biesheuvel
2017-04-04 15:27 ` [PATCH 1/2] efi/libstub: Skip GOP with PIXEL_BLT_ONLY format Ard Biesheuvel
2017-04-05 7:57 ` tip-bot for Cohen, Eugene [this message]
2017-04-04 15:27 ` [PATCH 2/2] efifb: Avoid reconfiguration of BAR that covers the framebuffer Ard Biesheuvel
2017-04-05 7:58 ` [tip:efi/urgent] efi/fb: " tip-bot for Ard Biesheuvel
2017-04-05 10:30 ` tip-bot for Ard Biesheuvel
2017-05-19 16:27 ` [PATCH 2/2] efifb: " Bjorn Helgaas
2017-05-19 16:37 ` Ard Biesheuvel
2017-05-19 20:44 ` Bjorn Helgaas
2017-05-19 22:04 ` Ard Biesheuvel
2017-04-05 10:08 ` [GIT PULL 0/2] EFI fixes for v4.11 Bartlomiej Zolnierkiewicz
2017-04-05 10:14 ` Ard Biesheuvel
2017-04-05 10:26 ` Ingo Molnar
2017-04-05 10:32 ` Ard Biesheuvel
2017-04-05 10:44 ` Bartlomiej Zolnierkiewicz
2017-04-05 10:45 ` Ard Biesheuvel
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=tip-540f4c0e894f7e46a66dfa424b16424cbdc12c38@git.kernel.org \
--to=tipbot@zytor.com \
--cc=ard.biesheuvel@linaro.org \
--cc=eugene@hp.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=matt@codeblueprint.co.uk \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.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