From patchwork Thu Jan 31 11:51:43 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 157138 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp7111336jaa; Thu, 31 Jan 2019 03:51:53 -0800 (PST) X-Google-Smtp-Source: ALg8bN7zqYOIEEXKFOL5WcehpqLCq7Q6Y0DY8BxAgqaTiZ/D9Y+GtYdK62g7hAcnQvbg9yAJH/I8 X-Received: by 2002:a63:9712:: with SMTP id n18mr30751723pge.295.1548935513564; Thu, 31 Jan 2019 03:51:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548935513; cv=none; d=google.com; s=arc-20160816; b=Eb9zl0fK3uDdS2GwLOCuYPOoZ58aPXxR8es9ItmbnMSFrfBCB4V7cnj5Gvs2q52zJC knwD2exQFBW7QBeZR/nh0sKLZK4jKNqz7XABbh+9JoCurSxFF42MZYSQo+n+P94hA1gE avxLMmXKWN0XQzCC+louEdPXiNqaZt038quykT7dYdZVDdswbXm0R/foe6epmf4ItLDS mGYG/DPT4qYajhWdld6LNvKPbb1dN0Tjnyl94FHyE8cvr2JbRCElgsZrAExqLXiVPhVs Wt2DY5WoXZ3B1BhzCc2ZaJuAsbkFA8FE0hQCX1B4rYYZDd13pp/7uzsUUT3dlGwQnXLv DzQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=0enek0A8jDFsVAl11N/G0bNAcwpoDOHHfp9X7OErNIc=; b=FEqZmezTiFo0pqoB/bTmbGcy5VJWfJ3xZXcys81Ta0qFucjeXhJQWjogsorLr3nqHY VQCF6qgsooqpU8qHd9sBrTFbKaevJ557/M2qiq50TbdpmMLWlfywPLmnv9/snqbO1VhB seSA572O+q4dveoFVTxbhdb6AKXIo4z3fnwLocKwaITKfcH6NvQrcB35R0XXhHyayMnv 8gmY21BJW50sqKyuOxiVACyrOuCThrdtfmURKdMwAPHQa9nCNFL0bNmkt+YH+BuqCOy4 I5Ib3L169SffI5r5yGaRQcTW250r1uQCS/23GdcPvCFe9j5g5CDa+r+Pdv6+ogibFIe+ oDjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=UiAKLLJp; spf=pass (google.com: best guess record for domain of linux-efi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-efi-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 z67si4322247pfb.268.2019.01.31.03.51.53; Thu, 31 Jan 2019 03:51:53 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-efi-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=UiAKLLJp; spf=pass (google.com: best guess record for domain of linux-efi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-efi-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 S1727158AbfAaLvx (ORCPT + 3 others); Thu, 31 Jan 2019 06:51:53 -0500 Received: from mail-wr1-f66.google.com ([209.85.221.66]:35590 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727189AbfAaLvw (ORCPT ); Thu, 31 Jan 2019 06:51:52 -0500 Received: by mail-wr1-f66.google.com with SMTP id 96so2985497wrb.2 for ; Thu, 31 Jan 2019 03:51:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=0enek0A8jDFsVAl11N/G0bNAcwpoDOHHfp9X7OErNIc=; b=UiAKLLJpMbaRW1WPDY7uU1MbIdFjJD642saDeJRF3+5ZBZjcCnMPkTh4kO9bpa7aFA ldUR4G771E1tbyWClkLhgjx50tZ7uBnLhe5ivTL6ZRyFBR/RTaPfL3Hg71ihd2x/hyIP M4oqCcbKyyuSET0lPnb21lxSkHf8GVoQqIlx0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=0enek0A8jDFsVAl11N/G0bNAcwpoDOHHfp9X7OErNIc=; b=a4+4uvAQhlVH51+eOB4MI9eM0W345w80gdddnnRxsNRlY0V0dY1R1zYTg2Efh9PKR6 XZEAEQaWpTq7DiYxQotFgUYtUuvc6eRg1fmzUda/mIWILsBh/YsrhDRrbyBrZ7Szwhuh Fta1CPWVZbJG2mrWKIVWkNEXe3Ce0liEPEGozWcBn7QJ3n/HVs7g5dW61I51miWYt849 mwLz459OJ5g5KT6e8i+ZptD6wwhpVB5olZjtgKpcw12IZMGRFiQIzaCfRrYkLIJWQ1q7 3GadNPjxxDIe6KTFzvfOVG0eTVnyMZO5hmgKO9OSk4DvdfEtd0mhMi6mMbgvgLIhKbV4 DVqw== X-Gm-Message-State: AJcUukdqVkLO0bvSpFKU+TSDrjBLWbN38ObhiNRwK/B15EncbKaWmomf bdQlr3fCCqJhtS23orXPaWaRcON2COk= X-Received: by 2002:adf:fd50:: with SMTP id h16mr36589622wrs.231.1548935510469; Thu, 31 Jan 2019 03:51:50 -0800 (PST) Received: from localhost.localdomain (aputeaux-684-1-39-7.w90-86.abo.wanadoo.fr. [90.86.94.7]) by smtp.gmail.com with ESMTPSA id w10sm5807714wmb.1.2019.01.31.03.51.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 31 Jan 2019 03:51:49 -0800 (PST) From: Ard Biesheuvel To: linux-efi@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, x86@kernel.org, Ard Biesheuvel , corbet@lwn.net, leif.lindholm@linaro.org, graeme.gregory@linaro.org, mingo@redhat.com, tglx@linutronix.de, linux-doc@vger.kernel.org, agraf@suse.de, pjones@redhat.com Subject: [PATCH v3 0/2] efi: arm: add support for earlycon on EFI framebuffer Date: Thu, 31 Jan 2019 12:51:43 +0100 Message-Id: <20190131115145.4634-1-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Sender: linux-efi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-efi@vger.kernel.org Repurpose the existing EFI earlyprintk code to implement support for 'earlycon=efi' for arm64 systems, allowing the graphical console to be used instead of the serial port for early debug output. Changes since v2: - update patch #1 so that no attempts are made to build the memencrypt related early memremap routines for 32-bit x86 - update patch #2 so earlycon=efifb is not enabled on Itanium Changes since v1: - Rename earlycon= argument to 'efifb' to emphasize that this is specific to the EFI framebuffer. - Replace earlyprintk=efi entirely, rather than keep it alongside earlycon. Since earlycon is typically enabled (along with the infrastructure), and earlyprintk isn't, this does not result in a lot more code to be included, but does make it more likely that a given [distro] kernel has support for this enabled out of the box. - Switch to write-combine mappings by default. This is the default for efifb, and is actually required on arm64, since device attributes do not tolerate unaligned accesses or other operations (such as DC ZVA) that rely on memory semantics. This requires ARCH_USE_MEMREMAP_PROT to be wired up, which is why a new patch #1 has been added. - Since adding the 'ram' parameter for framebuffers in shared memory on cache coherent devices is trivial after the switch to WC mappings, fold the change into the main patch. If there are no objections, I will proceed to queue these in efi/next for v5.1 Cc: corbet@lwn.net Cc: leif.lindholm@linaro.org Cc: graeme.gregory@linaro.org Cc: mingo@redhat.com Cc: tglx@linutronix.de Cc: linux-doc@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: agraf@suse.de Cc: pjones@redhat.com Ard Biesheuvel (2): x86: make ARCH_USE_MEMREMAP_PROT a generic Kconfig symbol efi: x86: convert x86 EFI earlyprintk into generic earlycon implementation Documentation/admin-guide/kernel-parameters.txt | 8 +- arch/Kconfig | 3 + arch/x86/Kconfig | 5 +- arch/x86/Kconfig.debug | 10 -- arch/x86/include/asm/efi.h | 1 - arch/x86/kernel/early_printk.c | 4 - arch/x86/mm/ioremap.c | 4 +- arch/x86/platform/efi/Makefile | 1 - drivers/firmware/efi/Kconfig | 6 + drivers/firmware/efi/Makefile | 1 + arch/x86/platform/efi/early_printk.c => drivers/firmware/efi/earlycon.c | 130 ++++++++------------ 11 files changed, 69 insertions(+), 104 deletions(-) rename arch/x86/platform/efi/early_printk.c => drivers/firmware/efi/earlycon.c (45%) -- 2.20.1