From patchwork Sat Jan 9 18:06:17 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heinrich Schuchardt X-Patchwork-Id: 1424140 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmx.de Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=gmx.net header.i=@gmx.net header.a=rsa-sha256 header.s=badeba3b8450 header.b=idrme6uN; dkim-atps=neutral Received: from phobos.denx.de (unknown [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DCnx72CRgz9sVy for ; Sun, 10 Jan 2021 05:06:58 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 0990E82938; Sat, 9 Jan 2021 19:06:43 +0100 (CET) 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="idrme6uN"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 421A182955; Sat, 9 Jan 2021 19:06:40 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 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 4BB0A82936 for ; Sat, 9 Jan 2021 19:06:37 +0100 (CET) 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=1610215585; bh=wHHBBywj81tRMs+7o9RKpGdPPxXXCMCCT0pfpUNi+xU=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date; b=idrme6uNgWxq4NeLvidl/hi+wJX8qnMKD4vnoDjlxxK2I5zPyFDosATXjbHLddGpT HCsNht8vgDFgmI/Ro+bZ+x0eKIcvyCoyBwGe2am4fyXiJxC3rU1pwqTiBWil8vPhyo D2IrwVUlIFJn4dD05BeLAPvoBJBRbfMS61ntAq9s= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from LT02.fritz.box ([62.143.246.89]) by mail.gmx.com (mrgmx105 [212.227.17.174]) with ESMTPSA (Nemesis) id 1MeCpb-1kQLWY1IPv-00bH0X; Sat, 09 Jan 2021 19:06:25 +0100 From: Heinrich Schuchardt To: Tom Rini Cc: Simon Glass , Naoki Hayama , Marek Vasut , Patrick Delaunay , Ramon Fried , Adam Ford , Stefan Roese , Andy Shevchenko , Masahiro Yamada , Baruch Siach , Robert Marko , Atish Patra , u-boot@lists.denx.de, Heinrich Schuchardt Subject: [PATCH 1/1] image: usage of value ~0UL for intrd_high Date: Sat, 9 Jan 2021 19:06:17 +0100 Message-Id: <20210109180617.42030-1-xypron.glpk@gmx.de> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 X-Provags-ID: V03:K1:5ij0ezlpJetmFHAPOS+6l9K8//byFquqeqPkWBlHFg0tCDdxpkx d5GWrJhivfLuL2b1HYKX60HGDaGGqxpis2eZN47CJFmBzSRdLGSiqZmA42pCmgYen4sGyyS VFsg4THKMLxhFEmRjk5r8ivzoz7xxbx27fjRBPFxN89vbgExmRpI++IB8Mo88iGb4hU6YSF qKosdXDyk6x67l3BKUrKg== X-UI-Out-Filterresults: notjunk:1;V03:K0:1D5c4GkFb/o=:/YjP5ogh+JR7yrFtyoFHAF y2xzgvspbBPmoC+sXh6A4yX4iJ38PCHFzwBhYGdbgtXdjEN6Szwjya7zerlX8yha+v19F8Ouh h9WHk+Cyk7Tf8WcoLs3oYMINFQ0D5h0wMFE6iTgqbk3JRa+0ukLuc6hIgx3xUeXIYx/Z6j5vQ 4wd/If0SAaSFHSefekHqI2At36aofaHxpA4uzx60bZYsociH3o3S+ynzIKMQLdgyLMUjgoejI O1OL3UEZobYEwtQvGA93ubaW0m0/8JMOKk/9KadAMCUJJSXdSn02RLHtDLcdbFuVSC1Z0OQMa usU8Meyzt+6+P85UiYsCWN+mj/ftAU8vG0jYfHMFDuA0W2mioivOiQjxcLiamBTN+3TunB69n CC+vs6gvwjuQA/HJsU7BsVLLy783v56BS1R0O/6HWhmvIuGnDDXH3CL7TOrTISQlKHsfl5KkQ 7FEhABSRZwd3gKchMgpBnXAIHO5vaGvUY8ZHclZaVrpTKdw3hdKmFS7c5aU73MKUIV+p/C1+2 hCzd0vdDYG4ZfbLfZIkgAXa9iUsvnfTQp3Nuc8F9zlUxMvJSc9gZ5DdnylCF3PyQFYhREMAhw 8Sjm5HMnhXPMJ0wpAQ1G+4yDlJwu7e6EnJMXw8hgLUkz+6kh8rpDH28aNXCU/33WqwuksJILH 7vSt/Sk9yenSTkyX9dzr/PmBfjDJkS6Wmj9hG2F5+ybpBnddDyhwG/byKYVI0oBxfH79auBht jeUyAmLTaiUQ7RG+LLWGqsIOZq3cEkXrq+GxggFsSQ6HnfmJuO5dyjr7tyN56WA56es+DLEQ0 5PZWq3DOb4KQGANzY14pmq3qtxM1RL/j0xFVMxg8AnCAKtWj+gET34bdipG4cwrUw1+AXqjOy vpKOsuFb0LQnwMTKi6jA== 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.102.3 at phobos.denx.de X-Virus-Status: Clean The comment for initrd_high in the coding and in README were contradicting and neither fully described what the coding does. Clarify the usage of the special value ~0UL for the environment variable initrd_high. Signed-off-by: Heinrich Schuchardt --- README | 3 ++- common/image.c | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) -- 2.29.2 diff --git a/README b/README index 7b73a1c973..fe58f1ab98 100644 --- a/README +++ b/README @@ -3310,7 +3310,8 @@ List of environment variables (most likely not complete): setenv initrd_high 00c00000 - If you set initrd_high to 0xFFFFFFFF, this is an + If you set initrd_high to 0xFFFFFFFF on a 32-bit systems + or 0xFFFFFFFFFFFFFFFF on a 64-bit systems, this is an indication to U-Boot that all addresses are legal for the Linux kernel, including addresses in flash memory. In this case U-Boot will NOT COPY the diff --git a/common/image.c b/common/image.c index 451fc689a8..007e4e987a 100644 --- a/common/image.c +++ b/common/image.c @@ -1362,8 +1362,10 @@ int boot_ramdisk_high(struct lmb *lmb, ulong rd_data, ulong rd_len, s = env_get("initrd_high"); if (s) { - /* a value of "no" or a similar string will act like 0, - * turning the "load high" feature off. This is intentional. + /* + * A value of 0xffffffffffffffff on 64-bit or 0xffffffff + * on 32-bit systems will disable the copying of the initial + * RAM disk to high memory. */ initrd_high = simple_strtoul(s, NULL, 16); if (initrd_high == ~0)