Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp7911139rwl; Tue, 10 Jan 2023 06:56:46 -0800 (PST) X-Google-Smtp-Source: AMrXdXsJIHeDYc9TPQQrztXaWBIVGdLhL25SI2FoiSKX6ldsG4fu1Rps8PfVcEO0UhKnyYfBnc/E X-Received: by 2002:a05:6a00:1a45:b0:582:294d:f465 with SMTP id h5-20020a056a001a4500b00582294df465mr39085052pfv.13.1673362606394; Tue, 10 Jan 2023 06:56:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673362606; cv=none; d=google.com; s=arc-20160816; b=Wj0DIsJGyxBe06Sx/RhW02lEMJTq0EAKjXjecyf/X17RxFIAaK6AHO3S/HNJjN9ieG b4WSxrQE85mCvQBZfaqvAxuthX5jmfYKESz0nArkmdxAnYXzuAX/+DEI++xCCl3KLobh cOm30ZBwUBgQOJSTs/Enq56wnXdZA3oHvawOpVQ48nM+xbc6enJebNyo6+bOIy0IiCaI vFcMvFUvE1EXrRrSnv+TdJY1jFmCbIDYS3U1Ws6XGIdXyeFxBPtxDxlZTWahDHRA6z78 jVdtAEorPF/uD463wEEfhYLUeXQWT9OE2UqkUWP0x86GOIphRZ9v3peEmkzXnPsXjv+6 A6XA== 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=0U45HmZgegjPkMDOmrkm9NMlqi4zLwodMY8zNt/kRWI=; b=t0SSQwpectuwvWkunEqDXR4vQ4HvEi2j1IvawWgjCSO1FSl8TlvYRcb9WY30EXE9O7 hLv3Cv7s+mtd3kFNzwbosqTDtoGfsG6s5QS4K8vdjPcRPnxOel2PRqUXXMKbWiwOxIQI CljcNaZSCbfxovhPkmLBTTcfB7LYGmaxs85DVdsmYw1jHgEPXRyrk8+FgBuVcxx/LMfM 8lujs8Wzhbx+YnpD4118VTu4JZNNXS07pt7WZLHijG+cqmdX9Wwfc42532Eo1vxKtBIc eJNxQjrr9ffJ3en7oCMHkWWdqYriYnwIhzSWZBcLjW9nLgDBM+HbOXz1XR7irR1mrUvK IHPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=dfkXfpnX; 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 u15-20020a056a00098f00b00572d26386b5si13548347pfg.146.2023.01.10.06.56.39; Tue, 10 Jan 2023 06:56:46 -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=dfkXfpnX; 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 S238601AbjAJOd0 (ORCPT + 55 others); Tue, 10 Jan 2023 09:33:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49612 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238534AbjAJOc4 (ORCPT ); Tue, 10 Jan 2023 09:32:56 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EF451392DB; Tue, 10 Jan 2023 06:32:55 -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 8B7166173E; Tue, 10 Jan 2023 14:32:55 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F25F9C4339B; Tue, 10 Jan 2023 14:32:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1673361175; bh=0U45HmZgegjPkMDOmrkm9NMlqi4zLwodMY8zNt/kRWI=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=dfkXfpnXa63c3D8jyq0ORhwvSloUoK8fCFgqaZvZ+wRd3qSdNsCh6m8XRWaEkXxZX AsATo/OHKnIGbYKcP3wG+JIioJsbQ4dh4yuiNXo1ca/Wq/XX52ni59C1dBRQqEyF+W wIgoU4t89Sf2ykDuy7/Ng4J79qKpkLlzJkNUXiEqqmuJSHolUCOQyqKk+WSjcKQDGa w8PTaX4rEt1lcI/fjvFrqGC6dA8gq5q9IZhVfnYsEhQLjaM1lEBaF0OPyCskHASvwp 7RAcFb4OqtdS4oXS9AvPrtplbOPTPlg+2Q4HRRoYttbrsuTCpzEClNUqqKg3hBNtSe NyY1JcIBXavSA== Received: by mail-lf1-f48.google.com with SMTP id bt23so18687262lfb.5; Tue, 10 Jan 2023 06:32:54 -0800 (PST) X-Gm-Message-State: AFqh2kokfitk29qHGRfAy8UFxqXX9YluPhlf37OY7CmEfepqHlpWQdoz p/BG1zT1OpgSxQdk9V+dT87HD3snPOWUCY6fZ+U= X-Received: by 2002:ac2:4a72:0:b0:4b6:f37c:c123 with SMTP id q18-20020ac24a72000000b004b6f37cc123mr4822738lfp.539.1673361172997; Tue, 10 Jan 2023 06:32:52 -0800 (PST) MIME-Version: 1.0 References: <20221221105402.6598-1-markuss.broks@gmail.com> <97639381-2558-4cf5-75b0-7f80f0393b16@gmail.com> In-Reply-To: <97639381-2558-4cf5-75b0-7f80f0393b16@gmail.com> From: Ard Biesheuvel Date: Tue, 10 Jan 2023 15:32:41 +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 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 On Fri, 23 Dec 2022 at 15:58, Markuss Broks wrote: > > Hi Ard, > > On 12/23/22 16:42, Ard Biesheuvel wrote: > > (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. > > I believe I must be hitting some other bug then, since my driver should > not use `struct screen_info` when the arguments are specified manually > (e.g. in device-tree or in kernel command line options), and it still is > broken on ARM when they are. Define 'broken' > I got it to work on ARM when I moved the > early console initialization later into the kernel booting process, but > that mostly defeats the purpose of early console driver, I believe. I've > been thinking that it could be some stuff not getting initialized early > enough indeed, but I've got no clue what could it be. > This is likely due to the fact that the ARM init code sets up the PTE bits for various memory types, and using them beforehand is likely to result in problems.