From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753661AbdDEIDT (ORCPT ); Wed, 5 Apr 2017 04:03:19 -0400 Received: from terminus.zytor.com ([65.50.211.136]:39563 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753484AbdDEIDR (ORCPT ); Wed, 5 Apr 2017 04:03:17 -0400 Date: Wed, 5 Apr 2017 00:58:34 -0700 From: tip-bot for Ard Biesheuvel Message-ID: Cc: ard.biesheuvel@linaro.org, linux-kernel@vger.kernel.org, torvalds@linux-foundation.org, pjones@redhat.com, mingo@kernel.org, matt@codeblueprint.co.uk, tglx@linutronix.de, peterz@infradead.org, hpa@zytor.com Reply-To: ard.biesheuvel@linaro.org, torvalds@linux-foundation.org, linux-kernel@vger.kernel.org, pjones@redhat.com, mingo@kernel.org, matt@codeblueprint.co.uk, tglx@linutronix.de, peterz@infradead.org, hpa@zytor.com In-Reply-To: <20170404152744.26687-3-ard.biesheuvel@linaro.org> References: <20170404152744.26687-3-ard.biesheuvel@linaro.org> To: linux-tip-commits@vger.kernel.org Subject: [tip:efi/urgent] efi/fb: Avoid reconfiguration of BAR that covers the framebuffer Git-Commit-ID: 5a8997342183bb792fe2c15cecf371665d784dd7 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 5a8997342183bb792fe2c15cecf371665d784dd7 Gitweb: http://git.kernel.org/tip/5a8997342183bb792fe2c15cecf371665d784dd7 Author: Ard Biesheuvel AuthorDate: Tue, 4 Apr 2017 16:27:44 +0100 Committer: Ingo Molnar CommitDate: Wed, 5 Apr 2017 09:20:18 +0200 efi/fb: Avoid reconfiguration of BAR that covers the framebuffer On UEFI systems, the PCI subsystem is enumerated by the firmware, and if a graphical framebuffer is exposed via a PCI device, its base address and size are exposed to the OS via the Graphics Output Protocol (GOP). On arm64 PCI systems, the entire PCI hierarchy is reconfigured from scratch at boot. This may result in the GOP framebuffer address to become stale, if the BAR covering the framebuffer is modified. This will cause the framebuffer to become unresponsive, and may in some cases result in unpredictable behavior if the range is reassigned to another device. So add a non-x86 quirk to the EFI fb driver to find the BAR associated with the GOP base address, and claim the BAR resource so that the PCI core will not move it. Signed-off-by: Ard Biesheuvel Cc: # v4.7+ Cc: Linus Torvalds Cc: Matt Fleming Cc: Peter Jones Cc: Peter Zijlstra Cc: Thomas Gleixner 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-3-ard.biesheuvel@linaro.org Signed-off-by: Ingo Molnar --- drivers/video/fbdev/efifb.c | 66 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 65 insertions(+), 1 deletion(-) diff --git a/drivers/video/fbdev/efifb.c b/drivers/video/fbdev/efifb.c index 8c4dc1e..758960b 100644 --- a/drivers/video/fbdev/efifb.c +++ b/drivers/video/fbdev/efifb.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include