public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Alexander Dahl <ada@thorsis.com>
To: u-boot@lists.denx.de
Cc: Roelf-Erik Carsjens <rca@thorsis.com>
Subject: Re: boot hangs on new board with SAMA5D27C-D5M
Date: Fri, 27 Aug 2021 14:16:33 +0200	[thread overview]
Message-ID: <3944538.54PfVXhSk8@ada> (raw)
In-Reply-To: <2243264.XLWg60qqE0@ada>

Hello,

for the record … see below.

Am Donnerstag, 22. Juli 2021, 19:01:36 CEST schrieb Alexander Dahl:
> Hello,
> 
> I'm currently porting a brand new custom board with Microchip's 64 MiB
> SAMA5D2 SiP SoC. Second stage bootloader is at91bootstrap, for development
> I load U- Boot directly to RAM with SAM-BA to the same address (0x23f00000)
> and execute from there. RAM base address is 0x20000000 and size 0x04000000
> (64 MiB). Code is based on the U-Boot v2021.07 upstream code of the
> SAMA5D2-SOM1-EK1 board (which has 128 MiB).
> 
> I get to a U-Boot shell and can access SD card and LEDs if I do not activate
> NAND flash support in menuconfig. The log with debug messages is attached.
> From IRC marex and I suspect some overwritten memory if the u-boot-dtb.bin
> file gets too big, but I can not spot any error in those addresses in debug
> output.
> 
> The last function called is initr_malloc() from common/board_r.c but I can
> not spot what's wrong with that, especially because mem_malloc_init()
> prints a probably valid memory area and malloc_bin_reloc() should be a
> noop.
> 
> If I disable CONFIG_SYS_MALLOC_CLEAR_ON_INIT, I get to a shell, if I enable
> it again, boot hangs.
> 
> So the memset() of the malloc area, which is supposed to be valid to my
> knowledge, causes the hang.
> 
> I can try one of the other boards (there are 4 prototype boards) to rule out
> an hardware issue, but I'm curious if anyone has an idea what's wrong here?

Not sure what was the root cause of the issue, but I changed the initial load 
address to 0x21f00000 which is 1 MiB below half of the RAM (at offset 31 MiB 
of 64 MiB, instead of at offset 63 MiB).  Now U-Boot works without hangs or 
hiccups.

So the change in at91bootstrap3 was:

-CONFIG_JUMP_ADDR="0x23f00000"
+CONFIG_JUMP_ADDR="0x21f00000"

and in U-Boot:

-CONFIG_SYS_TEXT_BASE=0x23f00000
+CONFIG_SYS_TEXT_BASE=0x21f00000

Greets
Alex




      reply	other threads:[~2021-08-27 12:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-22 17:01 boot hangs on new board with SAMA5D27C-D5M Alexander Dahl
2021-08-27 12:16 ` Alexander Dahl [this message]

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=3944538.54PfVXhSk8@ada \
    --to=ada@thorsis.com \
    --cc=rca@thorsis.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox