From patchwork Mon Dec 12 00:09:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcel Ziswiler X-Patchwork-Id: 1714760 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4NVhst1C6hz23pD for ; Mon, 12 Dec 2022 11:13:06 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 299BD853F9; Mon, 12 Dec 2022 01:10:54 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=ziswiler.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 C3D79853BE; Mon, 12 Dec 2022 01:10:18 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mout.perfora.net (mout.perfora.net [74.208.4.194]) (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 52A59853DB for ; Mon, 12 Dec 2022 01:10:04 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=ziswiler.com Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=marcel@ziswiler.com Received: from toolbox.int.toradex.com ([106.185.144.150]) by mrelay.perfora.net (mreueus003 [74.208.5.2]) with ESMTPSA (Nemesis) id 0MN27i-1p2JSw2l1k-006fYi; Mon, 12 Dec 2022 01:09:59 +0100 From: Marcel Ziswiler To: u-boot@lists.denx.de Cc: Marcel Ziswiler Subject: [PATCH v1 16/16] apalis-imx8: update env memory layout Date: Mon, 12 Dec 2022 01:09:30 +0100 Message-Id: <20221212000930.45505-17-marcel@ziswiler.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221212000930.45505-1-marcel@ziswiler.com> References: <20221212000930.45505-1-marcel@ziswiler.com> MIME-Version: 1.0 X-Provags-ID: V03:K1:OtLNs9mwyRVRyrtl+rzAl6N3MCz1SHuJFmjUOgqRJGUQMvZUV5c NKchkPMhVBCvuOU/e38sQM7ibhazBCwLFbHaKbgO0/H4nc2E2N7arT1TwtWZRRAOXrdN1Tv knm11HxR4h7fAlXd4EwaSxWtMrhKjkJvg6JtWynZsq9CqbbSHo9bgIXnkXesopfgV6aK+SU MhoyUPH8CzQ8ZKPTgHuHA== UI-OutboundReport: notjunk:1;M01:P0:3DVVICSZIFI=;5n6ublRWYD8eKVEUTiE2XUkxwF6 QegT1CMyw50dlY3AJRFyeNPD/CthiJm5S84y/79Qk0zDSVJbbULD+RZaqZvGwU3QuouY8vyKf QdtTUT5ionOFD9Ou5EAaiAwzms2DqjgheYXENU8Gkf5nHlpmhiXAxLJOq9JxRKeghL9Oamddm DbXXurV7TDv9yphd+fCNV3Df4XdgmV1i4P5jTkuB+i1xtkisWeNsuSPJWaOo0HPx75Mm6N1tc 6XmEstUqT6iXDGf17k+G25PqhyIyHGO6tddhyp9TSiKgWgyfHG4sjRFlcGmgwAkm7uJPIV2rs PZFOkrQRXSnAt+7sHF+XxAOQ2LJMV5Sl55XorS3fLZtov84SGDslP8+emRLEhQ1RIWkP8x9Yx /0y7hUghsTMNDrmHMgxstbc3O4mIObALMgP59H8pVornH63hys2pfpo1cQHgXWs3wXwZq/KcN ftBzsTsQH6lNr7c2OPTuHwxk2v1PbCorz0LbCd4J3WiYTrkKjryGZr0s7fr7QR+X4iNu8cmIM xNixh/oDjk7i8y1MJkdREZnPx2ntYBZZZ1wFFqgEhhlIyWhrBaICTYsjK6UbY+e+VO/7s5n/0 MMFu8PcukDbgoaQmTVovPLbrUpyxQIHvdsWF6YITFxjqhv8a0K0OeCi9rOsypp/Vul3ALzP1S X1p86gw7d/N0YW8YLbPzP2fD4A40LrFViD0V3lWEJA== 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 From: Marcel Ziswiler Update the distro config env memory layout for the Apalis iMX8 aka QuadMax: - kernel_comp_addr_r=0xf0000000 temporary area for uncompressing (ie FIT images or Image.gz booted using booti) - kernel_comp_size=0x08000000 - loadaddr=0x95400000 avoiding any reserved areas located before that - fdt_addr_r = loadaddr + 128MB - allows for 128MB kernel - scriptaddr = fdt_addr_r + 512KB - allows for 512KB fdt - ramdisk_addr_r = scriptaddr + 512KB - allows for 512KB script Basic idea of memory layout taken from commit fd5c7173ade4 ("imx8m{m,n}_venice: update env memory layout"). However, moved past any reserved areas to avoid any kind of conflicts. Note that for our regular BSP Layers and Reference Images for Yocto Project an updated distro boot script is required (see meta-toradex-bsp-common/recipes-bsp/u-boot/u-boot-distro-boot). Signed-off-by: Marcel Ziswiler --- configs/apalis-imx8_defconfig | 2 +- include/configs/apalis-imx8.h | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/configs/apalis-imx8_defconfig b/configs/apalis-imx8_defconfig index 019846e1af2..8acf645167e 100644 --- a/configs/apalis-imx8_defconfig +++ b/configs/apalis-imx8_defconfig @@ -10,7 +10,7 @@ CONFIG_DM_GPIO=y CONFIG_DEFAULT_DEVICE_TREE="fsl-imx8qm-apalis" CONFIG_TARGET_APALIS_IMX8=y CONFIG_SYS_PROMPT="Apalis iMX8 # " -CONFIG_SYS_LOAD_ADDR=0x80280000 +CONFIG_SYS_LOAD_ADDR=0x95400000 CONFIG_SYS_MEMTEST_START=0x88000000 CONFIG_SYS_MEMTEST_END=0x89000000 CONFIG_DISTRO_DEFAULTS=y diff --git a/include/configs/apalis-imx8.h b/include/configs/apalis-imx8.h index c54c4d0465a..c4f2cd604d5 100644 --- a/include/configs/apalis-imx8.h +++ b/include/configs/apalis-imx8.h @@ -15,10 +15,12 @@ #define CONFIG_SERVERIP 192.168.10.1 #define MEM_LAYOUT_ENV_SETTINGS \ - "fdt_addr_r=0x84000000\0" \ - "kernel_addr_r=0x82000000\0" \ - "ramdisk_addr_r=0x94400000\0" \ - "scriptaddr=0x87000000\0" + "fdt_addr_r=0x9d400000\0" \ + "kernel_addr_r=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \ + "kernel_comp_addr_r=0xf0000000\0" \ + "kernel_comp_size=0x08000000\0" \ + "ramdisk_addr_r=0x9d500000\0" \ + "scriptaddr=0x9d480000\0" /* Enable Distro Boot */ #define BOOT_TARGET_DEVICES(func) \