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 56CF0C001B3 for ; Mon, 3 Jul 2023 20:49:22 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id DBC7186386; Mon, 3 Jul 2023 22:49:19 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=dolcini.it 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 B3D4D8631B; Mon, 3 Jul 2023 22:49:18 +0200 (CEST) Received: from mail11.truemail.it (mail11.truemail.it [217.194.8.81]) (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 638E986386 for ; Mon, 3 Jul 2023 22:49:16 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=dolcini.it Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=francesco@dolcini.it Received: from francesco-nb.int.toradex.com (93-49-2-63.ip317.fastwebnet.it [93.49.2.63]) by mail11.truemail.it (Postfix) with ESMTPA id 7A50720662; Mon, 3 Jul 2023 22:49:15 +0200 (CEST) Date: Mon, 3 Jul 2023 22:49:14 +0200 From: Francesco Dolcini To: Tom Rini , Simon Glass Cc: Francesco Dolcini , Marek Vasut , u-boot@lists.denx.de, Marcel Ziswiler , Fabio Estevam Subject: Re: v2023.07-rc5 regression: Image overlaps SPL Message-ID: References: <37cfa797-eea6-2f20-16a4-7a44a075d760@denx.de> <20230703200115.GD3931582@bill-the-cat> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230703200115.GD3931582@bill-the-cat> 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 Mon, Jul 03, 2023 at 04:01:15PM -0400, Tom Rini wrote: > On Mon, Jul 03, 2023 at 09:54:40PM +0200, Francesco Dolcini wrote: > > On Mon, Jul 03, 2023 at 09:40:51PM +0200, Marek Vasut wrote: > > > On 7/3/23 18:49, Francesco Dolcini wrote: > > > > Short update on this regression. > > > > > > > > On Thu, Jun 29, 2023 at 04:19:22PM +0200, Francesco Dolcini wrote: > > > > > I also noticed something weird on a colibri imx7s, this is not using SPL, > > > > > likely something completly different, however given this is new also from rc5 I > > > > > thought it's valuable to report: > > > > > > > > > > ``` > > > > > U-Boot 2023.07-rc5-0.0.0-devel+git.580eb31199be (Jun 27 2023 - 13:39:58 +0000) > > > > > CPU: Freescale i.MX7S rev1.2 800 MHz (running at 792 MHz) > > > > > CPU: Extended Commercial temperature grade (-20C to 105C) at 30C > > > > > Reset cause: POR > > > > > DRAM: initcall sequence 8786eafc failed at call 8781b351 (err=-3) > > > > > > If you have the u-boot (elf file, unstripped), then check which initcall it > > > is that failed . Just run arm-...-objdump -lSD on it and search for the > > > 8781b350: address ; remember to clear the LSbit of the address in case this > > > is thumb mode of the CPU. > > > > > > U-Boot 2023.07-rc6 (Jul 03 2023 - 21:50:58 +0200) > > > > CPU: Freescale i.MX7S rev1.2 800 MHz (running at 792 MHz) > > CPU: Extended Commercial temperature grade (-20C to 105C) at 35C > > Reset cause: POR > > DRAM: initcall sequence 8786fb00 failed at call 8781b715 (err=-3) > > ### ERROR ### Please RESET the board ### > > > > > > u-boot/common/board_f.c:523 > > } > > 8781b710: 2000 movs r0, #0 > > 8781b712: bd08 pop {r3, pc} > > > > 8781b714 : > > fix_fdt(): > > u-boot/common/board_f.c:729 > > return board_fix_fdt((void *)gd->fdt_blob); > > 8781b714: f8d9 0068 ldr.w r0, [r9, #104] ; 0x68 > > 8781b718: f7ea bafe b.w 87805d18 > > So, that's in your board code then: > board/toradex/colibri_imx7/colibri_imx7.c:int board_fix_fdt(void *rw_fdt_blob) Yep, this is the problematic code: board/toradex/colibri_imx7/colibri_imx7.c: int board_fix_fdt(void *rw_fdt_blob) { /* i.MX 7Solo has only one single USB OTG1 but no USB host port */ if (is_cpu_type(MXC_CPU_MX7S)) { int offset = fdt_path_offset(rw_fdt_blob, "/soc/bus@30800000/usb@30b20000"); return fdt_status_disabled(rw_fdt_blob, offset); } return 0; } For what is worth in this node "/soc/bus@30800000/usb@30b20000" the `status="ok"` property is already present. Before 8c103c33fb14 ("dm: dts: Convert driver model tags to use new schema") fdt_status_disabled() did return 0, so all good no issue. If I do this small partial revert --- a/arch/arm/dts/imx7d-colibri-eval-v3-u-boot.dtsi +++ b/arch/arm/dts/imx7d-colibri-eval-v3-u-boot.dtsi @@ -15,7 +15,8 @@ pinctrl-0 = <&pinctrl_lcdif_dat &pinctrl_lcdif_ctrl>; display = <&display0>; - u-boot,dm-pre-reloc; + bootph-all; fdt_status_disabled() returns 0 again. With the current master, fdt_status_disabled() returns -3, -FDT_ERR_NOSPACE, and I assume I could just change my code to call fdt_increase_size() and call it done. However, what the reason for this different behavior triggered by that change in the *-u-boot.dtsi ? Is this expected? From a quick check multiple place in the code just disable/enable nodes or set properties without taking care of this, are those going to be affected by that commit that created the regression? Are those all buggy? $ git grep fdt_setprop |wc -l 461 We have some helper around, for example arch/arm/mach-imx/imx8/fdt.c:disable_fdt_node(), but this is for example just specific on that file. Simon: any suggestion? Thanks, Francesco