From: Alexander Dahl <ada@thorsis.com>
To: u-boot@lists.denx.de
Cc: Roelf-Erik Carsjens <rca@thorsis.com>
Subject: boot hangs on new board with SAMA5D27C-D5M
Date: Thu, 22 Jul 2021 19:01:36 +0200 [thread overview]
Message-ID: <2243264.XLWg60qqE0@ada> (raw)
[-- Attachment #1: Type: text/plain, Size: 1332 bytes --]
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?
Greets
Alex
[-- Attachment #2: console_2021-07-22_03_redacted.log --]
[-- Type: text/x-log, Size: 2768 bytes --]
initcall: 23f0e150
initcall: 23f3f3bc
initcall: 23f13460
initcall: 23f0e148
initcall: 23f0e3e4
initcall: 23f0e170
initcall: 23f026b8
initcall: 23f0e400
initcall: 23f0e3dc
initcall: 23f0e440
initcall: 23f028e8/�+��������͙�����5)���э�����͙ɑ���5)���э������͙��͉�5)���э�����͙ɍ���5)�pinctrl_atmel_pio4 pinctrl: set_state_simple op missing
gpio_atmel_pio4 gpio@fc038000: set_state_simple op missing
at91-pmc pmc@f0014000: set_state_simple op missing
sam9x5-periph-clk periph32ck: set_state_simple op missing
periph-clk pioA_clk@18: set_state_simple op missing
simple_bus apb: set_state_simple op missing
simple_bus ahb: set_state_simple op missing
pinconfig uart1_default: set_state_simple op missing
periph-clk uart1_clk@25: set_state_simple op missing
sama5d4-h32mx-clk h32mxck: set_state_simple op missing
initcall: 23f405dc
U-Boot 2021.07-00051-g0d4c3b9c41-dirty (Jul 22 2021 - 18:23:53 +0200)
initcall: 23f0e2ac
U-Boot code: 23F00000 -> 23F5F940 BSS: -> 23F66714
initcall: 23f0e190
initcall: 23f026e8
CPU: SAMA5D27 512M bits DDR2 SDRAM
Serial number 0: 0x4c41354b
1: 0x17032030
Crystal frequency: 24 MHz
CPU clock : 492 MHz
Master clock : 164 MHz
initcall: 23f0ea04
Model: ***
initcall: 23f0e398
DRAM: initcall: 23f02934
vera2: dram_init: called
initcall: 23f0e5e8
Monitor len: 00066714
Ram size: 04000000
Ram top: 24000000
initcall: 23f0e178
initcall: 23f0221c
initcall: 23f0e408
initcall: 23f0e410
initcall: 23f0e244
Reserving 409k for U-Boot at: 23f89000
initcall: 23f0e4a0
Reserving 4352k for malloc() at: 23b49000
initcall: 23f0e448
Reserving 96 Bytes for Board Info at: 23b48fa0
initcall: 23f0e4d0
Reserving 248 Bytes for Global Data at: 23b48ea0
initcall: 23f0e1d8
Reserving 13216 Bytes for FDT at: 23b45b00
initcall: 23f0e418
initcall: 23f0e420
initcall: 23f0e438
initcall: 23f0e654
initcall: 23f0e198
initcall: 23f0e514
RAM Configuration:
Bank #0: 20000000 64 MiB
Bank #1: 0 0 Bytes
Bank #2: 0 0 Bytes
Bank #3: 0 0 Bytes
DRAM: 64 MiB
initcall: 23f0e670
initcall: 23f0e1bc
New Stack Pointer is: 23b45ae0
initcall: 23f0e34c
initcall: 23f0e428
initcall: 23f0e430
initcall: 23f0e2dc
Relocation Offset is: 00089000
Relocating to 23f89000, new gd at 23b48ea0, sp at 23b45ae0
initcall: 23f0e3f8
initcall: 23f97728
initcall: 23f97730
initcall: 23f0e920 (relocated to 23f97920)
initcall: 23f0e8d4 (relocated to 23f978d4)
initcall: 23f0e938 (relocated to 23f97938)
initcall: 23f0e88c (relocated to 23f9788c)
Pre-reloc malloc() used 0x1024 bytes (4 KB)
malloc_start: 23b49000
using memory 0x23b49000-0x23f89000 for malloc()
next reply other threads:[~2021-07-22 17:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-22 17:01 Alexander Dahl [this message]
2021-08-27 12:16 ` boot hangs on new board with SAMA5D27C-D5M Alexander Dahl
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=2243264.XLWg60qqE0@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