From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CFF3DC433F5 for ; Sat, 18 Sep 2021 09:28:02 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 16AB761108 for ; Sat, 18 Sep 2021 09:28:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 16AB761108 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id DE0BC82849; Sat, 18 Sep 2021 11:27:59 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="P2R9WN5y"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id BA36B829FC; Sat, 18 Sep 2021 11:27:57 +0200 (CEST) Received: from mail-vk1-xa36.google.com (mail-vk1-xa36.google.com [IPv6:2607:f8b0:4864:20::a36]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 7D0E780202 for ; Sat, 18 Sep 2021 11:27:53 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@google.com Received: by mail-vk1-xa36.google.com with SMTP id 3so4650127vkg.7 for ; Sat, 18 Sep 2021 02:27:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ErKUixjFultrFu2duMATgjwjnbNxEZzccCW6BgncrEE=; b=P2R9WN5yposNXsclm1mpE6ZihV62BRKmK/qpmW1h8MrfdO1K/tytLF/WQR0ymbQJ8q 2GFS2Mh+a/YG5h7t0noXop9E63UmbywwxhH1XTGuqEte/SBvlPTOZmO1nBa3xs9pi6Aa g6D9IL9d6oQ8T3mRMlg/FMQq5JCx3QiSBHbPQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ErKUixjFultrFu2duMATgjwjnbNxEZzccCW6BgncrEE=; b=TitSCy433Mc0gAqIxlfCeeOHxs/6KIkazJmQG3z4Vv+D4mZjYvVBUw1OwvI6pX3y7X moApOHA8JlPaFchS9DU2EJP6cGkTOTjm/sa23R5FNqm5Vd8/rHc9Ej9c1ASuVGLiwacm pScleDzoSh+0Vn0wH+YoN1h0ne6Q8kpLMgaGyBdajSVchRWRd0XPYilQgNg/jPQRchNN LOTzurhLHB2Se7UEn3d1y3f7m7om+h2NyJ1Dbd2JYyoZ91BTY2MDsOJ5sU5lxmaXKzbG 0z9OKLP+/FZjVEEWkdnqj3aHs+Y40dxSiB9TRvi4LON3vY8Z74FfGi1PjaoSKkJGKcwt SRgA== X-Gm-Message-State: AOAM532+dy9+wFyzfK2c/dlKVb3nvro5jwuTXRx58nKkdAMyH97XPhGV C+b+tpxAPh4//CQXZlyt9WuvHe+BbWAxDBeEPxVhDg== X-Google-Smtp-Source: ABdhPJzPntBK40JofnGYEnttV9danJRuTM54ck3UES6Tf80S98tlGJlSX1Q3XhBQ8DM1xuz5W1afCxlxxYkEdJ0JTMk= X-Received: by 2002:a1f:2952:: with SMTP id p79mr10806917vkp.11.1631957271907; Sat, 18 Sep 2021 02:27:51 -0700 (PDT) MIME-Version: 1.0 References: <561452b36639d218@bloch.sibelius.xs4all.nl> <56145f817ba7aedc@bloch.sibelius.xs4all.nl> <20210915133547.GV12964@bill-the-cat> <20210917174250.GB8971@bill-the-cat> In-Reply-To: <20210917174250.GB8971@bill-the-cat> From: Simon Glass Date: Sat, 18 Sep 2021 03:27:40 -0600 Message-ID: Subject: Re: Problem with U-boot | Configuration Signature not being checked while booting To: Tom Rini Cc: Mark Kettenis , Moiz Imtiaz , U-Boot Mailing List , Moiz Imtiaz Khan , Jehannaz Khan Content-Type: text/plain; charset="UTF-8" X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean Hi Tom, On Fri, 17 Sept 2021 at 11:42, Tom Rini wrote: > > On Fri, Sep 17, 2021 at 10:21:15AM -0600, Simon Glass wrote: > > Hi Tom, > > > > On Wed, 15 Sept 2021 at 07:35, Tom Rini wrote: > > > > > > On Wed, Sep 15, 2021 at 01:51:51PM +0200, Mark Kettenis wrote: > > > > > From: Simon Glass > > > > > Date: Wed, 15 Sep 2021 04:13:24 -0600 > > > > > > > > Hi Simon, > > > > > > > > > Hi Mark, > > > > > > > > > > On Sat, 11 Sept 2021 at 13:18, Mark Kettenis wrote: > > > > > > > > > > > > > From: Moiz Imtiaz > > > > > > > Date: Sat, 11 Sep 2021 23:19:05 +0500 > > > > > > > > > > > > > > Hi Simon, > > > > > > > > > > > > > > Thanks for the reply. I already followed the steps mentioned in > > > > > > > "doc/uImage.FIT/beaglebone_vboot.txt". > > > > > > > > > > > > > > >I wonder if rpi is not using the devicetree compiled with U-Boot, but > > > > > > > instead one provided by the earlier-stage firmware? > > > > > > > > > > > > > > Not sure, but seems like this is the case. I checked and there isn't any > > > > > > > dtb or dts for rpi4 (bcm2711-rpi-4-b) in arc/arm/dts in u-boot. I tried to > > > > > > > add the dtb and other dts dtsi > > > > > > > files > > > > > > > from the raspberry pi Linux and compile them with CONFIG_OF_SEPARATE and > > > > > > > CONFIG_OF_EMBED (one at a time) *but it couldn't even boot the U-Boot and > > > > > > > it would just give a blank screen*. I wonder why there isn't any device > > > > > > > tree in the U-boot repo for RPI4. Is U-boot control FDT not supported by > > > > > > > RPI4? > > > > > > > > > > > > The issue with the rpi4 is that the addresses of devices move around > > > > > > based on the version of the Raspberry Pi firmware you're using. And > > > > > > possibly on the amount of memory on the board as well. So U-Boot > > > > > > pretty much has to use the device tree passed by the firmware since > > > > > > the device tree in the U-Boot tree would be wrong for many > > > > > > combinations of firmware and hardware. > > > > > > > > > > > > Simon, this sort of thing is exactly the reason why I think the idea > > > > > > of having all U-Boot configuration information in a single device tree > > > > > > with the hardware description doesn't work everywhere. > > > > > > > > > > >From my reading of this thread, it rather reinforces the need to > > > > > provide a way to give U-Boot the config it needs, in the devicetree. > > > > > > > > As long as that configuration is optional, yes, maybe. > > > > > > Lets be a little careful. We don't want to have two ways to provide the > > > information for a given feature. But some configuration properties are > > > certainly optional. > > > > > > > > It seems that rpi is actually OK in this regard. If you think about > > > > > it, it would be pretty hopeless if first-stage firmware assumed that > > > > > it could provide a devicetree to whatever is next. > > > > > > > > Not hopeless. If that device tree provides a hardware description > > > > that is complete enough to boot Linux, it should be good enough to run > > > > U-Boot. > > > > > > And keep in mind that one of those long stated goals is that the device > > > tree for a platform lives physically on the platform and doesn't require > > > being replaced entirely at run-time with a new/different device tree. > > > > > > > And yes, the Raspberry Pi has a nice way to load overlays to do > > > > additional hardware configuration and support add-on hardware that > > > > connects to the GPIO header on the Pi. Replicating all this in U-Boot > > > > would make very little sense. > > > > > > Note that in U-Boot we do have functionality to figure out and apply DT > > > overlays for a platform, and it's generic enough that platforms can > > > plugin their logic to detect what overlays are appropriate. This is > > > under CMD_EXTENSION. It's not appropriate for Pi as they did all of > > > this in their in-house firmware instead of using U-Boot. > > > > > > > > For example, if U-Boot evolves to support more devices, they could > > > > > not be supported. > > > > > > > > Unless the device in question has a mechanism to load device tree > > > > overlays like the Pi, this would require a firmware update. > > > > > > In that CMD_EXTENSION is about updating the tree for the next stage, and > > > not ourself, yes. But this is also the same problem that OSes have that > > > lead to overlays, at least in part. But also why it's so hard to > > > support a static device tree on hardware, and have an evolving kernel. > > > I'm not sure there's many / any good examples of wholly static and also > > > feature complete device trees and OSes today, on a recent / semi-recent > > > piece of hardware. > > > > > > > In practice, the device tree provided by the firmware will have more > > > > stuff than U-Boot will ever need though. Unless you're advocating > > > > that U-Boot evolves into a full-fledged OS ;). > > > > > > > > > If UEFI is used, the devicetree would have no effect, since it doesn't > > > > > support devicetree. > > > > > > > > That is not true. UEFI supports device trees just fine. All the > > > > arm64 and riscv64 boards supported by U-Boot that include EFI_LOADER > > > > support use device trees. The idea that UEFI implies ACPI is a > > > > misconception. > > > > > > > > > So perhaps the only remaining issue is with qemu on ARM / Risc-V? > > > > > > > > Maybe somebody can add device tree overlay support to QEMU? > > > > > > Having gone through this thread, I wonder if U-Boot generating a device > > > tree overlay (and also the keeping the source of it, before > > > preprocessing if we can) isn't part of the solution here. Heinrich had > > > suggested in another thread, and Simon had strongly disagreed with > > > overlays being how we perhaps solve some portions of the overall "what > > > should U-Boot require of the DT?" problem. I'm thinking that might be > > > the right answer, in some cases. > > > > Note that my objection here is adding runtime to U-Boot. If the prior > > stage wants to arrange things that way, it seems OK to me. In > > particular for QEMU arm, we could add a -dtsi arg to provide a U-Boot > > tree to merge with what it generates. > > Right. I am talking about U-Boot applying an overlay to a provided by > prior stage device tree. In the above example of Pi, the prior stage > has an option already to apply an overlay before-hand, yes. But that's > not going to be the case for all platforms. There is no need for the prior stage to apply an overlay though. It just needs to provide the correct devicetree with the U-Boot properties. I'm going to send a binding for the config node upstream and see what happens. Regards, Simon