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 B4B34C4708E for ; Thu, 5 Jan 2023 19:25:53 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 68875855CD; Thu, 5 Jan 2023 20:25:51 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="fo6AtRmQ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 7DD22855D1; Thu, 5 Jan 2023 20:25:49 +0100 (CET) Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) (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 BDB95855BC for ; Thu, 5 Jan 2023 20:25:46 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=pali@kernel.org Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 6FF6D61BCD; Thu, 5 Jan 2023 19:25:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B4DBBC433F0; Thu, 5 Jan 2023 19:25:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1672946744; bh=zmoOtQYIFEJyYUBraQYBx6eUo/SvSMWW55HTUSN4Mzw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=fo6AtRmQU6LG9juUapPxy6RURYqH8O016zH9Venlodz6ft+CHu/7ega+rbPiz9xoi HOA+N2uBlvjG+U45lvSaHhJAh44DojVCCXgyw5and8Tj33bJ1TbH/PdG6VfZVlNuax cF13fbXj3jAKWd+1h2Q74Zf6860jaNzByILeT7o56UhDNosO8x0oApNU9TiMWl8nUC EzNpsmx5h6kfoUCFzUvr9k1qLt1BD91n1RuTFsyQe2NajdFuyaVAbx50GuS5sYWRBV 8+I92HaZY+yaqPVmJGY23DRb4p/Nm4iooeRM0u82drEwN4q6lDM3ZbAENuGQtboPJM r5mgJ3dTyQZPg== Received: by pali.im (Postfix) id C9102AC9; Thu, 5 Jan 2023 20:25:41 +0100 (CET) Date: Thu, 5 Jan 2023 20:25:41 +0100 From: Pali Rohar To: Patrick DELAUNAY Cc: Marek Vasut , u-boot@lists.denx.de, Patrice Chotard , Simon Glass , Tom Rini Subject: Re: [PATCH] arm: stm32mp: Fix board_get_usable_ram_top() again Message-ID: <20230105192541.5bybysemi6yivdd4@pali> References: <20230105012222.238075-1-marex@denx.de> <99e68254-e6a1-9653-54fb-61d64d8e02e1@foss.st.com> <300a8101-2395-f04d-827e-dea622470f95@foss.st.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <300a8101-2395-f04d-827e-dea622470f95@foss.st.com> User-Agent: NeoMutt/20180716 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.6 at phobos.denx.de X-Virus-Status: Clean Ok, so it is working... On Thursday 05 January 2023 19:31:19 Patrick DELAUNAY wrote: > I tested on STM32MP157C-EV1 on my side... > > with 1GiB mermory size > > U-Boot is booting on next TOP (for trusted boot with TF-A and OP-TEE) > > > > U-Boot 2023.01-rc4-00386-gb429e78942de (Jan 05 2023 - 17:44:04 +0100) > > stm32_smc: Failed to exec svc=82001003 op=1 in secure mode (err = -1) > stm32_smc: Failed to exec svc=82001003 op=1 in secure mode (err = -1) > CPU: STM32MP157C?? Rev.Z > Model: STMicroelectronics STM32MP157C eval daughter on eval mother > Board: stm32mp1 in trusted mode (st,stm32mp157c-ev1) > stm32_smc: Failed to exec svc=82001003 op=1 in secure mode (err = -1) > DRAM:  1 GiB > .... > > > STM32MP> bdinfo > boot_params = 0x00000000 > DRAM bank   = 0x00000000 > -> start    = 0xc0000000 > -> size     = 0x3ffff000         <<<<<< the patch is applied - 4kiB here !!! But this is wrong. DRAM bank size should not be changed. I think that in U-Boot is another issue which propagates mapped U-Boot RAM size/range to the places where should be real DDR size. > flashstart  = 0x00000000 > flashsize   = 0x00000000 > flashoffset = 0x00000000 > baudrate    = 115200 bps > relocaddr   = 0xfdb1d000 > reloc off   = 0x3da1d000 > Build       = 32-bit > current eth = ethernet@5800a000 > ethaddr     = 00:80:e1:01:60:da > IP addr     = > fdt_blob    = 0xfbb040a0 > new_fdt     = 0xfbb040a0 > fdt_size    = 0x00016de0 > Video       = display-controller@5a001000 inactive > lmb_dump_all: >  memory.cnt  = 0x1 >  memory[0]    [0xc0000000-0xffffefff], 0x3ffff000 bytes flags: 0        <<<< >  reserved.cnt  = 0x6 >  reserved[0]    [0x10000000-0x10045fff], 0x00046000 bytes flags: 4 >  reserved[1]    [0x30000000-0x3003ffff], 0x00040000 bytes flags: 4 >  reserved[2]    [0x38000000-0x3800ffff], 0x00010000 bytes flags: 4 >  reserved[3]    [0xe8000000-0xefffffff], 0x08000000 bytes flags: 4 >  reserved[4]    [0xfbaffbb8-0xfdffffff], 0x02500448 bytes flags: 0 >  reserved[5]    [0xfe000000-0xffffffff], 0x02000000 bytes flags: 4     <<<< > devicetree  = board > arch_number = 0x00000000 > TLB addr    = 0xfdff0000 > irq_sp      = 0xfbb03e10 > sp start    = 0xfbb03e00 > Early malloc usage: 2924 / 20000 > STM32MP> > > > But we have strange LMB reserved memory [0xfe000000-0xffffffff] from DT > > => it is outside of  memory[0]    [0xc0000000-0xffffefff] > > > I think the -4 kiB should be removed at least.... > > > > I test also with basic boot = SPL and U-Boot, no issue on my side > > > > Patrick >