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 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 407C6C433EF for ; Wed, 12 Jan 2022 10:55:17 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id E6D8283103; Wed, 12 Jan 2022 11:55:14 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1641984915; bh=ONaheOROTVEv9sOicdoVFF6EjX5WXNx1dIAa2/le9g8=; h=Date:Subject:To:Cc:References:From:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=FeqtV6TYJt1lAqEZL4fLHszqn08FugbY9Ngpp1JgnnQzbULogN55+aFS9x5uRR5Q7 T2HPG+C4HDcVKShdTOyogq5dWrp937+kH08cLUiM1ob1kLQ2bwg+mOevGo0Fx5+qDv KkOo2nqA3YYkDZsnQsOVTNFGRDZbKX+N6xonCl1TOPqHu/JIsgnrfmrstp8ovjsvJX Cy1zvHu2SxmuFNBiXF+KGlPluUnizzjnk3m8tzSAdDyW5qohKFNNamkjoJ8BoP3Nn9 LMb9Ofw29Q+64AWocSCOHWMmcQgrsik3Hr8YuSmcQtVcvvAQzp3eMoRnC0kJu0BRFv pfwGFGTc9S5Bg== Received: by phobos.denx.de (Postfix, from userid 109) id 2B46883105; Wed, 12 Jan 2022 11:55:13 +0100 (CET) Received: from mout-u-107.mailbox.org (mout-u-107.mailbox.org [IPv6:2001:67c:2050:1::465:107]) (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 6445682F89 for ; Wed, 12 Jan 2022 11:55:10 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=fail smtp.mailfrom=sr@denx.de Received: from smtp1.mailbox.org (smtp1.mailbox.org [IPv6:2001:67c:2050:105:465:1:1:0]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-u-107.mailbox.org (Postfix) with ESMTPS id 4JYkws6YppzQk9v; Wed, 12 Jan 2022 11:55:09 +0100 (CET) Message-ID: Date: Wed, 12 Jan 2022 11:55:05 +0100 MIME-Version: 1.0 Subject: Re: [PATCH u-boot-marvell 00/16] tools: kwbimage: Load address fixes Content-Language: en-US To: =?UTF-8?Q?Pali_Roh=c3=a1r?= Cc: =?UTF-8?Q?Marek_Beh=c3=ban?= , Chris Packham , u-boot@lists.denx.de References: <20211221155416.8557-1-pali@kernel.org> <2fcbab2c-5119-930c-a3d9-db1e6909b125@denx.de> <20220112104119.l2jkojbdt6pf3coa@pali> From: Stefan Roese In-Reply-To: <20220112104119.l2jkojbdt6pf3coa@pali> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 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.2 at phobos.denx.de X-Virus-Status: Clean On 1/12/22 11:41, Pali Rohár wrote: > On Wednesday 12 January 2022 08:26:10 Stefan Roese wrote: >> Hi Pali, >> >> while testing with this patchset (amongst others), I get this error >> while building for "theadorable_debug": >> >> $ make theadorable_debug_defconfig >> $ make -s -j20 >> Invalid LOAD_ADDRESS 0x40004030 for BINARY spl/u-boot-spl.bin with 0 args. >> Address must be 4-byte aligned and in range 0x40000028-0x40000424 >> .make: *** [Makefile:1448: u-boot-spl.kwb] Error 1 >> make: *** Deleting file 'u-boot-spl.kwb' >> >> Could you please take a look on whats going wrong here? Do I need to >> change CONFIG_SPL_TEXT_BASE now? And if yes, why? > > Hello! > > If everything is working fine without this patch series then address > must not be changed. Yes, everything works just fine without out this series. > Now I realized that some boards have text base address 0x40004030 and > some have 0x40000030. When I was looking it during writing this patch > series, I have not spotted that there is different digit "4" in the > middle... And therefore I was in impression that every 32-bit Armada has > base address 0x40000000 (increased by magic constant 0x30 which is > explained in one of the patches). I see. > So now I need to figure out, why some boards have base address > 0x40004000 and some have 0x40000000. It it somewhere documented this > magic address? Or do you know source of this address for your board? This is so loooong ago that I worked on this. I can only guess, that the are up to offset 0x4000 was reserved by/for the BootROM. Thanks, Stefan > In my opinion, it has to be BootROM specific and I do not think it is > changeable. > >> Thanks, >> Stefan >> >> On 12/21/21 16:54, Pali Rohár wrote: >>> This patch series fixes generating images in kwbimage format, main fix >>> is setting correct load address of U-Boot SPL. Also it adds support for >>> generating kwbimage config file from existing kwbimage file via >>> dumpimage tool. >>> >>> Pali Rohár (16): >>> tools: kwbimage: Mark all local functions as static >>> tools: kwbimage: Deduplicate v1 regtype header finishing >>> tools: kwbimage: Fix generating image with multiple DATA_DELAY >>> commands >>> tools: kwbimage: Preserve order of BINARY, DATA and DATA_DELAY >>> commands >>> arm: mvebu: Generate kwbimage.cfg with $(call cmd,...) >>> tools: kwbimage: Add support for specifying LOAD_ADDRESS for BINARY >>> command >>> tools: kwbimage: Check the return value of image_headersz_v1() >>> arm: mvebu: Correctly set LOAD_ADDRESS for U-Boot SPL binary in >>> kwbimage >>> arm: mvebu: Enable BootROM output on A38x >>> tools: kwbimage: Add missing check for maximal value for DATA_DELAY >>> tools: kwbimage: Show binary image address in mkimage -l, in addition >>> to size >>> tools: kwbimage: Dump kwbimage config file on '-p -1' option >>> tools: kwbimage: Do not cast const pointers to non-const pointers >>> tools: kwbimage/kwboot: Check ext field for non-zero value >>> tools: kwbimage: Extract main data image without -p arg for dumpimage >>> tools: kwbimage: Fix mkimage/dumpimage -l argument >>> >>> arch/arm/mach-mvebu/Makefile | 17 +- >>> arch/arm/mach-mvebu/kwbimage.cfg.in | 7 +- >>> tools/kwbimage.c | 494 ++++++++++++++++++++++------ >>> tools/kwbimage.h | 10 +- >>> tools/kwboot.c | 4 +- >>> 5 files changed, 421 insertions(+), 111 deletions(-) >>> >> >> Viele Grüße, >> Stefan Roese >> >> -- >> DENX Software Engineering GmbH, Managing Director: Wolfgang Denk >> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany >> Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: sr@denx.de Viele Grüße, Stefan Roese -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: sr@denx.de