Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp4476805ybl; Mon, 9 Dec 2019 11:25:33 -0800 (PST) X-Google-Smtp-Source: APXvYqw7mksKKI9/JxLxioPe7qeYTXMZPa68MfdRN23W16cftxbb0o8xnMvzbP2mSXsASrh1ZRrA X-Received: by 2002:a9d:7592:: with SMTP id s18mr23615283otk.130.1575919532843; Mon, 09 Dec 2019 11:25:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575919532; cv=none; d=google.com; s=arc-20160816; b=kp3DmGL4yqKj+OmdekSn5dBmY2QjBC6JMILwjKRz3nsq8j7g1JWY7MiEwY3Y51VbCi lhfqe5NyZpBnqv3e5gcCVwzDn4Gc2+f3uHfP+WJSHBqUpuerUBYFTOHh5G9m590o2AdU sML6HHNEEahoiF6s0V/lZyihEftMRIr55Cnw3G32se4WvWlFpWsRG/bMs6iHLMf5cU7g /8kODms+eJBpBhAu7KQTAqRxON3H7kQPyMUb0bA2nQ88igj91hD1B/DvvUmRz89VsCm4 CIrmuGA1S1QCD3Ab3l3gTEIOFOHWUNMGyFbzD5CVqsqllc3rFUfiVC5eEQVj58+YO3e8 tHNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=Jyxu52lJ82wz6kUvOXMHO9X6LCKML6pCq+dZRSdiz3g=; b=QWtNcmkATa/1PqFCpuiZ7N+VohI7zq+xIQPLBZiGf4adhMyqja2jAYKfgbhrtNNwzM JwcoRGDinHQWt1gPUwOP2pOB/OckeQjvRYhYAOjiUvo7rnBEXCN3WTUjI/pr4IZQcou3 syogMv5J1JLLiKGKz++WJc77evMFb/Zewno1wAwgl9o59layhIK9c4eH/3n/muBtvTaA 2bfCv2sxYZbax5jb7HXIponxN6hw50n/ivTE79bR/SYOP32BEPZxRkv7e4rpypvPpTAT jPAseXnkSIF6GozPwrX4AzG4OgeLHRWSGHztil3OXMafgERJ8hgTzkcCUeJoEHSJnlFw SNkw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=RuAuAaWN; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l20si442925otd.292.2019.12.09.11.25.20; Mon, 09 Dec 2019 11:25:32 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=RuAuAaWN; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726969AbfLITYS (ORCPT + 99 others); Mon, 9 Dec 2019 14:24:18 -0500 Received: from mail-wm1-f65.google.com ([209.85.128.65]:52661 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726637AbfLITYR (ORCPT ); Mon, 9 Dec 2019 14:24:17 -0500 Received: by mail-wm1-f65.google.com with SMTP id p9so560792wmc.2 for ; Mon, 09 Dec 2019 11:24:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Jyxu52lJ82wz6kUvOXMHO9X6LCKML6pCq+dZRSdiz3g=; b=RuAuAaWNc4+4r15qBvDkEC8cXwqOvhP3j5BB4UPmrMpBsYLuHmZUNUMpcxR2Lvu7cu DRtzPLrQRvqDzNj1qFoDc4YLkdfiALI3Qi0plhuM/iqG3mr9D1zOvQeAUV7m7XaMBhww Tvtdz9GKICDtBJouWvb7QHknXYCB4wC0sEqhIrwjDDKENLFSO155m6feK6JeR66BRazC zRDwWKpXavbCD7yVsgnOwEBYsTD7HMH4kU+a9zXe57Sc4992shwhCUNkDwGqkehz1WNy D00Z5wPGnqj+mFr1w39OosPkE0EU5o5slb4TUwsv+QCGrl3fxGgP8c4ynrD08sql2JUo Uc1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Jyxu52lJ82wz6kUvOXMHO9X6LCKML6pCq+dZRSdiz3g=; b=PWpbVfXIC8ZzhWz/AX1oUR/HqhYgM2/aOPIWHjfkXgDeH8PK2MPNtQyGHrsROt2nZj FQ7XJy9EfWbqlE7r3yXFdXb2KXEAKMektTTFCNo4VbN3Zip7UIclmZRZpdUm8abY/fff mZvstiT9KtCviE138edKLaosWusqCCPC9xcjjrN7Hy0DG95ZsQfZYBbxJ/Fl8yj/8dkx ersWi8O6kO08gGQHeRpZi+lb2TMrXwnyidoyAadvyE3MRIiCLDQFi8vBoqs/p2sbq562 Xct2YbUbCNIaD4xGcQsvAG8eZa0pyThFSigaj6NaohAAQrioLgIj2HIvfajYln1Qm48t SW2A== X-Gm-Message-State: APjAAAWPkGpRUSds/G12xtSTVG/97hFJ6MTBZFMt26hNLH6/qkTWNoNM RQvGYi8RdJoWJP7Fhkw7nqrPi2pu9J103a3iikUFOQ== X-Received: by 2002:a05:600c:3ca:: with SMTP id z10mr677323wmd.148.1575919455265; Mon, 09 Dec 2019 11:24:15 -0800 (PST) MIME-Version: 1.0 References: <20191206165542.31469-1-ardb@kernel.org> <20191206165542.31469-7-ardb@kernel.org> <20191209191242.GA3075464@rani.riverdale.lan> In-Reply-To: <20191209191242.GA3075464@rani.riverdale.lan> From: Ard Biesheuvel Date: Mon, 9 Dec 2019 19:24:13 +0000 Message-ID: Subject: Re: [PATCH 6/6] efi/earlycon: Remap entire framebuffer after page initialization To: Arvind Sankar Cc: Ard Biesheuvel , linux-efi , Ingo Molnar , Thomas Gleixner , Linux Kernel Mailing List , Andy Shevchenko , Bhupesh Sharma , Masayoshi Mizuma Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 9 Dec 2019 at 20:12, Arvind Sankar wrote: > > On Fri, Dec 06, 2019 at 04:55:42PM +0000, Ard Biesheuvel wrote: > > From: Andy Shevchenko > > > > When commit 69c1f396f25b > > > > "efi/x86: Convert x86 EFI earlyprintk into generic earlycon implementation" > > > > moved the x86 specific EFI earlyprintk implementation to a shared location, > > it also tweaked the behaviour. In particular, it dropped a trick with full > > framebuffer remapping after page initialization, leading to two regressions: > > 1) very slow scrolling after page initialization, > > 2) kernel hang when the 'keep_bootcon' command line argument is passed. > > > > Putting the tweak back fixes #2 and mitigates #1, i.e., it limits the slow > > behavior to the early boot stages, presumably due to eliminating heavy > > map()/unmap() operations per each pixel line on the screen. > > > > Could the efi earlycon have an interaction with PCI resource allocation, > similar to what commit dcf8f5ce3165 ("drivers/fbdev/efifb: Allow BAR to > be moved instead of claiming it") fixed for efifb? Yes. If the BAR gets moved, things will break. This is mostly an issue for the keep_bootcon case, but that is documented as being a debug feature specifically for addressing console initialization related issues. Earlycon itself is also a debug feature, so if you hit the BAR reallocation issue, you're simply out of luck. Note that this happens rarely in practice, only on non-x86 systems where the firmware and the kernel have very different policies regarding BAR allocation, and on DT based systems, you can force the OS to honour the existing allocation by using linux,pci-probe-only