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,DKIM_SIGNED, DKIM_VALID,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 CEA3BC432BE for ; Thu, 26 Aug 2021 16:39:42 +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 A217E60E75 for ; Thu, 26 Aug 2021 16:39:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org A217E60E75 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=gateworks.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id C828383140; Thu, 26 Aug 2021 18:39:39 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=gateworks.com 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=gateworks-com.20150623.gappssmtp.com header.i=@gateworks-com.20150623.gappssmtp.com header.b="IN3AJ6ir"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D4B6183140; Thu, 26 Aug 2021 18:39:37 +0200 (CEST) Received: from mail-pg1-x530.google.com (mail-pg1-x530.google.com [IPv6:2607:f8b0:4864:20::530]) (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 AA289831AC for ; Thu, 26 Aug 2021 18:39:34 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=gateworks.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=tharvey@gateworks.com Received: by mail-pg1-x530.google.com with SMTP id w7so2407408pgk.13 for ; Thu, 26 Aug 2021 09:39:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gateworks-com.20150623.gappssmtp.com; s=20150623; h=mime-version:from:date:message-id:subject:to:cc; bh=cAoN5rA1lemMojU0gui6DBRRR2ITSyxXlcF9PlUTLPo=; b=IN3AJ6iryLWm1/rGKJCCbxcJAMDolJ6GFlZzjLTQrcIAjEYPheJXC9yfXE45MiTWRg zyArUu3qMJsh8iHEAfwH8OJc9lGMHGSq0iAkQLhqLy6qNHiIaTT4c6cDaBFZte8/+gyy XRzrLXnZo2Vs+1eX8esd/cztKUa39GKL6bUtCDSzFU/EN824+ViMM6OhZWw8Ql+vUDUx GvFiF9TncbWnhaJdlbjVImyOVfeIbGJwiMbk0P99iLXithVJUD+tW+6YYZRBWRFgD019 iGmfNMCC8AYojkxU6BkRjlB4dHmMkh938EdJg+vj4RAafjmyI+ZyLOqESEGNyK/WHq5V EoDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc; bh=cAoN5rA1lemMojU0gui6DBRRR2ITSyxXlcF9PlUTLPo=; b=ilrA01qazvVteSwU8pzpkBglK9iPuVdcBpEoq372DLxJQXkp9PLQfEmDxfCj+VYlhj MagtgKBcHMyK6HK/NRqp52yV7w9598YRRLxgEbmcNDqb40QZukfLv8kl0SzXitVUv/ji 51VEKqSWijrXy6NWwnq8bkxtrtb/Qf7kcCQDOnwE2HwYUjeaq4RcaQu/cYloU3C0TQ63 Vx3LwuG829IvqrP2iRTX6/BEta+n+xs4otgeNPa+/ppufG0PmWf3XTlnGhWQ2IT6nurs h5ijfxaOCRTe683e4oOxgHuSECfdePctLHjpF7jXYIcHOmoHauOQVJ9LycwLYraPsi4N nC2w== X-Gm-Message-State: AOAM531jiCVOQFK9Ri8EJeD/7EMmoUitIq82U8vExWwmcSVIym6QyVN3 owyo832WBs07Xzw2XrUDoiC0aFFAKfwa/JxhRDzpzLUa2E9ZRg== X-Google-Smtp-Source: ABdhPJzXvtSOmleg7ZyaZSbpoFCBfBXLri318UHGNcIVAKR17gQ8b5nDOfLtIGC/0jNQqwCCbxziIFhlcGjKZLhY0Xk= X-Received: by 2002:a65:4486:: with SMTP id l6mr4047104pgq.145.1629995971742; Thu, 26 Aug 2021 09:39:31 -0700 (PDT) MIME-Version: 1.0 From: Tim Harvey Date: Thu, 26 Aug 2021 09:39:20 -0700 Message-ID: Subject: imx8mm memory env in U-Boot To: u-boot Cc: Adam Ford , "Ying-Chun Liu (PaulLiu)" , Peng Fan , Jagan Teki , Matteo Lisi , Fabio Estevam , Stefano Babic , Teresa Remmet , Oleksandr Suvorov , Marcel Ziswiler , Igor Opaniuk Content-Type: text/plain; charset="UTF-8" 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 Greetings, I'm trying to understand what the best memory usage is in U-Boot for IMX8M boards for generic distro configs such as: loadaddr, kernel_addr_r, fdt_addr_r, ramdisk_addr, scriptaddr. My understanding is that the following is a good rule of thumb: loadaddr = DDR start + 32MB (as FIT images may load kernel at DDR start; but this only allows for a 32MB kernel) kernel_addr_r = $loadaddr fdt_addr_r = $kernel_addr_r + 128MB (allows you up to 128MB for your kernel; handy if you want a kernel with internal ramdisk) ramdisk_addr = fdt_addr_r + 512KB (512KB should be plenty for a dt) scriptaddr = $loadaddr Looking at the various imx8mm boards upstream they are kind of all over the place but do follow some patterns likely due to some of us just going with what prior boards used. While I'm at it I've encountered a couple other questions: - why on IMX8MM is CONFIG_LOADADDR is 0x40480000 when DDR starts at 0x40000000. Why the 4608KB offset? - what is CONFIG_SYS_INIT_RAM_SIZE? Most boards are setting this to 2MB but a couple (cl-iot-gate/phycore) set it to 512KB - what are people using for the load address for the kernel within FIT images? I expect start of DDR is appropriate (0x40000000) however for whatever reason I've been using 0x40200000. This plays into the env as you can't overlap where you loaded the FIT image with where you told the FIT image to relocate the kernel to. Best regards, Tim