All of lore.kernel.org
 help / color / mirror / Atom feed
From: Francesco Dolcini <francesco@dolcini.it>
To: "João Paulo Gonçalves" <jpaulo.silvagoncalves@gmail.com>
Cc: "Sughosh Ganu" <sughosh.ganu@linaro.org>,
	"Francesco Dolcini" <francesco@dolcini.it>,
	"Ilias Apalodimas" <ilias.apalodimas@linaro.org>,
	"Tom Rini" <trini@konsulko.com>,
	"Francesco Dolcini" <francesco.dolcini@toradex.com>,
	"João Paulo Gonçalves" <joao.goncalves@toradex.com>,
	u-boot@lists.denx.de, "Marek Vasut" <marex@denx.de>,
	"Fabio Estevam" <festevam@denx.de>,
	"Frieder Schrempf" <frieder.schrempf@kontron.de>,
	"Peng Fan" <peng.fan@nxp.com>
Subject: Re: [REGRESSION] Out of memory error: unable to boot on imx8mp/imx8mm
Date: Tue, 17 Dec 2024 12:25:35 +0100	[thread overview]
Message-ID: <20241217112535.GA43472@francesco-nb> (raw)
In-Reply-To: <20241217111850.sazfsh3majbgy7iu@joaog-nb.corp.toradex.com>

+Fabio, Marex, Peng, Frieder

On Tue, Dec 17, 2024 at 08:18:50AM -0300, João Paulo Gonçalves wrote:
> > 
> > Okay. Please try changing the value of ram_top to 0x1_0000_0000
> > instead of 0xFFFF_FFFF. That should work.
> >
> 
> Changing ram_top to 0x1_0000_0000 worked:
> 
> U-Boot SPL 2025.01-rc4-00025-g100a40dd79f8 (Dec 17 2024 - 08:05:06 -0300)
> DDR configured as dual rank
> WDT:   Started watchdog@30280000 with servicing every 1000ms (60s timeout)
> SEC0:  RNG instantiated
> Normal Boot
> Trying to boot from BOOTROM
> Boot Stage: Primary boot
> Find img info 0x4802d400, size 1116
> Need continue download 1024
> NOTICE:  BL31: v2.6(release):lf_v2.6-g3c1583ba0a
> NOTICE:  BL31: Built : 11:00:38, Nov 21 2022
> 
> 
> U-Boot 2025.01-rc4-00025-g100a40dd79f8 (Dec 17 2024 - 08:05:06 -0300)
> 
> CPU:   Freescale i.MX8MP[8] rev1.1 1600 MHz (running at 1200 MHz)
> CPU:   Industrial temperature grade (-40C to 105C) at 54C
> Reset cause: POR
> DRAM:  Ram top: 100000000
> 8 GiB
> Core:  183 devices, 31 uclasses, devicetree: separate
> WDT:   Started watchdog@30280000 with servicing every 1000ms (60s timeout)
> MMC:   FSL_SDHC: 1, FSL_SDHC: 2
> Loading Environment from MMC... Reading from MMC(2)... OK
> In:    serial@30880000
> Out:   serial@30880000
> Err:   serial@30880000
> Model: Toradex 0070 Verdin iMX8M Plus Quad 8GB WB IT V1.1A
> Serial#: 15207893
> Carrier: Toradex Dahlia V1.1C, Serial# 11060859
> SEC0:  RNG instantiated
> Setting variant to wifi
> Net:   eth1: ethernet@30be0000, eth0: ethernet@30bf0000 [PRIME]
> Hit any key to stop autoboot:  0 
> MMC: no card present
> switch to partitions #0, OK
> mmc2(part 0) is current device
> Scanning mmc 2:1...
> Found U-Boot script /boot.scr
> 5974 bytes read in 1 ms (5.7 MiB/s)
> ## Executing script at 50280000
> Loading DeviceTree: imx8mp-verdin-wifi-dev.dtb
> ...
> Starting kernel ...
> 
> The change is shown in the patch below, but I am unsure if this is the
> correct solution. Should ram_top be the last valid address or the upper
> bound?
> 
> diff --git a/arch/arm/mach-imx/imx8m/soc.c b/arch/arm/mach-imx/imx8m/soc.c
> index 9588b8b28bf2..e01774ebc8a4 100644
> --- a/arch/arm/mach-imx/imx8m/soc.c
> +++ b/arch/arm/mach-imx/imx8m/soc.c
> @@ -362,7 +362,7 @@ phys_addr_t board_get_usable_ram_top(phys_size_t total_size)
>          * space below the 4G address boundary (which is 3GiB big),
>          * even when the effective available memory is bigger.
>          */
> -       top_addr = clamp_val((u64)PHYS_SDRAM + gd->ram_size, 0, 0xffffffff);
> +       top_addr = clamp_val((u64)PHYS_SDRAM + gd->ram_size, 0, 0x100000000);
>  
>         /*
>          * rom_pointer[0] stores the TEE memory start address.

see commit e27bddff4b97 ("imx8m: Restrict usable memory to space below 4G boundary").

I assume such a change might introduce regressions.

Francesco



  reply	other threads:[~2024-12-17 11:25 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-16 11:42 [REGRESSION] Out of memory error: unable to boot on imx8mp/imx8mm João Paulo Gonçalves
2024-12-16 13:14 ` Sughosh Ganu
2024-12-16 14:28   ` João Paulo Gonçalves
2024-12-16 19:02     ` Francesco Dolcini
2024-12-16 19:07       ` Sughosh Ganu
2024-12-16 19:29         ` Francesco Dolcini
2024-12-16 19:32           ` Sughosh Ganu
2024-12-16 19:35             ` Ilias Apalodimas
2024-12-16 19:40               ` Francesco Dolcini
2024-12-16 22:05                 ` Sughosh Ganu
2024-12-17 11:18                   ` João Paulo Gonçalves
2024-12-17 11:25                     ` Francesco Dolcini [this message]
2024-12-17 12:29                       ` Sughosh Ganu
2024-12-17 11:55                     ` Ilias Apalodimas
2024-12-17 12:38                       ` João Paulo Gonçalves

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241217112535.GA43472@francesco-nb \
    --to=francesco@dolcini.it \
    --cc=festevam@denx.de \
    --cc=francesco.dolcini@toradex.com \
    --cc=frieder.schrempf@kontron.de \
    --cc=ilias.apalodimas@linaro.org \
    --cc=joao.goncalves@toradex.com \
    --cc=jpaulo.silvagoncalves@gmail.com \
    --cc=marex@denx.de \
    --cc=peng.fan@nxp.com \
    --cc=sughosh.ganu@linaro.org \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.