mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 23:40:54 +07:00
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: 9822504c1f
("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>
This commit is contained in:
parent
308ac75639
commit
540f4c0e89
@ -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,
|
status = __gop_query32(sys_table_arg, gop32, &info, &size,
|
||||||
¤t_fb_base);
|
¤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
|
* Systems that use the UEFI Console Splitter may
|
||||||
* provide multiple GOP devices, not all of which are
|
* 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,
|
status = __gop_query64(sys_table_arg, gop64, &info, &size,
|
||||||
¤t_fb_base);
|
¤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
|
* Systems that use the UEFI Console Splitter may
|
||||||
* provide multiple GOP devices, not all of which are
|
* provide multiple GOP devices, not all of which are
|
||||||
|
Loading…
Reference in New Issue
Block a user