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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D9C83C433EF for ; Tue, 26 Oct 2021 05:42:37 +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 0E86D61002 for ; Tue, 26 Oct 2021 05:42:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 0E86D61002 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=denx.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 03DFE83521; Tue, 26 Oct 2021 07:42:34 +0200 (CEST) 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=1635226955; bh=Z5kv8gTVWW42dNzcG52aTVWw5tBaFFmhIe4TpEvajyg=; h=Subject:To:Cc:References:From:Date:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=vGX6/U0vEr528s7aWaeBKSshCr86j6gMk0R5mWDpxS6hSV0q3l+pqmdnPvTe2Jgrs 4JOsfyG9Ayrug1z150IVT7U9l/dXRfxYhPRkHI+FtLzF2K0nFQ1mZZ/DdyReV5Tmey pPCR0KaQAn5KmNyJl4cEoPNR+NsZgduoEvNHGfCJvRzWZvyb+CMAfbv0jhW2B+vFVf xT5Lns05a9k20KpMLPCMeoWhlQvYNZhC0iSzlVbKgqA11T4FzgXD7Mbkehdz+hOe1Y sN9O2OK4oXhVy8Lqsr9Urd/5TTVVruXj64mnj6/m1ixFW/lg/trBTqAZ5URH4Swjst eE2DGUmjxxvwQ== Received: by phobos.denx.de (Postfix, from userid 109) id 4EB4C8355F; Tue, 26 Oct 2021 07:42:33 +0200 (CEST) Received: from mout-u-204.mailbox.org (mout-u-204.mailbox.org [91.198.250.253]) (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 3E34A807D5 for ; Tue, 26 Oct 2021 07:42:30 +0200 (CEST) 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 (unknown [91.198.250.123]) (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-204.mailbox.org (Postfix) with ESMTPS id 4Hdgh61CvvzQjbf; Tue, 26 Oct 2021 07:42:30 +0200 (CEST) Subject: Re: [PATCH u-boot-marvell 03/13] tools: kwboot: Reserve enough space for patching kwbimage in memory To: =?UTF-8?Q?Marek_Beh=c3=ban?= Cc: u-boot@lists.denx.de, =?UTF-8?Q?Pali_Roh=c3=a1r?= , =?UTF-8?Q?Marek_Beh=c3=ban?= References: <20211025131304.21310-1-kabel@kernel.org> <20211025131304.21310-4-kabel@kernel.org> From: Stefan Roese Message-ID: Date: Tue, 26 Oct 2021 07:42:26 +0200 MIME-Version: 1.0 In-Reply-To: <20211025131304.21310-4-kabel@kernel.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: de-DE Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E14F9710 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 25.10.21 15:12, Marek Behún wrote: > From: Pali Rohár > > SPI image header and data parts do not have to be aligned to 128 byte > xmodem block size. So reserve additional memory for aligning header part > and additional memory for aligning data part. > > Signed-off-by: Pali Rohár > Reviewed-by: Marek Behún Reviewed-by: Stefan Roese Thanks, Stefan > --- > tools/kwboot.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/tools/kwboot.c b/tools/kwboot.c > index c55b41025b..4e29317f10 100644 > --- a/tools/kwboot.c > +++ b/tools/kwboot.c > @@ -1672,8 +1672,10 @@ main(int argc, char **argv) > else > /* ensure we have enough space for baudrate change code */ > after_img_rsv += KWBOOT_BAUDRATE_BIN_HEADER_SZ + > + KWBOOT_XM_BLKSZ + > sizeof(kwboot_pre_baud_code) + > - sizeof(kwboot_baud_code); > + sizeof(kwboot_baud_code) + > + KWBOOT_XM_BLKSZ; > > if (imgpath) { > img = kwboot_read_image(imgpath, &size, after_img_rsv); > Viele Grüße, Stefan -- 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