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=-21.0 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham 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 1A142C4338F for ; Mon, 16 Aug 2021 11:38: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 7F54B63228 for ; Mon, 16 Aug 2021 11:38:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 7F54B63228 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=foss.st.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 701EC82F12; Mon, 16 Aug 2021 13:38:39 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=foss.st.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=foss.st.com header.i=@foss.st.com header.b="1qbvOSQV"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 6124D82F2B; Mon, 16 Aug 2021 13:38:37 +0200 (CEST) Received: from mx07-00178001.pphosted.com (mx08-00178001.pphosted.com [91.207.212.93]) (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 AE0038060B for ; Mon, 16 Aug 2021 13:38:32 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=foss.st.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=prvs=286253c946=patrice.chotard@foss.st.com Received: from pps.filterd (m0046660.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 17GBVgId003489; Mon, 16 Aug 2021 13:38:26 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h=subject : to : cc : references : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=selector1; bh=5lBVMGEBxBGhD5G5v7OPG1V78mPKC8tgtzbvCsF7z8Y=; b=1qbvOSQVe2BK1bLAVHnrA73imiKdtN7Pq7BiBiiF8FqXNls8FCgXa7H3tDQIulz4jrOl 4VdDoMGx+kGHbj54dV2jM/oPlZ5vqhadTI0Gt7MqIWPTUgCdimDdCYBBTs8c4i2L31Tv MxrgFVDmYT377jir+9EDYZkbOth1/AZw/lj2l5KA2dHZ/Y4/oKrToPN33HwjvOpwDjd5 3IbKdvEQF76Bda0YlGGDflQsVQa7HKlydKOaF8BwkGdKwqNbdA0GDWOWIEX4mFbg/dl4 eKtqUHvCUCOxqcKyzlbm2OXpuGLPnyV1+OFO0QqwNusMZuVrbAPDFHJBqAPC9x1POWnP pg== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com with ESMTP id 3afhp5j052-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 16 Aug 2021 13:38:26 +0200 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id D656C10002A; Mon, 16 Aug 2021 13:38:25 +0200 (CEST) Received: from Webmail-eu.st.com (sfhdag2node3.st.com [10.75.127.6]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id CA07B2309E4; Mon, 16 Aug 2021 13:38:25 +0200 (CEST) Received: from lmecxl0573.lme.st.com (10.75.127.46) by SFHDAG2NODE3.st.com (10.75.127.6) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 16 Aug 2021 13:38:25 +0200 Subject: Re: [PATCH v3 1/5] arm: stm32mp: add config for STM32IMAGE support To: Patrick Delaunay , CC: Yann GAUTIER , Ilias Apalodimas , Jean-Philippe ROMAIN , Simon Glass , Tom Rini , U-Boot STM32 References: <20210726092138.53762-1-patrick.delaunay@foss.st.com> <20210726111931.v3.1.I75c3a4359a6e42c20360fb1774a2e371a08a6270@changeid> From: Patrice CHOTARD Message-ID: <7b1c91b2-f04b-cac7-1117-e6ba301c8cb0@foss.st.com> Date: Mon, 16 Aug 2021 13:38:24 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <20210726111931.v3.1.I75c3a4359a6e42c20360fb1774a2e371a08a6270@changeid> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.75.127.46] X-ClientProxiedBy: SFHDAG1NODE1.st.com (10.75.127.1) To SFHDAG2NODE3.st.com (10.75.127.6) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.790 definitions=2021-08-16_04:2021-08-16, 2021-08-16 signatures=0 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 Hi Patrick On 7/26/21 11:21 AM, Patrick Delaunay wrote: > By default for trusted boot with TF-A, U-Boot (u-boot-nodtb) > is located in FIP container with its device tree and with > the secure monitor (provided by TF-A or OP-TEE). > The FIP file is loaded by TF-A BL2 and each components is > extracted at the final location. > > This patch add CONFIG_STM32MP15x_STM32IMAGE to request the > STM32 image generation for SOC STM32MP15x > when FIP container is not used (u-boot.stm32 is loaded by TF-A > as done previously to keep the backward compatibility). > > Signed-off-by: Patrick Delaunay > Reviewed-by: Patrice Chotard > --- > > (no changes since v1) > > arch/arm/mach-stm32mp/Kconfig | 7 +++++++ > arch/arm/mach-stm32mp/config.mk | 2 +- > board/st/stm32mp1/stm32mp1.c | 10 +++++++--- > configs/stm32mp15_trusted_defconfig | 1 + > 4 files changed, 16 insertions(+), 4 deletions(-) > > diff --git a/arch/arm/mach-stm32mp/Kconfig b/arch/arm/mach-stm32mp/Kconfig > index 0e59931679..b9e623bc3c 100644 > --- a/arch/arm/mach-stm32mp/Kconfig > +++ b/arch/arm/mach-stm32mp/Kconfig > @@ -56,6 +56,13 @@ config STM32MP15x > dual core A7 for STM32MP157/3, monocore for STM32MP151 > target all the STMicroelectronics board with SOC STM32MP1 family > > +config STM32MP15x_STM32IMAGE > + bool "Support STM32 image for generated U-Boot image" > + depends on STM32MP15x && TFABOOT > + help > + Support of STM32 image generation for SOC STM32MP15x > + for TF-A boot when FIP container is not used > + > choice > prompt "STM32MP15x board select" > optional > diff --git a/arch/arm/mach-stm32mp/config.mk b/arch/arm/mach-stm32mp/config.mk > index c30bf482f7..f7f5b77c41 100644 > --- a/arch/arm/mach-stm32mp/config.mk > +++ b/arch/arm/mach-stm32mp/config.mk > @@ -4,7 +4,7 @@ > # > > ifndef CONFIG_SPL > -INPUTS-y += u-boot.stm32 > +INPUTS-$(CONFIG_STM32MP15x_STM32IMAGE) += u-boot.stm32 > else > ifdef CONFIG_SPL_BUILD > INPUTS-y += u-boot-spl.stm32 > diff --git a/board/st/stm32mp1/stm32mp1.c b/board/st/stm32mp1/stm32mp1.c > index 2faf5c81b4..70bd4d1ed5 100644 > --- a/board/st/stm32mp1/stm32mp1.c > +++ b/board/st/stm32mp1/stm32mp1.c > @@ -105,10 +105,14 @@ int checkboard(void) > const char *fdt_compat; > int fdt_compat_len; > > - if (IS_ENABLED(CONFIG_TFABOOT)) > - mode = "trusted"; > - else > + if (IS_ENABLED(CONFIG_TFABOOT)) { > + if (IS_ENABLED(CONFIG_STM32MP15x_STM32IMAGE)) > + mode = "trusted - stm32image"; > + else > + mode = "trusted"; > + } else { > mode = "basic"; > + } > > fdt_compat = fdt_getprop(gd->fdt_blob, 0, "compatible", > &fdt_compat_len); > diff --git a/configs/stm32mp15_trusted_defconfig b/configs/stm32mp15_trusted_defconfig > index a58ea91d3e..6a8ccb1f3d 100644 > --- a/configs/stm32mp15_trusted_defconfig > +++ b/configs/stm32mp15_trusted_defconfig > @@ -7,6 +7,7 @@ CONFIG_SYS_MEMTEST_END=0xc4000000 > CONFIG_ENV_OFFSET=0x280000 > CONFIG_ENV_SECT_SIZE=0x40000 > CONFIG_DEFAULT_DEVICE_TREE="stm32mp157c-ev1" > +CONFIG_STM32MP15x_STM32IMAGE=y > CONFIG_TARGET_ST_STM32MP15x=y > CONFIG_CMD_STM32KEY=y > CONFIG_CMD_STM32PROG=y > Applied to u-boot-stm/master Thanks Patrice