From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6B555C6377D for ; Thu, 22 Jul 2021 17:01:48 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 8177D61106 for ; Thu, 22 Jul 2021 17:01:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8177D61106 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=thorsis.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 6A4FE829D4; Thu, 22 Jul 2021 19:01:45 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=thorsis.com 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 ECACD82A01; Thu, 22 Jul 2021 19:01:42 +0200 (CEST) Received: from mail.thorsis.com (mail.thorsis.com [92.198.35.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 3247382991 for ; Thu, 22 Jul 2021 19:01:40 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=thorsis.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=ada@thorsis.com Received: from localhost (localhost [127.0.0.1]) by mail.thorsis.com (Postfix) with ESMTP id D284ED37 for ; Thu, 22 Jul 2021 19:01:39 +0200 (CEST) Received: from mail.thorsis.com ([127.0.0.1]) by localhost (mail.thorsis.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id kTLZZD5mOssv for ; Thu, 22 Jul 2021 19:01:39 +0200 (CEST) Received: by mail.thorsis.com (Postfix, from userid 109) id AD5551C37; Thu, 22 Jul 2021 19:01:39 +0200 (CEST) From: Alexander Dahl To: u-boot@lists.denx.de Cc: Roelf-Erik Carsjens Subject: boot hangs on new board with SAMA5D27C-D5M Date: Thu, 22 Jul 2021 19:01:36 +0200 Message-ID: <2243264.XLWg60qqE0@ada> Content-Type: multipart/mixed; boundary="nextPart6908488.il5Tnd4Pmd" Content-Transfer-Encoding: 7Bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.2 at phobos.denx.de X-Virus-Status: Clean This is a multi-part message in MIME format. --nextPart6908488.il5Tnd4Pmd Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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 --nextPart6908488.il5Tnd4Pmd Content-Disposition: attachment; filename="console_2021-07-22_03_redacted.log" Content-Transfer-Encoding: quoted-printable Content-Type: text/x-log; charset="UTF-8"; name="console_2021-07-22_03_redacted.log" initcall: 23f0e150 initcall: 23f3f3bc initcall: 23f13460 initcall: 23f0e148 initcall: 23f0e3e4 initcall: 23f0e170 initcall: 23f026b8 initcall: 23f0e400 initcall: 23f0e3dc initcall: 23f0e440 initcall: 23f028e8/=EF=BF=BD+=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD= =EF=BF=BD=EF=BF=BD=EF=BF=BD=CD=99=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF= =BD5)=EF=BF=BD=EF=BF=BD=EF=BF=BD=D1=8D=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD= =EF=BF=BD=CD=99=C9=91=EF=BF=BD=EF=BF=BD=EF=BF=BD5)=EF=BF=BD=EF=BF=BD=EF=BF= =BD=D1=8D=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=CD=99=EF=BF= =BD=EF=BF=BD=CD=89=EF=BF=BD5)=EF=BF=BD=EF=BF=BD=EF=BF=BD=D1=8D=EF=BF=BD=EF= =BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=CD=99=C9=8D=EF=BF=BD=EF=BF=BD=EF=BF=BD5)= =EF=BF=BDpinctrl_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() --nextPart6908488.il5Tnd4Pmd--