public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* boot hangs on new board with SAMA5D27C-D5M
@ 2021-07-22 17:01 Alexander Dahl
  2021-08-27 12:16 ` Alexander Dahl
  0 siblings, 1 reply; 2+ messages in thread
From: Alexander Dahl @ 2021-07-22 17:01 UTC (permalink / raw)
  To: u-boot; +Cc: Roelf-Erik Carsjens

[-- 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()

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-08-27 12:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-07-22 17:01 boot hangs on new board with SAMA5D27C-D5M Alexander Dahl
2021-08-27 12:16 ` Alexander Dahl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox