From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933480AbdDEKgJ (ORCPT ); Wed, 5 Apr 2017 06:36:09 -0400 Received: from terminus.zytor.com ([65.50.211.136]:39277 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932863AbdDEKfh (ORCPT ); Wed, 5 Apr 2017 06:35:37 -0400 Date: Wed, 5 Apr 2017 03:30:56 -0700 From: tip-bot for Ard Biesheuvel Message-ID: Cc: pjones@redhat.com, tglx@linutronix.de, peterz@infradead.org, torvalds@linux-foundation.org, matt@codeblueprint.co.uk, ard.biesheuvel@linaro.org, linux-kernel@vger.kernel.org, mingo@kernel.org, hpa@zytor.com Reply-To: matt@codeblueprint.co.uk, ard.biesheuvel@linaro.org, pjones@redhat.com, tglx@linutronix.de, torvalds@linux-foundation.org, peterz@infradead.org, linux-kernel@vger.kernel.org, mingo@kernel.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: 55d728a40d368ba80443be85c02e641fc9082a3f 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: 55d728a40d368ba80443be85c02e641fc9082a3f Gitweb: http://git.kernel.org/tip/55d728a40d368ba80443be85c02e641fc9082a3f Author: Ard Biesheuvel AuthorDate: Tue, 4 Apr 2017 16:27:44 +0100 Committer: Ingo Molnar CommitDate: Wed, 5 Apr 2017 12:25:53 +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..b827a81 100644 --- a/drivers/video/fbdev/efifb.c +++ b/drivers/video/fbdev/efifb.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include