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 EB2CEEB64D8 for ; Thu, 22 Jun 2023 17:30:26 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A4F9D86301; Thu, 22 Jun 2023 19:30:22 +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 Received: by phobos.denx.de (Postfix, from userid 109) id 72F8A862B9; Thu, 22 Jun 2023 19:30:20 +0200 (CEST) Received: from finn.localdomain (finn.gateworks.com [108.161.129.64]) (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 446DD862F1 for ; Thu, 22 Jun 2023 19:30:16 +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: from 068-189-091-139.biz.spectrum.com ([68.189.91.139] helo=tharvey.pdc.gateworks.com) by finn.localdomain with esmtp (Exim 4.93) (envelope-from ) id 1qCO8H-006YO6-0R; Thu, 22 Jun 2023 17:30:09 +0000 From: Tim Harvey To: u-boot@lists.denx.de Cc: Stefano Babic , Fabio Estevam , "NXP i . MX U-Boot Team" , Frieder Schrempf , Marcel Ziswiler , Ying-Chun Liu , Peng Fan , Adam Ford , Manoj Sai , Matteo Lisi , Marek Vasut , Tim Harvey Subject: [PATCH] arm: dts: imx8m: add OPTEE_LOAD_ADDRESS config and tee.bin Date: Thu, 22 Jun 2023 10:30:06 -0700 Message-Id: <20230622173006.3921891-1-tharvey@gateworks.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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.8 at phobos.denx.de X-Virus-Status: Clean Add a Kconfig for OPTEE_LOAD_ADDRESS which adds tee.bin to the imx8m{m,n,p} FIT image. Prior to using binman for image creation the presense of tee.bin in the directory would cause mkimage_fit_atf.sh to add the tee.bin node to the FIT image. Once boards moved away from using CONFIG_SPL_FIT_GENERATOR this was lost. This patch restores that functionality. A Kconfig option is added due to binman not being able to utilize env variables. Signed-off-by: Tim Harvey --- arch/arm/dts/imx8mm-u-boot.dtsi | 19 +++++++++++++++++++ arch/arm/dts/imx8mn-u-boot.dtsi | 19 +++++++++++++++++++ arch/arm/dts/imx8mp-u-boot.dtsi | 19 +++++++++++++++++++ drivers/tee/optee/Kconfig | 7 +++++++ 4 files changed, 64 insertions(+) diff --git a/arch/arm/dts/imx8mm-u-boot.dtsi b/arch/arm/dts/imx8mm-u-boot.dtsi index a843bb851eaf..61f907a4743b 100644 --- a/arch/arm/dts/imx8mm-u-boot.dtsi +++ b/arch/arm/dts/imx8mm-u-boot.dtsi @@ -124,6 +124,21 @@ type = "atf-bl31"; }; }; + +#ifdef CONFIG_OPTEE_LOAD_ADDRESS + tee { + description = "TEE firmware"; + type = "firmware"; + arch = "arm64"; + compression = "none"; + load = ; + entry = ; + + tee_blob: blob-ext { + filename = "tee.bin"; + }; + }; +#endif #endif binman_fip: fip { @@ -154,7 +169,11 @@ fdt = "fdt-SEQ"; firmware = "uboot"; #ifndef CONFIG_ARMV8_PSCI +#ifdef CONFIG_OPTEE_LOAD_ADDRESS + loadables = "atf", "tee"; +#else loadables = "atf"; +#endif #endif }; }; diff --git a/arch/arm/dts/imx8mn-u-boot.dtsi b/arch/arm/dts/imx8mn-u-boot.dtsi index 86c9a6cd67f0..15cec4ffab44 100644 --- a/arch/arm/dts/imx8mn-u-boot.dtsi +++ b/arch/arm/dts/imx8mn-u-boot.dtsi @@ -181,6 +181,21 @@ type = "atf-bl31"; }; }; + +#ifdef CONFIG_OPTEE_LOAD_ADDRESS + tee { + description = "TEE firmware"; + type = "firmware"; + arch = "arm64"; + compression = "none"; + load = ; + entry = ; + + tee_blob: blob-ext { + filename = "tee.bin"; + }; + }; +#endif #endif binman_fip: fip { @@ -211,7 +226,11 @@ fdt = "fdt-SEQ"; firmware = "uboot"; #ifndef CONFIG_ARMV8_PSCI +#ifdef CONFIG_OPTEE_LOAD_ADDRESS + loadables = "atf", "tee"; +#else loadables = "atf"; +#endif #endif }; }; diff --git a/arch/arm/dts/imx8mp-u-boot.dtsi b/arch/arm/dts/imx8mp-u-boot.dtsi index 8c9d6412ccb5..b46fc7eeed0d 100644 --- a/arch/arm/dts/imx8mp-u-boot.dtsi +++ b/arch/arm/dts/imx8mp-u-boot.dtsi @@ -145,6 +145,21 @@ type = "atf-bl31"; }; }; + +#ifdef CONFIG_OPTEE_LOAD_ADDRESS + tee { + description = "TEE firmware"; + type = "firmware"; + arch = "arm64"; + compression = "none"; + load = ; + entry = ; + + tee_blob: blob-ext { + filename = "tee.bin"; + }; + }; +#endif #endif @fdt-SEQ { @@ -166,7 +181,11 @@ fdt = "fdt-SEQ"; firmware = "uboot"; #ifndef CONFIG_ARMV8_PSCI +#ifdef CONFIG_OPTEE_LOAD_ADDRESS + loadables = "atf", "tee"; +#else loadables = "atf"; +#endif #endif }; }; diff --git a/drivers/tee/optee/Kconfig b/drivers/tee/optee/Kconfig index 9dc65b0501e2..09a8bbd2fafd 100644 --- a/drivers/tee/optee/Kconfig +++ b/drivers/tee/optee/Kconfig @@ -14,6 +14,13 @@ if OPTEE || SANDBOX menu "OP-TEE options" +config OPTEE_LOAD_ADDRESS + hex "Load address of OPTEE" + help + Defines the load and entry address used by U-Boot FIT images + for tee.bin. This address must match the link address that + tee.bin was built with. + config OPTEE_TA_AVB bool "Support AVB TA" default y -- 2.25.1