public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: tip-bot for Ard Biesheuvel <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: ard.biesheuvel@linaro.org, peterz@infradead.org,
	pjones@redhat.com, linux-kernel@vger.kernel.org,
	torvalds@linux-foundation.org, tiwai@suse.de, tglx@linutronix.de,
	hpa@zytor.com, matt@codeblueprint.co.uk, mingo@kernel.org
Subject: [tip:efi/core] efifb: Omit memory map check on legacy boot
Date: Thu, 28 Mar 2019 23:44:10 -0700	[thread overview]
Message-ID: <tip-c2999c281ea2d2ebbdfce96cecc7b52e2ae7c406@git.kernel.org> (raw)
In-Reply-To: <20190328193429.21373-3-ard.biesheuvel@linaro.org>

Commit-ID:  c2999c281ea2d2ebbdfce96cecc7b52e2ae7c406
Gitweb:     https://git.kernel.org/tip/c2999c281ea2d2ebbdfce96cecc7b52e2ae7c406
Author:     Ard Biesheuvel <ard.biesheuvel@linaro.org>
AuthorDate: Thu, 28 Mar 2019 20:34:26 +0100
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Fri, 29 Mar 2019 07:34:59 +0100

efifb: Omit memory map check on legacy boot

Since the following commit:

  38ac0287b7f4 ("fbdev/efifb: Honour UEFI memory map attributes when mapping the FB")

efifb_probe() checks its memory range via efi_mem_desc_lookup(),
and this leads to a spurious error message:

   EFI_MEMMAP is not enabled

at every boot on KVM.  This is quite annoying since the error message
appears even if you set "quiet" boot option.

Since this happens on legacy boot, which strangely enough exposes
a EFI framebuffer via screen_info, let's double check that we are
doing an EFI boot before attempting to access the EFI memory map.

Reported-by: Takashi Iwai <tiwai@suse.de>
Tested-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Matt Fleming <matt@codeblueprint.co.uk>
Cc: Peter Jones <pjones@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-efi@vger.kernel.org
Link: http://lkml.kernel.org/r/20190328193429.21373-3-ard.biesheuvel@linaro.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 drivers/video/fbdev/efifb.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/video/fbdev/efifb.c b/drivers/video/fbdev/efifb.c
index ba906876cc45..9e529cc2b4ff 100644
--- a/drivers/video/fbdev/efifb.c
+++ b/drivers/video/fbdev/efifb.c
@@ -464,7 +464,8 @@ static int efifb_probe(struct platform_device *dev)
 	info->apertures->ranges[0].base = efifb_fix.smem_start;
 	info->apertures->ranges[0].size = size_remap;
 
-	if (!efi_mem_desc_lookup(efifb_fix.smem_start, &md)) {
+	if (efi_enabled(EFI_BOOT) &&
+	    !efi_mem_desc_lookup(efifb_fix.smem_start, &md)) {
 		if ((efifb_fix.smem_start + efifb_fix.smem_len) >
 		    (md.phys_addr + (md.num_pages << EFI_PAGE_SHIFT))) {
 			pr_err("efifb: video memory @ 0x%lx spans multiple EFI memory regions\n",

  reply	other threads:[~2019-03-29  6:44 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-28 19:34 [GIT PULL 0/5] EFI changes for v5.2 Ard Biesheuvel
2019-03-28 19:34 ` [PATCH 1/5] efi/libstub: refactor cmd_stubcopy Ard Biesheuvel
2019-03-29  6:43   ` [tip:efi/core] efi/libstub: Refactor the cmd_stubcopy Makefile command tip-bot for Masahiro Yamada
2019-03-28 19:34 ` [PATCH 2/5] efifb: omit memory map check on legacy boot Ard Biesheuvel
2019-03-29  6:44   ` tip-bot for Ard Biesheuvel [this message]
2019-03-28 19:34 ` [PATCH 3/5] efi/arm: Show SMBIOS bank/device location in cper and ghes error logs Ard Biesheuvel
2019-03-29  6:44   ` [tip:efi/core] efi/arm: Show SMBIOS bank/device location in CPER and GHES " tip-bot for Marcin Benka
2019-03-28 19:34 ` [PATCH 4/5] efi: Unify dmi setup code over architectures arm/arm64, ia64 and x86 Ard Biesheuvel
2019-03-29  6:45   ` [tip:efi/core] efi: Unify DMI setup code over the arm/arm64, ia64 and x86 architectures tip-bot for Robert Richter
2019-03-28 19:34 ` [PATCH 5/5] efi/libstub/arm: omit unneeded stripping of ksymtab/kcrctab sections Ard Biesheuvel
2019-03-29  6:46   ` [tip:efi/core] efi/libstub/arm: Omit " tip-bot for Ard Biesheuvel
2019-03-29  6:35 ` [GIT PULL 0/5] EFI changes for v5.2 Ingo Molnar

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-c2999c281ea2d2ebbdfce96cecc7b52e2ae7c406@git.kernel.org \
    --to=tipbot@zytor.com \
    --cc=ard.biesheuvel@linaro.org \
    --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=pjones@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=tiwai@suse.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