From patchwork Tue Jan 29 09:21:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 156948 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp4428611jaa; Tue, 29 Jan 2019 01:22:01 -0800 (PST) X-Google-Smtp-Source: ALg8bN7B+rVwZk+BAj9YSIja72P/kk/PlIHnBNNfh0f2pRpU1A0pL0fIch/VVqben8otjHDE8vaX X-Received: by 2002:a62:8e19:: with SMTP id k25mr25340137pfe.185.1548753721488; Tue, 29 Jan 2019 01:22:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548753721; cv=none; d=google.com; s=arc-20160816; b=CamX6ilwCuJLSCWoWayVWptxvlJd/W6x1KzlSq7GCJuRkVtejqT2hOb4r1RxVMJieX ejLkrRHuYnQvaEm1W1LLBWSAVNbSZu7/Vet27+duXAe4qQA96M4NnND21oGuQDaf20e0 l73IL6Fn+75kpwAd2MIB8aB+ymAl1DRMnbVLewvoHq/eoH57FvzrGbN0Op5ljSBPuDvI 4HictK+KprmZFB4QsDS3yCBG/ggKjtSC1aPLApIsJ3s0atQ1W2EFN8HUQDaxeYb6mFrx F/ckUXQDqydHCkbC5w0yUQXqzi2nd1F25qRoGzwn1j/k26efQtFdG7denene7KegmWGf NX9w== 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=gn1pq3MddwvZOGlLmqAWA3iRRxW5w+1ECcW/4OIbJJ0=; b=vNxRfCRKceN8cKW9hA3viklgwJFRwj/NmXZo2unbHm+h4H2lZbfrAyoVoyMiyDWXhL nJyjupmEjAyzkV1Jf5OKgEGA8AR6kO+rTK8VRRz7zAp/0Y11LzD5fV79AOh2/DBouq1T b5LpJBVpDchaaoAQ2IuWTlsucytBjvp9xY5FFSb+cY/Gfve8eUCW+IdROvLigPhvEOz1 ZI0DPkjH9lwOMg5m/pikHQbn9dwR2gShXIgxdlCzP06W3+UzpMUg+Lr2DBGpFW8ol0v4 DE4OrAZC22mNY+DvDYDiOJb0lT9UJWgeEocyLS5pul/weg2vXUUgnM98MpjIotKX/i65 OKYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=TALLQTS0; 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 q70si36106014pgq.526.2019.01.29.01.22.01; Tue, 29 Jan 2019 01:22:01 -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=TALLQTS0; 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 S1726190AbfA2JWB (ORCPT + 3 others); Tue, 29 Jan 2019 04:22:01 -0500 Received: from mail-wr1-f67.google.com ([209.85.221.67]:38804 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725810AbfA2JWA (ORCPT ); Tue, 29 Jan 2019 04:22:00 -0500 Received: by mail-wr1-f67.google.com with SMTP id v13so21126643wrw.5 for ; Tue, 29 Jan 2019 01:21:59 -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=gn1pq3MddwvZOGlLmqAWA3iRRxW5w+1ECcW/4OIbJJ0=; b=TALLQTS0dcy3jFNV2ZCt7j8qMMbBNnVdUqdBFwNeL/GaNVzhdT/YlTGtTB9Xx5E1yH fZzZh8oYJBIvgkRqnjmaBFIX655AeqWohRevFTyRIGX1hAsmekf8kiDyizrZEz4mltYY THBNLOrHfPMF/nY0GT3BXMslUzQrSvZke7JEI= 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=gn1pq3MddwvZOGlLmqAWA3iRRxW5w+1ECcW/4OIbJJ0=; b=LL7+PdAbB10VoAY/V+sWDIwD2TAaXDhMpU5w/kJ3oaWxMK+iNm3YFt6Nr1W9EzqqWP we7yTXb3+jUuSk1Nrlk+fNnL5JYgHqluLSaa2GQyQpmcgvd+U+LxUdDslxCoU0e5BHOo FhqsmAN6d8O0CVKWr3bU+Cl5UR93tF6oKhZsGKYVBU8SvYjnPwl56vhG/CY4zfuJy5pJ P3m7q24BxrAtuTpbMzfKo2HozjaZFXcURHs2sWHoaxuUH3vkNy8Pw3usQnKL1OEsBggI Q+onXGg5s/h/GwsBWYd9ZqAzKdD4phGx6ctqOKab67sOXWjIpaEoPJmBP23i2a4AMPyt RG1g== X-Gm-Message-State: AHQUAuZhAP9Z6rDdDJmqw6vjCvCNF58g3wjrM5ar78ebcpI0QK9fRGwJ dXF/F3fFDRWQEKp/k64vhmRSk95prEs= X-Received: by 2002:adf:a58a:: with SMTP id g10mr3720338wrc.3.1548753718601; Tue, 29 Jan 2019 01:21:58 -0800 (PST) Received: from sudo.home ([2a01:cb1d:112:6f00:61d3:a2fc:db63:aa38]) by smtp.gmail.com with ESMTPSA id x1sm28751755wru.34.2019.01.29.01.21.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 29 Jan 2019 01:21:57 -0800 (PST) From: Ard Biesheuvel To: linux-efi@vger.kernel.org Cc: Ard Biesheuvel , corbet@lwn.net, leif.lindholm@linaro.org, graeme.gregory@linaro.org, mingo@redhat.com, tglx@linutronix.de, linux-doc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, agraf@suse.de, pjones@redhat.com Subject: [PATCH v2 0/2] efi: arm: add support for earlycon on EFI framebuffer Date: Tue, 29 Jan 2019 10:21:48 +0100 Message-Id: <20190129092150.15184-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 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. 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/platform/efi/Makefile | 1 - arch/x86/platform/efi/early_printk.c | 240 -------------------- drivers/firmware/efi/Kconfig | 6 + drivers/firmware/efi/Makefile | 1 + drivers/firmware/efi/earlycon.c | 208 +++++++++++++++++ 11 files changed, 226 insertions(+), 261 deletions(-) delete mode 100644 arch/x86/platform/efi/early_printk.c create mode 100644 drivers/firmware/efi/earlycon.c -- 2.20.1