Received: by 2002:a05:6358:bb9e:b0:b9:5105:a5b4 with SMTP id df30csp4655349rwb; Tue, 6 Sep 2022 10:28:41 -0700 (PDT) X-Google-Smtp-Source: AA6agR5FzL7SAN22LFLnyTNn7f4VQp2Bod/Awe1ovO+Py4JstaR/vXAisq75f4tLfgOvqIeodS8E X-Received: by 2002:a05:6a00:114c:b0:528:2c7a:630e with SMTP id b12-20020a056a00114c00b005282c7a630emr55754312pfm.86.1662485321533; Tue, 06 Sep 2022 10:28:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662485321; cv=none; d=google.com; s=arc-20160816; b=gqLCdU5wlIo9kERirjkwaTOUn1tZVL9Bj9gyC7LQ1C5yIy4qA56BqSN8pYsBowhFq0 mY3nGblD2ySsWy+rWmSHPS5+nApZ/B20AMdmXIs84IB6qcvbXGkQl1iYDiM3jU9ffMa+ mAT7uWDQCaKGJrPuDCyok1vA2bi2DL3EOZAcvwAKEh4xqFPsRwI+guh0RrM+iYa8IhgW +kRX3RyDupy8qd09Kd717NhJAtB0QIKldPZSjM7eNg6Cwa5edwKp+pAMWGeWPsSJ/47M DxWc2l+R45DMc+JKWkAU0yW5Vcj4k//zp9PeJgagBr6FRcHaTjxAtn1uB1z0e6udCHvw SxBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=+pKPspAVX1wmVgwP1msTiweJ3yRq2XGZebPGz6dFqMc=; b=bUGqXUc/g2v6ku4GkH7RUXK7mSh/imzr9Q0VDv5RPdU1QgtmIEkYox2Yy35P/AiGbr CoWJ+2dhzvyyFuTUc8lyc824+VqfPNuV0SN/wOfc3WDXLHIFGoq4OTAk2fPSsEJCMrBa /IsyS65lxLWajUwIXit6Dy+6Yx+b6ui4V+vEIlede+AGfuIjvcUpFUgSHUD5TK5Dl+96 C6NAbByw6oFqadDygeUhmTyxsXe/3/jFnwTR6sEMsnBQpQ2xUyRrs06SJfXr786nHyy7 857/dh0FscMfWuTFsqT9y2zq0ww4LCgQqeUNJckSo6sDM7CosZruflim0XaoouPVIpUp Nm1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=mSScNXV5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d1-20020a170903230100b00172f237cd04si2330959plh.108.2022.09.06.10.28.30; Tue, 06 Sep 2022 10:28:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=mSScNXV5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234681AbiIFRH3 (ORCPT + 99 others); Tue, 6 Sep 2022 13:07:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53078 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233777AbiIFRG4 (ORCPT ); Tue, 6 Sep 2022 13:06:56 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5C0E4186F7; Tue, 6 Sep 2022 09:54:40 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 25ECE615D3; Tue, 6 Sep 2022 16:54:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6C67EC43148; Tue, 6 Sep 2022 16:54:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1662483279; bh=dlrLPJ9VW2sLiclVTeLOaDTCcrNnK0V5SGX9NqEZ+bQ=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=mSScNXV5eNPo8Q03hxNBF1E7GxbLAdR4dQrRxWkLjglRTK1xh+T/4rqOjmigwjTY8 gqSPY7pxM2Ggi0f2szfwrD3iVoWzDhGiGopM1Z0DZ7FgzkuBRRMu/ufwHNQr3lGO7j /bkDMZKGzDzt/B1TAdERWfCMAbQS3UYGOsU/xKBZKEhubggqoxorkrPeHBQQKTlyPd npaAXKqlrsRd5G9PKa1D94x4RQ6LtShUNfs0BPs3MrpeW0KfYSXtMfF21voGUHmoTV bKiCT3FrX8wBWHqftjbcK61d54GS/r0D9M9Z3nC68WpMODqU0FdeTJ6FFOtAEjC9Ln IDwSJC/VY+Big== Received: by mail-lf1-f53.google.com with SMTP id bq23so18315491lfb.7; Tue, 06 Sep 2022 09:54:39 -0700 (PDT) X-Gm-Message-State: ACgBeo2h9Bjy83Bq1Js+bL7jx7EklI+g3ln/wafF3nQTFGWnb+vMEse0 6DomiANrPTYqE2KRWiAj2OB5aIptzKDCQiXg4OM= X-Received: by 2002:a05:6512:2294:b0:494:8dc5:10af with SMTP id f20-20020a056512229400b004948dc510afmr9295038lfu.426.1662483277282; Tue, 06 Sep 2022 09:54:37 -0700 (PDT) MIME-Version: 1.0 References: <20220806163255.10404-1-markuss.broks@gmail.com> In-Reply-To: <20220806163255.10404-1-markuss.broks@gmail.com> From: Ard Biesheuvel Date: Tue, 6 Sep 2022 18:54:26 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 0/3] Add generic framebuffer support to EFI earlycon driver To: Markuss Broks Cc: linux-kernel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, Jonathan Corbet , Greg Kroah-Hartman , Jiri Slaby , Helge Deller , "Paul E. McKenney" , Borislav Petkov , Kees Cook , Andrew Morton , Randy Dunlap , Damien Le Moal , Thomas Zimmermann , Michal Suchanek , Javier Martinez Canillas , Arnd Bergmann , Maarten Lankhorst , Wei Ming Chen , Bartlomiej Zolnierkiewicz , Tony Lindgren , linux-doc@vger.kernel.org, linux-efi@vger.kernel.org, linux-serial@vger.kernel.org, linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 6 Aug 2022 at 18:34, Markuss Broks wrote: > > Make the EFI earlycon driver be suitable for any linear framebuffers. > This should be helpful for early porting of boards with no other means of > output, like smartphones/tablets. There seems to be an issue with early_ioremap > function on ARM32, but I am unable to find the exact cause. It appears the mappings > returned by it are somehow incorrect, thus the driver is disabled on ARM. EFI early > console was disabled on IA64 previously because of missing early_memremap_prot, > and this is inherited to this driver. > > This patch also changes behavior on EFI systems, by selecting the mapping type > based on if the framebuffer region intersects with system RAM. If it does, it's > common sense that it should be in RAM as a whole, and so the system RAM mapping is > used. It was tested to be working on my PC (Intel Z490 platform), as well as several > ARM64 boards (Samsung Galaxy S9 (Exynos), iPad Air 2, Xiaomi Mi Pad 4, ...). > > Markuss Broks (2): > drivers: serial: earlycon: Pass device-tree node > efi: earlycon: Add support for generic framebuffers and move to fbdev > subsystem > > > v1 -> v2: > > - a new patch correcting serial/earlycon.c argument name to "offset" instead > of "node" > - move IA64 exclusion from EFI earlycon Kconfig to earlycon driver Kconfig > (IA64 has no early_memremap_prot) > - move driver from fbdev to console subsystem > - select EFI earlycon by default Wasn't EFI earlycon already enabled by default? > - fetch stride manually from device-tree, as on some devices it seems stride > doesn't match the horizontal resolution * bpp. > - use saner format (e.g. 1920x1080x32 instead of 1920,1080,32). > > .../admin-guide/kernel-parameters.txt | 12 +- > MAINTAINERS | 5 + > drivers/firmware/efi/Kconfig | 6 +- > drivers/firmware/efi/Makefile | 1 - > drivers/firmware/efi/earlycon.c | 246 -------------- > drivers/tty/serial/earlycon.c | 3 + > drivers/video/fbdev/Kconfig | 11 + > drivers/video/fbdev/Makefile | 1 + > drivers/video/fbdev/earlycon.c | 301 ++++++++++++++++++ > include/linux/serial_core.h | 1 + > 10 files changed, 331 insertions(+), 256 deletions(-) > delete mode 100644 drivers/firmware/efi/earlycon.c > create mode 100644 drivers/video/fbdev/earlycon.c > > -- > 2.37.0 >