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 17D10C433EF for ; Thu, 10 Mar 2022 17:02:40 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 3716183ABC; Thu, 10 Mar 2022 18:02:38 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.b="Sa7V4jLj"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4540983ABE; Thu, 10 Mar 2022 18:02:36 +0100 (CET) Received: from mail-qt1-x82c.google.com (mail-qt1-x82c.google.com [IPv6:2607:f8b0:4864:20::82c]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id ABB7F83ABC for ; Thu, 10 Mar 2022 18:02:31 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-qt1-x82c.google.com with SMTP id u29so5121290qtc.6 for ; Thu, 10 Mar 2022 09:02:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=ZxLxhsb4E1ThnDQqBx6QEIAsgQPNb7+LT4wEUcT2D0w=; b=Sa7V4jLj0i0xjvy849EAzNdh6rWvXP32Ngkuh4BZZnwPP9wRJ0fhYnOTA+kL+j4uR1 +0XbDe+bjXa6Xe+Yn9zZ7DROFh5hkDiwRCmbmg84FNSs3icBcziAY0yrdN5KB/FMpANu vxu1cNJ1gMYYm+ljiTLpbQRtayXbIqJuY3S5A= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=ZxLxhsb4E1ThnDQqBx6QEIAsgQPNb7+LT4wEUcT2D0w=; b=FaROko1t9Rl59axGLi1trP/ncYBTWOeZllsQnIt+uvVQ0waaqHXsYV2AxN98y5n+dK WqhFsKpF3L+asPf5z36ipIsmSMzkAOtvCsmiljRKdkpBbSp63Kim86ziKtPuRjj32PLW w2MXrZnY/uebiyEWEWRe06J2/GvDDFEkewSeCnc7liSTKMUpNsKNwZbMDWy8M1aACfW6 mnREQrzf/2v+1K/UvJ8w86/a9cFvYvR2ly3r15a2AHCyaFvYFr+8Ixg7GcFcCX6X8uI1 C9MxYBh5JoUu+VdPUHC0k8cVcAP9OWh86sn3yCpotSBawUAP1YuZyZPyoZsmrp42cLRc 89wQ== X-Gm-Message-State: AOAM530QIZgZCxjkaVe2e9rP+Zbq32VwKyI9Jd5Hk4AtT9IYKa/viJJV Ccpi9CIGCmB0BuLtjmmgwNyeQbfyWCUOYIz9 X-Google-Smtp-Source: ABdhPJw7Admdz5cUor9mWWUTlvJsOmTWKFsHyONHFlSoSbkwTIYJKKfaS2vkXrC/inQSLLgtwN9Z0Q== X-Received: by 2002:a05:622a:1056:b0:2e1:a467:61b4 with SMTP id f22-20020a05622a105600b002e1a46761b4mr4646251qte.576.1646931750347; Thu, 10 Mar 2022 09:02:30 -0800 (PST) Received: from bill-the-cat (2603-6081-7b01-cbda-2ef0-5dff-fedb-a8ba.res6.spectrum.com. [2603:6081:7b01:cbda:2ef0:5dff:fedb:a8ba]) by smtp.gmail.com with ESMTPSA id t207-20020a3746d8000000b0067b33b6a4efsm2453292qka.21.2022.03.10.09.02.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Mar 2022 09:02:29 -0800 (PST) Date: Thu, 10 Mar 2022 12:02:27 -0500 From: Tom Rini To: Tim Harvey Cc: Stefano Babic , "NXP i . MX U-Boot Team" , U-Boot-Denx , Heiko Thiery , Fabio Estevam Subject: Re: [PATCH] imx8m{m,n}_venice: update env memory layout Message-ID: <20220310170227.GO5020@bill-the-cat> References: <20220218232000.4790-1-tharvey@gateworks.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="NIjw7+ppZq6Cg8/r" Content-Disposition: inline In-Reply-To: X-Clacks-Overhead: GNU Terry Pratchett 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 --NIjw7+ppZq6Cg8/r Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Mar 10, 2022 at 07:59:30AM -0800, Tim Harvey wrote: > On Sun, Feb 27, 2022 at 4:22 AM Fabio Estevam wrote: > > > > Hi Tim, > > > > [Adding Tom on Cc] > > > > On Sat, Feb 26, 2022 at 6:37 PM Tim Harvey wrot= e: > > > > > > On Sat, Feb 26, 2022 at 5:15 AM Fabio Estevam wr= ote: > > > > > > > > Hi Tim, > > > > > > > > On Fri, Feb 18, 2022 at 8:20 PM Tim Harvey = wrote: > > > > > > > > > > Update distro config env memory layout: > > > > > - loadaddr=3D0x48200000 allows for 130MB area for uncompressing = (ie FIT > > > > > images, kernel_comp_addr_r) > > > > > - fdt_addr_r =3D loadaddr + 128MB - allows for 128MB kernel > > > > > - scriptaddr =3D fdt_addr_r + 512KB - allows for 512KB fdt > > > > > - ramdisk_addr_r =3D scriptaddr + 512KB - allows for 512KB script > > > > > > > > > > Signed-off-by: Tim Harvey > > > > > > > > What about following the suggestion from Heiko at: > > > > https://patchwork.ozlabs.org/project/uboot/patch/20220216122514.165= 9879-2-heiko.thiery@gmail.com/ > > > > > > Fabio, > > > > > > I don't understand why include/configs/ti_armv7_common.h is always > > > recommended when it comes to address maps. The comment there doesn't > > > read that well and there are several addresses that I believe are > > > outdated or uncommon (fdtaddr,rdaddr are outdated and it seems > > > loadaddr could be used for dtboaddr) > > > > > > In my opinion what is relevant when choosing an addressing scheme is > > > how much space you want to allow for kernel, fdt, scripts, ramdisk. > > > > > > ti_armv7_common.h allows for > > > kernel/loadaddr:96M (too small in my opinion on modern boards) > > > fdt:512M (makes sense) > > > script:32M (excessive, and I don't understand why this is below > > > loadaddr vs stacked on top of loadaddr like fdt) > > > ramdisk: depends on mem size as its the highest addr (makes sense) > > > > > > For my more modern boards with typically 1-4GiB of dram, I wanted to > > > allow for more than 96M for a kernel (kernel+ramdisk, fit image etc) > > > as I commonly exceed 96M when using a buildroot kernel+rootfs that has > > > something like gstreamer support for imx6/imx8 which is why I came up > > > with a different scheme which I document well in the commit log as > > > - loadaddr=3D0x48200000 allows for 130MB area for uncompressing (ie = FIT > > > images, kernel_comp_addr_r) > > > - fdt_addr_r =3D loadaddr + 128MB - allows for 128MB kernel > > > - scriptaddr =3D fdt_addr_r + 512KB - allows for 512KB fdt > > > - ramdisk_addr_r =3D scriptaddr + 512KB - allows for 512KB script > > > > You bring good points and maybe we could use > > include/configs/imx8mm_venice.h as a good standard to follow :-) > > > > Reviewed-by: Fabio Estevam >=20 > Tom, >=20 > DId you have any feedback on this conversation about memory addresses? > I'm also wondering if anyone knows how we can define them to make it a > bit clearer about their sizes (some sort of macro foo that allows us > to defined them as sizes on top of a previous address). Alright, so, yeah, at this point it's true that ti_armv7_common.h could use some re-evaluation since it's been a while. What's probably the best path forward is something under doc/develop/ that explains what the important environment variables are, general max sizes and links to where those constraints come from and then an example or two. Especially since 32 and 64bit ARM have some different constraints (I want to say that the 96MB kernel size was a practical limitation, but would need to re-read the kernel docs and maybe check some notes again). --=20 Tom --NIjw7+ppZq6Cg8/r Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmIqLxoACgkQFHw5/5Y0 tyyf/QwAia1fc3LDkUvw/Eb4wyhwu7GqMikKIEcLyzaHUzlq7/TMBTwY3Rf1VhyF 2iCCizkKvJsi4WWFPo06Tg22mD0jMgrwtOo9HJdhEszYl+9DFd4ghBsE7mFjj/0i As+xtkkmvrkrLmms4uzlYS3Tpy0Xnu7MReddO4c6C0HgUpePNBiOftes9tCv/qyh Tm+u87pN4aAKbWMk6y6h9sz4FmSiwPwoJrN63c26xwC2eznvDu82iefIpjw9fWvH Rzs0K061GlYCT2hvaQPLsGzGQdtRM2aDpN9jAGxlBeDSHxE3R6umyMscSf3QvT98 WVZEyNSB5NFiUQRGH8/ADqxb4/TqDGV/b+Z9OxHMDvQGULop2KdM6UzDPJFLMTrM hqvt0KEaD0DXtK4+xn+Y9okb8sCXAgQb2K471xRcRu4KZD+KTpHNLpmn9qPjgUkl s1T9a00NtDJc4DmskN2VtvYfkv0UCg5AuMpGyDq+C1tVUAYpQ+mNNsNPQ0nTbntO f1zy2lnY =bFYb -----END PGP SIGNATURE----- --NIjw7+ppZq6Cg8/r--