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 6408BEB64DD for ; Sun, 16 Jul 2023 13:07:54 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id CDDE086332; Sun, 16 Jul 2023 15:07:44 +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="DYsvFqfr"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 396B8862A9; Sun, 16 Jul 2023 10:10:50 +0200 (CEST) Received: from mail-ej1-x636.google.com (mail-ej1-x636.google.com [IPv6:2a00:1450:4864:20::636]) (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 8228E801FE for ; Sun, 16 Jul 2023 10:10:47 +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-ej1-x636.google.com with SMTP id a640c23a62f3a-992dcae74e0so494481966b.3 for ; Sun, 16 Jul 2023 01:10:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1689495047; x=1692087047; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=N2q6tFP+Exh7DBkOV1M6y9WaxMMylEkwBb1NU0uA4+Y=; b=DYsvFqfrpBgpW6rnmZhGbwew3VBXE3hJVGmVUd58E1ZSYHga0V/NBLyiNMNZwvOVIs hUGMcCKxznrGj3FHb5kRimM9cR7k2SWUswl+AVYea4nY0cmlDfGl6vFqJxYwmLyM5L6t I3YI5H4QVwfWTY1NtCKBDvleNJOguMvfsew2IqUcgqXNinDmymbWnA25oGGqqp/VhIWR oSU3wRzEfRuhaK+j/In0upryri9m9SMzCMTNVt6QpShfaeBtF8OJqeJLczoTjmp6/EYb jbGb/N02gUxWqdS26v1UWRYKGaXfAmTLD8f8RkQOM7/OPUM6M2xHEaO4yjlvLrVUX2q3 +4nA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689495047; x=1692087047; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=N2q6tFP+Exh7DBkOV1M6y9WaxMMylEkwBb1NU0uA4+Y=; b=b7JmRHHJYLQnbpZHtFboyBt+fLIKeln79Fg7t94AqzgMEvm+rgUjfEUfwviD2WXfBK knUgbpu3oWzNt/mhmpek6bTNvjW2vjbaCJzCsF4fBVOMYuSgwGbCa7SmA+BzdJBeIldU GDKhcrWHIP2PWtpxn2VdhHiyNCtciwiBSVluoQpulKrnDd5SUlOgiYDlOfvru4h/Hknp hA0QFLXk4FRnDLVjYoDjH8tsP6LjwpDdZPm3t2GPC+ma5zHePyUw9OZJSwVOstTK8RM/ QH8Tuest8h07iayaHdJOl3L8bFsNXN/RUYys7Kex4E4E5QMa29sTVodgymEnYoUEvCVH LE/w== X-Gm-Message-State: ABy/qLZbOu+87nde0q9WztTOfgAfoEfTQjiqYaUu1WORTa7/UF7Yc1wB 9WK2/VDLxmIaRNQKzRbtw9REi9lEbg== X-Google-Smtp-Source: APBJJlExM1bICi6waTSJvwA3/LmjQzJE/MgbQwf1AIIsO/Md8ZnFycZPSlkPL2kykaP776BNecot/Q== X-Received: by 2002:a17:906:20d1:b0:987:e23f:6d7a with SMTP id c17-20020a17090620d100b00987e23f6d7amr9249931ejc.25.1689495046933; Sun, 16 Jul 2023 01:10:46 -0700 (PDT) Received: from U4.fritz.box ([2001:9e8:b94c:4700:19f7:e833:87a:bd6]) by smtp.gmail.com with ESMTPSA id gr10-20020a170906e2ca00b0098d25cbb899sm7613657ejb.41.2023.07.16.01.10.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 16 Jul 2023 01:10:46 -0700 (PDT) From: Alex Bee To: u-boot@lists.denx.de, Kever Yang , Philipp Tomsich , Simon Glass Cc: Alex Bee Subject: [PATCH v1 0/5] rockchip: Support OP-TEE binaries in ARM FIT images Date: Sun, 16 Jul 2023 10:10:29 +0200 Message-ID: <20230716081034.1196995-1-knaerzche@gmail.com> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Mailman-Approved-At: Sun, 16 Jul 2023 15:07:42 +0200 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 Alex Bee (5): rockchip: Support OP-TEE for ARM in FIT images created by binman evb-rk3229_defconfig: Drop SPL_STACK_R_MALLOC_SIMPLE_LEN rockchip: RK322x: select SPL_OPTEE_IMAGE rockchip: evb_rk3229: Update/fix README optee: Support Rockchip OPTEE 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 | 10 +++++ board/rockchip/evb_rk3229/README | 72 ++++++++++++++++++++----------- common/spl/spl_optee.S | 4 ++ configs/evb-rk3229_defconfig | 1 - 7 files changed, 97 insertions(+), 93 deletions(-) delete mode 100644 arch/arm/dts/rockchip-optee.dtsi base-commit: e6e67bb9e0a40f3eb3c87d16935192821987c3e0 -- 2.41.0