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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 7244FC433EF for ; Thu, 2 Jun 2022 11:21:00 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id AC22484337; Thu, 2 Jun 2022 13:20:37 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=tinet.cat 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 C36388431C; Thu, 2 Jun 2022 13:05:56 +0200 (CEST) Received: from mx1.tinet.cat (mx1.tinet.cat [195.77.216.146]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id E097C83E8A for ; Thu, 2 Jun 2022 13:05:53 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=tinet.cat Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=xdrudis@tinet.cat X-ASG-Debug-ID: 1654167952-163e7b45533e55a0001-4l7tJC Received: from smtp01.tinet.cat (smtp01.tinet.cat [195.77.216.131]) by mx1.tinet.cat with ESMTP id kA55mqMWSbJep6Ka; Thu, 02 Jun 2022 13:05:52 +0200 (CEST) X-Barracuda-Envelope-From: xdrudis@tinet.cat X-Barracuda-Effective-Source-IP: smtp01.tinet.cat[195.77.216.131] X-Barracuda-Apparent-Source-IP: 195.77.216.131 Received: from begut (50.red-79-152-182.dynamicip.rima-tde.net [79.152.182.50]) by smtp01.tinet.cat (Postfix) with ESMTPSA id 2F1A66063582; Thu, 2 Jun 2022 13:05:52 +0200 (CEST) Date: Thu, 2 Jun 2022 13:05:51 +0200 From: Xavier Drudis Ferran To: u-boot@lists.denx.de Cc: sjg@chromium.org, philipp.tomsich@vrull.eu, kever.yang@rock-chips.com, lukma@denx.de, seanga2@gmail.com Subject: Re: [PATCH 1/3] Reserve some RAM at 0 for bl31_0x00000000.bin for Radxa Rock Pi 4. Message-ID: <20220602110550.GC1727@begut> X-ASG-Orig-Subj: Re: [PATCH 1/3] Reserve some RAM at 0 for bl31_0x00000000.bin for Radxa Rock Pi 4. References: <20220602110200.GB1727@begut> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20220602110200.GB1727@begut> User-Agent: Mutt/1.10.1 (2018-07-13) X-Barracuda-Connect: smtp01.tinet.cat[195.77.216.131] X-Barracuda-Start-Time: 1654167952 X-Barracuda-URL: https://webmail.tinet.cat:443/cgi-mod/mark.cgi X-Barracuda-Scan-Msg-Size: 1664 X-Barracuda-BRTS-Status: 1 X-Barracuda-Bayes: SPAM GLOBAL 0.9996 1.0000 4.3385 X-Barracuda-Spam-Score: 4.34 X-Barracuda-Spam-Status: No, SCORE=4.34 using global scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=6.0 KILL_LEVEL=8.0 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.98432 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- X-Mailman-Approved-At: Thu, 02 Jun 2022 13:20:24 +0200 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.5 at phobos.denx.de X-Virus-Status: Clean When trying to boot from MMC in a Rock Pi 4 where I shorted SPI clk to GND to have bootrom load tpl+spl from MMC, SPL hanged after the message "Trying to boot from MMC1". With this patch it continued booting, printed two notices from ATF with BL31 version and date, and loaded U-Boot proper. I'm not sure if there's something special with the ATF I built, or what would be a reasonable standard for the size of BL31@0 but in my u-boot.its I find atf_1 { description = "ARM Trusted Firmware"; data = /incbin/("bl31_0x00000000.bin"); type = "firmware"; arch = "arm64"; os = "arm-trusted-firmware"; compression = "none"; load = <0x00000000>; entry = <0x00001000>; }; and bl31_0x00000000.bin size is 82008 bytes. 0x15000 is 86016 which gives some room for variation and seems good aligned enough. I don't want to make u-boot too big. Most other boards which define CONFIG_ROCKCHIP_SPL_RESERVE_IRAM put it at 0x4000 but in my tests this wasn't enough. Signed-off-by: Xavier Drudis Ferran --- configs/rock-pi-4-rk3399_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/rock-pi-4-rk3399_defconfig b/configs/rock-pi-4-rk3399_defconfig index 8861f13878..510028b095 100644 --- a/configs/rock-pi-4-rk3399_defconfig +++ b/configs/rock-pi-4-rk3399_defconfig @@ -7,6 +7,7 @@ CONFIG_NR_DRAM_BANKS=1 CONFIG_ENV_OFFSET=0x3F8000 CONFIG_DEFAULT_DEVICE_TREE="rk3399-rock-pi-4b" CONFIG_ROCKCHIP_RK3399=y +CONFIG_ROCKCHIP_SPL_RESERVE_IRAM=0x15000 CONFIG_TARGET_EVB_RK3399=y CONFIG_DEBUG_UART_BASE=0xFF1A0000 CONFIG_DEBUG_UART_CLOCK=24000000 -- 2.20.1