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 CBD18EB64DA for ; Tue, 18 Jul 2023 14:57:24 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 4B775866E1; Tue, 18 Jul 2023 16:57:22 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.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=gmail.com header.i=@gmail.com header.b="RNvPxtkb"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C544A866FC; Tue, 18 Jul 2023 16:57:20 +0200 (CEST) Received: from mail-ed1-x533.google.com (mail-ed1-x533.google.com [IPv6:2a00:1450:4864:20::533]) (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 465518668B for ; Tue, 18 Jul 2023 16:57:18 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=knaerzche@gmail.com Received: by mail-ed1-x533.google.com with SMTP id 4fb4d7f45d1cf-51bece5d935so8294241a12.1 for ; Tue, 18 Jul 2023 07:57:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1689692238; x=1692284238; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=nwQZwZRpYU8kzS3glB9QkAGRkdxJyjVUoefEZ+SK5vA=; b=RNvPxtkb8DZ5BdU5H/FZBsF6Vu91MwukcBBcxd5ndpdpAdWu50myIros1f/OF5KbI3 S6BxN7+OfNlXoFXpUu85E1ISOWx71rh/Ff77Pk6yON+kGYzJXwXrQnbllPFbgNXDIklO wbNhOK21obJrS+7XoJfXM/3HbJs8KjrbyuS/ktlRocl6IXhpzNG7+1fkTRGX+4xaZL8t 0cyMhACwLbxP6PoFlgZbiFg5tNm1hdGyIlEzg/IBE0NEKhUMTegdR3pzxe0XwC4YbJXN zoHCCYJDlB+79tbmgnQjbmXi+uD3DR3eaelnArs3yZBYbHQ8ztC56wVWVce8+soFcWWK R3QA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689692238; x=1692284238; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=nwQZwZRpYU8kzS3glB9QkAGRkdxJyjVUoefEZ+SK5vA=; b=l1ZcNu3jfAzpZDyS1DtTH6cd6+oMdtTpOGf8M9+G3TpVioOofLC5G5/mJA+iy2gg8l YwGJ6nQ7TYvrb+1SRrTRNpbduolGIloXpcgC4HSt0ARxnA+igzsxDjQeVKk/HGrhdzJX d0MLx47mG2HjURfKsTHNE+LhBr00fxE7JudkTteBJfdh08XAsbHEdORI/UBfApxBPSMf ArtkoJ1HCMz2bfOUgTtGXZgvhrC5dcqXj9Zrxq95TmMfW0zWYCb/hDPf6aSa8Hxa4ck3 68IVMv/FBk1nhxGiNObSFBQvvTW4inmdtRUSEA3TRPv6j8neABt2TUa7dVfyCoToaqwm u85Q== X-Gm-Message-State: ABy/qLYgFWDo7/CbWWr6Hd9L6TSUnlcf1JFSGGtxAyOBNLRKut26ZME6 0PIpb4xX4E5rfq3uoL7NFpydGcljBQ== X-Google-Smtp-Source: APBJJlH1OIu81rOGRU2E0CHnhyduwMDhHvbJSI+0hmLECdvvcA/VJcpWwFH6NLn1GGKxFDYq+G59wA== X-Received: by 2002:a05:6402:12c1:b0:51d:7fa6:62ca with SMTP id k1-20020a05640212c100b0051d7fa662camr144764edx.14.1689692237653; Tue, 18 Jul 2023 07:57:17 -0700 (PDT) Received: from U4.fritz.box ([2001:9e8:b960:df00:3afe:540e:d7ee:98ac]) by smtp.gmail.com with ESMTPSA id f25-20020aa7d859000000b0051de20c59d7sm1340797eds.15.2023.07.18.07.57.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Jul 2023 07:57:17 -0700 (PDT) From: Alex Bee To: u-boot@lists.denx.de, Kever Yang , Philipp Tomsich , Simon Glass Cc: Alex Bee Subject: [PATCH v2 0/5] rockchip: Support OP-TEE binaries in ARM FIT images Date: Tue, 18 Jul 2023 16:57:10 +0200 Message-ID: <20230718145715.1280201-1-knaerzche@gmail.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230716081034.1196995-1-knaerzche@gmail.com> References: <20230716081034.1196995-1-knaerzche@gmail.com> 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 This adds support for OP-TEE binaries to Rockchip's ARM FIT image generation by binman. Currently there is an extra (and outdated) rockchip-optee.dtsi which can create an u-boot.itb which can also hold the OP-TEE binary. It has to be included manually in the respective SoC-specific device trees. But even if that is done, it won't be merged in rockchip-u-boot.bin, which aims to be platform-consistent. The bootable FIT image must therefore currently be created manually. This will be done automatically with this patch-set and a single u-boot-rockchip.bin file with an bootable FIT image containing all binaries will be generated. Additionally this series adds a configuration option which has to be set if a vendor-provided OP-TEE binary is used. This is required as those use a different calling convention. For RK3036, RK3128 and RK3288 SoCs this currently the only option to get an TEE, as no upstream implementation exists for them. Those binaries can be found at [1] There are also some adaptions for RK322x in order to successfully use that FIT image and some changes to the documenation. This series has been tested on RK3229 (both vendor and upstream OP-TEE) and RK3288 (vendor implementation only). [1] https://github.com/rockchip-linux/rkbin Changes in v2: 1/5: * whitespace fixes in rockchip-u-boot.dtsi 2/5: * instead of dropping CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN, set it to the current default value 3/5: * fix: `select SPL_OPTEE_IMAGE` instead of `select CONFIG_SPL_OPTEE_IMAGE` in Kconfig 4/5: * refer to use "tee-raw.bin" instead of "tee-pager_v2.bin" in README (Jerome Forissier) 5/5: * drop empty line in Kconfig help text * fix subject "OPTEE" -> "OP-TEE" * ROCKCHIP_OPTEE_BINARY should depend on SPL_OPTEE_IMAGE only, as the latter depends on SPL_FIT already (via `depends on SPL_LOAD_FIT || SPL_LOAD_FIT_FULL`) Alex Bee (5): rockchip: Support OP-TEE for ARM in FIT images created by binman configs: evb-rk3229: Increase SPL_STACK_R_MALLOC_SIMPLE_LEN rockchip: RK322x: Select SPL_OPTEE_IMAGE rockchip: evb_rk3229: Update/fix README optee: Support Rockchip OP-TEE binaries arch/arm/dts/rk3288-u-boot.dtsi | 1 - arch/arm/dts/rockchip-optee.dtsi | 64 --------------------------- arch/arm/dts/rockchip-u-boot.dtsi | 38 ++++++++++++++-- arch/arm/mach-rockchip/Kconfig | 9 ++++ board/rockchip/evb_rk3229/README | 72 ++++++++++++++++++++----------- common/spl/spl_optee.S | 4 ++ configs/evb-rk3229_defconfig | 2 +- 7 files changed, 97 insertions(+), 93 deletions(-) delete mode 100644 arch/arm/dts/rockchip-optee.dtsi base-commit: 890233ca5569e5787d8407596a12b9fca80952bf -- 2.41.0