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 55CAEC77B73 for ; Tue, 6 Jun 2023 10:30:45 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A706C8445D; Tue, 6 Jun 2023 12:30:42 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=codethink.co.uk Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id 453568267E; Tue, 6 Jun 2023 12:30:40 +0200 (CEST) Received: from imap5.colo.codethink.co.uk (imap5.colo.codethink.co.uk [78.40.148.171]) (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 45D788445D for ; Tue, 6 Jun 2023 12:30:37 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=codethink.co.uk Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=ben.dooks@codethink.co.uk Received: from [90.160.41.100] (helo=[10.105.1.14]) by imap5.colo.codethink.co.uk with esmtpsa (Exim 4.94.2 #2 (Debian)) id 1q6TxS-003HkO-9S; Tue, 06 Jun 2023 11:30:35 +0100 Message-ID: Date: Tue, 6 Jun 2023 11:30:34 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [PATCH] ubifs: allow loading to above 4GiB To: hs@denx.de, Ben Dooks , u-boot@lists.denx.de References: <20230510134111.81261-1-ben.dooks@sifive.com> <715c49b6-6cb5-d8a4-aff1-1d24282b57a4@denx.de> Content-Language: en-GB From: Ben Dooks Organization: Codethink Limited. In-Reply-To: <715c49b6-6cb5-d8a4-aff1-1d24282b57a4@denx.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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.8 at phobos.denx.de X-Virus-Status: Clean On 05/06/2023 08:45, Heiko Schocher wrote: > Hello Ben, > > On 10.05.23 15:41, Ben Dooks wrote: >> The ubifsload command is truncating any address above 4GiB as it casts >> this address to an u32, instead of using an unsigned long which most of >> the other load commands do. Change this to an unsigned long to allow >> loading into high memory for boards which use these areas. >> >> Fixes the following error: >> >> => ubifsload 0x2100000000 /boot/Image.lzma >> Loading file '/boot/Image.lzma' to addr 0x00000000... >> Unhandled exception: Store/AMO access fault >> >> Signed-off-by: Ben Dooks >> --- >> cmd/ubifs.c | 2 +- >> fs/ubifs/ubifs.c | 4 ++-- >> include/ubifs_uboot.h | 2 +- >> 3 files changed, 4 insertions(+), 4 deletions(-) > > just started azure build and it drops errors: > > https://dev.azure.com/hs0298/hs/_build/results?buildId=105&view=results > > for example > https://dev.azure.com/hs0298/hs/_build/results?buildId=103&view=results > > 2023-06-05T07:34:39.9304987Z + tools/buildman/buildman -o /tmp/vexpress_ca9x4 -w -E -W -e --board > vexpress_ca9x4 > 2023-06-05T07:34:45.4735755Z Building current source for 1 boards (1 thread, 2 jobs per thread) > 2023-06-05T07:34:45.4735947Z > 2023-06-05T07:34:45.4736063Z Starting build... > 2023-06-05T07:34:45.4736188Z > 2023-06-05T07:34:45.4736233Z > 2023-06-05T07:35:02.4142452Z 0 0 0 /1 -1 (starting) > 2023-06-05T07:35:02.4150636Z > 2023-06-05T07:35:02.4150787Z arm: + vexpress_ca9x4 > 2023-06-05T07:35:02.4150964Z +In file included from include/linux/printk.h:4, > 2023-06-05T07:35:02.4151140Z + from include/common.h:20, > 2023-06-05T07:35:02.4152527Z + from cmd/ubifs.c:14: > 2023-06-05T07:35:02.4152796Z +cmd/ubifs.c: In function 'do_ubifs_load': > 2023-06-05T07:35:02.4153181Z +cmd/ubifs.c:136:15: error: format '%x' expects argument of type > 'unsigned int', but argument 3 has type 'long unsigned int' [-Werror=format=] > 2023-06-05T07:35:02.4153550Z + 136 | debug("Loading file '%s' to address 0x%08x (size > %d)\n", filename, addr, size); > 2023-06-05T07:35:02.4153758Z + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > 2023-06-05T07:35:02.4154045Z +include/log.h:155:21: note: in definition of macro 'pr_fmt' > 2023-06-05T07:35:02.4154220Z + 155 | #define pr_fmt(fmt) fmt > 2023-06-05T07:35:02.4154344Z + | ^~~ > 2023-06-05T07:35:02.4154571Z +include/log.h:272:9: note: in expansion of macro 'debug_cond' > 2023-06-05T07:35:02.4155974Z + 272 | debug_cond(_DEBUG, fmt, ##args) > 2023-06-05T07:35:02.4156144Z + | ^~~~~~~~~~ > 2023-06-05T07:35:02.4156393Z +cmd/ubifs.c:136:9: note: in expansion of macro 'debug' > 2023-06-05T07:35:02.4156541Z + | ^~~~~ > 2023-06-05T07:35:02.4156769Z +cmd/ubifs.c:136:50: note: format string is defined here > 2023-06-05T07:35:02.4156947Z + | ~~~^ > 2023-06-05T07:35:02.4157068Z + | | > 2023-06-05T07:35:02.4157202Z + | unsigned int > 2023-06-05T07:35:02.4157341Z + | %08lx > 2023-06-05T07:35:02.4157475Z +cc1: all warnings being treated as errors > 2023-06-05T07:35:02.4157660Z +make[2]: *** [scripts/Makefile.build:256: cmd/ubifs.o] Error 1 > 2023-06-05T07:35:02.4157845Z +make[1]: *** [Makefile:1853: cmd] Error 2 > 2023-06-05T07:35:02.4158061Z +make: *** [Makefile:177: sub-make] Error 2 > > Please fix it, thanks! I've just sent v2 with the debug print sorted. -- Ben Dooks http://www.codethink.co.uk/ Senior Engineer Codethink - Providing Genius https://www.codethink.co.uk/privacy.html