Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 520A7C433EF for ; Sun, 10 Jul 2022 11:02:38 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A79C8843A2; Sun, 10 Jul 2022 13:02:35 +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="XhEbdhK4"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 501CA844B4; Sun, 10 Jul 2022 13:02:33 +0200 (CEST) Received: from mout.gmx.net (mout.gmx.net [212.227.17.20]) (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 9CD748433F for ; Sun, 10 Jul 2022 13:02:30 +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=1657450949; bh=pqceoYCAVEQfjrU08HBNYhYVXo2DQF01zT+r59hvpGY=; h=X-UI-Sender-Class:Date:Subject:To:References:From:Cc:In-Reply-To; b=XhEbdhK4u45q2ih6kOZXjzpG4t3Aa4Mcc9aNB8TphwrAM/LmfUxAY1DPDFPOqVbpk oMMheH3h2lKDpIV59cKsQD9M82c1HLzzOnH94NMwONKyVsAlnB1t604HSEiAyUcA0S v3+oNPGaBdakUpdcYD5Uxc26u6hAGUFm++pERfMU= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [192.168.123.94] ([62.143.94.109]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MoO6C-1nm7C83rzs-00ooqX; Sun, 10 Jul 2022 13:02:28 +0200 Message-ID: Date: Sun, 10 Jul 2022 13:02:28 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.0.1 Subject: Re: [PATCH 2/3] doc: environment: Expand on fdt_addr, initrd_addr and loadaddr Content-Language: en-US To: Tom Rini References: <20220620143129.1772880-1-trini@konsulko.com> <20220620143129.1772880-2-trini@konsulko.com> From: Heinrich Schuchardt Cc: u-boot@lists.denx.de, Simon Glass In-Reply-To: <20220620143129.1772880-2-trini@konsulko.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:ABBEYdP/VmZlDJY79bKNMK4Gpi3V0+hlYnsmEX6KNRd30ZSIMb/ P0JO9kYUF8jk3aLrKk80dPMDUevET2lDq9Y+yCEfgjLR4he61HiRT3dAMugdi6O+INNH4gs 2DgZMTYXx0RzaLy4Yzj/0LWmM9Q29KTMacvB8aKMGh7xJ5uDs9lD47AVa6g13qmJvnMOyo1 9/KnmIlLs2aigOd+oC8iw== X-UI-Out-Filterresults: notjunk:1;V03:K0:w/1JNe9trkc=:Jj7H5IQRWaUUq5s0hOqHaI rVhOGZjX/JtpTMmY9dfnRi12yUXrcokJz9/h8YgEVt+n1Wu1P/M3CsQRRlaagAt9hWF7ooeFA tTczwu9Ydp3IdpOsLr7zQvsIm5i+sYK4xK/s4y1ThsLNZrVX9kmYYZFE5JNCyi8ZaZSiOaVlm UNydch48oMbuFIKAAaOI3zVL7zQC3/pJ75q5oib+fjjj1+8dqYEpLL6+xNPFGmSUzDFWEvFoW +wYwCH8n/o8VWiJ0U0dzfCJQBJx3ldq7+9W8tXlh9bVqnbSWPvPBIrbiGtVKe6STNo2OmxhLV G7NF/tUrIqNrscERPHaXllyRD+CUuOyUaSPzSzn5UH+LSl4RQtcGlRjOMqjfEyiDEzenUPMKK xvvVDxJ1wUibTcMRsFsHW2yC8iIQWX0UzBIiyi8j/A9TRrSNZF9ffb8Jg2iBkic7c963xXeav g3ejz7sD5TY+Ij3q4/g5KsHX0bdEQSSdxov75BgctsLvoyLczpgn4ROvTSjwDSlbuGp2OQDBn jgG4en8TU00cECk/YXSxFiFciUqjUtEblmsqHB8ywwTtUqoq2nMWXrN8GcI5jYq590lqI+V4f pxrMBgmIA0msdRf7QBO2DTia17DBxpHE//HQZMOGTgKysrl7Q0IK72g3XSobfxkJhrMgPMmQM Fd2YM6MZ7Xvlz3O9E9kJcrz2GxiArBRiLstbqh+6G8XbTjCGmhU3kS5O84Ldn1uxvMk67NZeI GHa3hrFuqjH4D9AnKCtcIts8qtSUU26MBCKUq3VZEWjHFHyMBnt0VFeGT3hvkhGOs3Re223d1 z3trJf3lN+xLSQqI0tCT5/h27mue8TWMT3e4UD75FynCAPbw0IoPH1egyqCAYmCKCf2I+CSAR VLpO3V5cCsY3W6teQgwEiBrAth5RcZdWkbgR0joHclRoroDOoyEa0Ab2BdNKTzRo95pozmFp9 67S88r/Idsnjop70CUNuwyHGyDZzhaxHpCKUzF/YJ6mlPusnlruoIwSHinxFd2ewdpfGgyb1K 0XZmOkfANcWMbEHdeX88+z8pAt7ipYdl5TpqzC33rt7wvwPn+WX6msBqbD4AOy9mNiqXxLofS H/deoZNu7zJOkPHdwdNFacLq3XXgvx38sEV+COFg7IC0xapbCwXqRgwCw== X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.6 at phobos.denx.de X-Virus-Status: Clean On 6/20/22 16:31, Tom Rini wrote: > - Explain why fdt_addr and initrd_addr should not be set to disable > relocation normally. > - Provide some advice on the typical loadaddr default value. > > Signed-off-by: Tom Rini > --- > doc/usage/environment.rst | 15 ++++++++++++--- > 1 file changed, 12 insertions(+), 3 deletions(-) > > diff --git a/doc/usage/environment.rst b/doc/usage/environment.rst > index a3f23d4e4e22..a9a4702632d2 100644 > --- a/doc/usage/environment.rst > +++ b/doc/usage/environment.rst > @@ -204,7 +204,9 @@ fdt_high > to work it must reside in writable memory, have > sufficient padding on the end of it for u-boot to > add the information it needs into it, and the memory > - must be accessible by the kernel. > + must be accessible by the kernel. This usage is strongly discourag= ed > + however as it also stops U-Boot from ensuring the device tree start= ing > + address is properly aligned and a misaligned tree will cause OS fai= lures. fdt_addr_r is typically 4 byte aligned. Is there a bug in some part of the code? > > fdtcontroladdr > if set this is the address of the control flattened > @@ -240,14 +242,21 @@ initrd_high > memory. In this case U-Boot will NOT COPY the > ramdisk at all. This may be useful to reduce the > boot time on your system, but requires that this > - feature is supported by your Linux kernel. > + feature is supported by your Linux kernel. This usage however requ= ires > + that the user ensure that there will be no overlap with other parts= of the It is not the user but the developer who define $kernel_addr_r, $initr_addr_r, and $fdt_addr_r. Relocating initrd does not stop the user from loading the kernel to initrd_high. The user is always responsible for avoiding overlap. In this regard there is nothing special about initrd_high=3D~0UL. > + iamge such as the Linux kernel BSS. It should not be enabled by de= fault %s/iamge/image > + and only done as part of optimizing a deployment. Relocating initrd and fdt is using boot time. On many boards it is simply superfluous. On these boards I cannot see any reason not to disable it by default. Best regards Heinrich > > ipaddr > IP address; needed for tftpboot command > > loadaddr > Default load address for commands like "bootp", > - "rarpboot", "tftpboot", "loadb" or "diskboot" > + "rarpboot", "tftpboot", "loadb" or "diskboot". Note that the optim= al > + default values here will vary between architectures. On 32bit ARM = for > + example, some offset from start of memory is used as the Linux kern= el > + zImage has a self decompressor and it's best if we stay out of wher= e that > + will be working. > > loads_echo > see CONFIG_LOADS_ECHO