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 6874FC64EC4 for ; Wed, 22 Feb 2023 06:32:23 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id D092185911; Wed, 22 Feb 2023 07:32:20 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=rock-chips.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 67D1E859B3; Wed, 22 Feb 2023 07:32:19 +0100 (CET) Received: from mail-m11874.qiye.163.com (mail-m11874.qiye.163.com [115.236.118.74]) (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 6323A857FC for ; Wed, 22 Feb 2023 07:32:16 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=rock-chips.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=kever.yang@rock-chips.com Received: from [172.16.12.93] (unknown [58.22.7.114]) by mail-m11874.qiye.163.com (Hmail) with ESMTPA id 2E3533C0214; Wed, 22 Feb 2023 14:32:00 +0800 (CST) Message-ID: <508b346b-6929-6577-8a4e-ee32a6e483b0@rock-chips.com> Date: Wed, 22 Feb 2023 14:31:59 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1 Subject: Re: rk3399: Loading OP-TEE by SPL? Content-Language: en-US To: chf.fritz@googlemail.com, Simon Glass , Jagan Teki Cc: u-boot@lists.denx.de References: From: Kever Yang In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-HM-Spam-Status: e1kfGhgUHx5ZQUpXWQgPGg8OCBgUHx5ZQUlOS1dZFg8aDwILHllBWSg2Ly tZV1koWUFDSUNOT01LS0k3V1ktWUFJV1kPCRoVCBIfWUFZGh5IGlZCT0lPQkxLHUoaHRlVEwETFh oSFyQUDg9ZV1kYEgtZQVlOQ1VJSVVMVUpKT1lXWRYaDxIVHRRZQVlPS0hVSkpLSEpMVUpLS1VLWQ Y+ X-HM-Sender-Digest: e1kMHhlZQR0aFwgeV1kSHx4VD1lBWUc6PxA6Fzo6Cj0UOg4oLzkpCVY* KiEKCitVSlVKTUxMS09MTklLTE5JVTMWGhIXVRAeDR4JVQIaFRw7CRQYEFYYExILCFUYFBZFWVdZ EgtZQVlOQ1VJSVVMVUpKT1lXWQgBWUFJTklINwY+ X-HM-Tid: 0a8677d25c1b2eb0kusn2e3533c0214 X-HM-MType: 1 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 Hi Christoph,     The SPL_OPTEE_IMAGE is suppose to use like ATF for armv7:     TPL->SPL->BL31/ATF/OPTEE->U-Boot.     But not for OPTEE use as a BL32 after BL31.     BL31 and U-Boot is package as a itb file, so it's easy to add a BL32, but you may need to study how BL31 get entry to BL32 and then add support for it. Thanks, - Kever On 2023/2/22 04:16, Christoph Fritz wrote: > Hello, > > my goal is to load OP-TEE after BL31 and before u-boot, so I enabled > CONFIG_SPL_OPTEE_IMAGE. > > But it fails to build (tested current master): > > $ make -j$(nproc) CROSS_COMPILE=aarch64-linux-gnu- rock-pi-4-rk3399_defconfig all > > ./arch/arm/include/asm/unified.h: Assembler messages: > ./arch/arm/include/asm/unified.h:12: Error: unknown pseudo-op: `.syntax' > common/spl/spl_optee.S:11: Error: operand 1 must be an integer register -- `mov pc,r3' > make[3]: *** [scripts/Makefile.build:292: spl/common/spl/spl_optee.o] Error 1 > make[2]: *** [scripts/Makefile.spl:533: spl/common/spl] Error 2 > make[2]: *** Waiting for unfinished jobs.... > > Without CONFIG_SPL_OPTEE_IMAGE the board starts like this: > TPL -> SPL -> BL31 -> u-boot > > What's the correct way to start OP-TEE on rk3399? > > Any ideas? > > Thanks > -- Christoph >