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=-9.2 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 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 23D39C432BE for ; Thu, 26 Aug 2021 07:05:59 +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 DABE96056B for ; Thu, 26 Aug 2021 07:05:57 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org DABE96056B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmx.de 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 431F782BB2; Thu, 26 Aug 2021 09:05:55 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=gmx.de 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; secure) header.d=gmx.net header.i=@gmx.net header.b="S2jxhQGM"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 6799982BC7; Thu, 26 Aug 2021 09:05:52 +0200 (CEST) Received: from mout.gmx.net (mout.gmx.net [212.227.15.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id D248982A01 for ; Thu, 26 Aug 2021 09:05:48 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=xypron.glpk@gmx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1629961548; bh=Qwf7S7Wcp7Bl+iIGpDXRqxkzjmB97evTJec5EFiSSVA=; h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To; b=S2jxhQGMF0jXDdv+iUXTjU0EelTKI5ba5Sl1NW1em4WE89/Y06Vp9x4JI8KaMq3sF YQDz+BeR/rcWgHflbL5ZEc7r6RPlW8/gUErrIlkS4HIqU50IFExVCLygvbMbk+zm33 W2e/22ZLfCHVctuimmeuQlMt0xAwHNCiYS7EgU6M= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [192.168.123.35] ([88.152.144.157]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MMXUD-1mYtI43eFT-00JeQn; Thu, 26 Aug 2021 09:05:47 +0200 Subject: Re: Usage of device-tree for blobs To: Simon Glass Cc: Ilias Apalodimas , U-Boot Mailing List References: From: Heinrich Schuchardt Message-ID: <344db9d3-38fc-2ef4-beaf-cc3b40f613fa@gmx.de> Date: Thu, 26 Aug 2021 09:05:42 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:JWGqU4n4I1Y3cUzKpSFB784bC8rSQ1aC0YCS6JOxrosYyI9GrJ1 c8gAoiXg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YVOdC3c/AGCOwAFZFe3exAHEjH4p+cCvT lRbj4CXg0MKvKluhtiki2xmt/RYaCOilGv3i6LWDEZonkgkQBWuWiWYaLcLlssQVC4uaAT1uz nnR6uwWegoxtKr4Y+tTigAwO7pXKnfHCRQDoLPeWewXeo9Pn1PQOkXdtXVU8Swk6jTckmMLIB 9U7sQU8nS4zYoxBnKlCJ+xfJq58L9J8cmyGHUvdzgmIFywnI9Okq9uXrDw4GeSvvMLLms+boW 21bhqNU7qZm8ehhuvTOu4VYCMLsJ44u8hcceVdaJsAuKQHq8iZ57FPgZg== 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 On 8/26/21 5:15 AM, Simon Glass wrote: > Hi Heinrich, > > On Wed, 25 Aug 2021 at 02:05, Heinrich Schuchardt w= rote: >> >> Hello Simon, >> >> some boards like qemu-riscv64_defconfig do not use any device-tree at >> build time. A device-tree is only supplied at runtime by the prior boot >> stage (CONFIG_OF_PRIOR_STAGE=3Dy). >> >> In doc/develop/devicetree/intro.rst you suggest to put binary blobs int= o >> the device-tree. >> >> Could you, please, update the documentation to explain how adding blobs >> to the device-tree works in the different scenarios depending on the >> values of: >> >> CONFIG_OF_EMBED >> CONFIG_OF_SEPARATE >> CONFIG_OF_BOARD >> CONFIG_OF_HOSTFILE >> CONFIG_OF_PRIOR_STAGE >> >> It would be especially important to understand how one can develop a >> board independent feature which works for all of these settings. > > OK I will take a crack at this tomorrow. > > But I think there is a disconnect here, since the only options that > matter within U-Boot are OF_SEPARATE and OF_HOSTFILE, which both use a > u-boot.dtb file. There is nothing tricky here. The following boards use OF_PRIO_STAGE: * QEMU * bcm7260_defconfig * bcm7445_defconfig * ae350_rv32_defconfig * ae350_rv32_spl_defconfig * ae350_rv64_defconfig * ae350_rv64_spl_defconfig > > The OF_BOARD business is for when the board does special things. > Presumably signing will do special things too. We cannot really know > what those things are because the board as 'opted out' of the standard > options. > >> >> Please, describe CONFIG_OF_PRIOR_STAGE in >> doc/develop/devicetree/control.rst. > > So I'm not allowed to delete that option? :-) No. > It seems to me to be > extremely sparse on documentation. We need an explanation of what it > means and what effect it has on the build system, U-Boot and some > discussion of how qemu works. It seems to have been added as part of > an unrelated broadcom commit. The tags were incorrect so I doubt > anyone noticed it. Since then it has apparently proved useful > elsewhere, but no one has added more docs. > > So perhaps you can help me with my doc by explaining how > OF_PRIOR_STAGE works in qmeu, why the DT in U-Boot cannot be used, and > which project actually hosts the DT that qemu provides? Armed with > that information, I might be able to make sense of it all. The DT provided by QEMU is not hosted anywhere. It is generated on the fly by QEMU in dependence of the command line arguments that are used for calling QEMU. The project is hosted at https://github.com/qemu/qemu. On RISC-V the address of the device-tree of the prior bootstage is provided in register t0. On ARM platforms QEMU places the device-tree at 0x40000000. QEMU is not the only platform where the prior boot stage supplies the device-tree which is to be used for booting the operating system. Any platform using TF-A or OpenSBI can be setup in this way. Generally it would be preferable that the prior boot stage provides the device-tree. But unfortunately Linux is not always backwards compatible. Don't expect the device-tree of the prior stage to contain any U-Boot specific quirks. Best regards Heinrich