Received: by 2002:a05:6358:f14:b0:e5:3b68:ec04 with SMTP id b20csp701250rwj; Fri, 23 Dec 2022 07:05:28 -0800 (PST) X-Google-Smtp-Source: AMrXdXvpiXFKwHOF5DnDjaCe3RA4A8ZXYJ9BHtd3w1HS6j8KcQLHLf37MJUhSFyBLyipBcuQ7H2k X-Received: by 2002:a17:907:d50e:b0:7c1:5982:d729 with SMTP id wb14-20020a170907d50e00b007c15982d729mr12304640ejc.56.1671807928208; Fri, 23 Dec 2022 07:05:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671807928; cv=none; d=google.com; s=arc-20160816; b=qASmgOt9xqbocCBiUb1yD3RjbnvQBWuB3u6zodfC6s+8H1g9Mam6NQFNeIbW9cpO+O CHq9Nqk8Gr+61v28NAN28KejNJZn35vEMSNQT3dac2aseuSsWPM2dSSBzqr7CtFv4oab 2E7L6PDLThCbzRtS7n/yJwFmY335ZRXoDQTUPxH3sQI/CsDpcBDOO0uTLIdK8xqpOqI6 JXiStGWVf1jDKKXLM6X1o76jJCvuk7nJ7Ux5SFs4xJn8kbTstMMAo0oxh6IXdkaDgb5g b0v7O+M3/FsGiWVc3Lnt/2XRncxoHt3vMpim9pbnLjzvSz+qiLMy9xI32AxAIPkMj57p tJRA== 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=JLvMvyVvtzbi9trs6Fd/XQd4KufLil7WZ6DQyoN6EaQ=; b=jaAXIG3Dh74rJLpvZuEmqZUw7FK3KbVl9F8Nu+ojuHRu5Phq4zG0oIn7Xwo62g+jKK VvTwQZH9+5fx3uS0ZjQJd18drVU4LPU0R5fdQuMH3CEOHqhfe6xTgXAF5s51dMQ3zde+ upfTPlkHN/0OoF9LQOJH36gyA48SCDdoAre/PPqElDvXRu8fRnBxUtUiLqEPI48WKV1u i+iYrCMaTjm0bmWWdgV2y335DmPXEn9eg3PFsShjvZkWdEqNq8zb9DJMK+cOY0Yk7Iuc qmn7kN/B07KCqQR57B6/uMMClrU5kWxhkABI5/WkSEgFsxqal8eOzeHbW2IBoRUN+eXw sEbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=olxxz20s; 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 sa17-20020a1709076d1100b0082cbe0c28dfsi2714589ejc.980.2022.12.23.07.05.12; Fri, 23 Dec 2022 07:05:28 -0800 (PST) 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=olxxz20s; 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 S236313AbiLWOmv (ORCPT + 65 others); Fri, 23 Dec 2022 09:42:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34728 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230157AbiLWOms (ORCPT ); Fri, 23 Dec 2022 09:42:48 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9B4AE40831; Fri, 23 Dec 2022 06:42:47 -0800 (PST) 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 26ABC61159; Fri, 23 Dec 2022 14:42:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 88D39C433A4; Fri, 23 Dec 2022 14:42:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1671806566; bh=5WSz7TH//n5BtaNgZRfsk+p6ujzCP/EjZAPHDEoOC98=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=olxxz20sE9VTDEToVcepShp6ZZa4Bp12yaWtO7oOBQta+a/sXX0eD23TtaEu706n7 dYllP031b6JfCc338/j7dE0aRJtMYFMF/Op/BWYY8WZWIEBVWdrJ7HzTVX9VasJsvc FIbWpnPNK0jmNoe230W4DUArvIoamRMJ6UTBnPmGxouLbp9VvM5uzgArb1twRsptbk 5FXgas+e0Pg/F1ZBUf9QUMamromNWImKk2vjlak7t2YQxzb3CMrVlNqxq94NAxHXg/ jwqxTlLhDxWKXzzZ8XjG2NQMdyte63X7IJl19pnT/P1llWf/iPkM9R/eE0CgUDTpiG 5v1zhFgOy0PVA== Received: by mail-lf1-f51.google.com with SMTP id b3so7355794lfv.2; Fri, 23 Dec 2022 06:42:46 -0800 (PST) X-Gm-Message-State: AFqh2krGy2jhKjbScvaXFIjc4iButlvppwu/Z5hP9yzq65966IgiXCWC ivBGd4I1EODyxXThdPoiRmj/HuuYBa6YAvsdE6E= X-Received: by 2002:a19:a411:0:b0:4b6:e28c:276d with SMTP id q17-20020a19a411000000b004b6e28c276dmr947831lfc.110.1671806564479; Fri, 23 Dec 2022 06:42:44 -0800 (PST) MIME-Version: 1.0 References: <20221221105402.6598-1-markuss.broks@gmail.com> In-Reply-To: <20221221105402.6598-1-markuss.broks@gmail.com> From: Ard Biesheuvel Date: Fri, 23 Dec 2022 15:42:33 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v3 0/3] Add generic framebuffer support to EFI earlycon driver To: Markuss Broks , Andy Shevchenko Cc: linux-kernel@vger.kernel.org, Jami Kettunen , Jonathan Corbet , Greg Kroah-Hartman , Jiri Slaby , Helge Deller , Borislav Petkov , "Paul E. McKenney" , Andrew Morton , Will Deacon , Randy Dunlap , Muchun Song , Damien Le Moal , Kim Phillips , 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 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 (cc Andy) On Wed, 21 Dec 2022 at 11:54, 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. The reason that this driver is disabled on ARM is because the struct screen_info is not populated early enough, as it is retrieved from a UEFI configuration table. early_ioremap() works fine on ARM as long as they mapping is torn down before paging_init() > 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 "This patch also changes ..." is usually a strong hint to self that the patches need to be split up. > 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 > - 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). > > > Markuss Broks (3): > drivers: serial: earlycon: Pass device-tree node > efi: earlycon: move to video/console to prepare for changes > efi: earlycon: Add support for generic framebuffers > > .../admin-guide/kernel-parameters.txt | 12 +- > MAINTAINERS | 5 + > drivers/firmware/efi/Kconfig | 7 +- > drivers/firmware/efi/Makefile | 1 - > drivers/firmware/efi/earlycon.c | 246 -------------- > drivers/tty/serial/earlycon.c | 3 + > drivers/video/console/Kconfig | 11 + > drivers/video/console/Makefile | 1 + > drivers/video/console/earlycon.c | 305 ++++++++++++++++++ > include/linux/serial_core.h | 1 + > 10 files changed, 336 insertions(+), 256 deletions(-) > delete mode 100644 drivers/firmware/efi/earlycon.c > create mode 100644 drivers/video/console/earlycon.c > > -- > 2.39.0 >