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 1B645C43334 for ; Thu, 2 Jun 2022 17:05:48 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 1F10E8430C; Thu, 2 Jun 2022 19:05:46 +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="SWCRygui"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 0A45084327; Thu, 2 Jun 2022 19:05:44 +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 179CD84101 for ; Thu, 2 Jun 2022 19:05:41 +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=alpernebiyasak@gmail.com Received: by mail-ej1-x636.google.com with SMTP id me5so10644906ejb.2 for ; Thu, 02 Jun 2022 10:05:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=qh52KvrlKw906WA0PwFJ7ici3WuemCiRY+uXA6DEMZ4=; b=SWCRyguik4wzhF9ZMUKVnXnuuzix/zp6Qdy1nBhXmJCtrtdutZIa7gFuJK2ina71oI P36ZzksyPju4XmcAv3vz25bZvYBxjrM3xeOI8fEtxpCfN1hD8Mmht8/0b1rctR1zhL9e 2dvl6S0TX+KgCUC58xutKW+xalfjs/hjDQFtUPCjqeTwDgiszXZ57mQjK19XOH/YCCXY WS+vr7QIybV9rxmF1MFMPJt0LTwMdOAUkd/OEcd1996l/Yv0fSj2i/1UdIlNSm3AnVYU 7f8coOjeLOEW0C7brdip2NLD0qUtEqr6f/6vKNDv6KQZSFSGJ8HRJHaxYjZQTiX0sG1F fBaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=qh52KvrlKw906WA0PwFJ7ici3WuemCiRY+uXA6DEMZ4=; b=lh1aYpPjHpo3IMPiM7pE6ce8ycbSeDAdx9Haaa8fART65hqGIsIGUypNTdtd+N6s3f Tb7iZUnY7J8HLpiv7L/yV/Z+U67/6/9HaKfioKaNG4VreaGB0zGhDO0Sbznz7KbFN/yK ZvJ8tzvP/UuKP14+CO7Dhx0vDZ5hLdarKcjVBedEDvaP8lxR85QNoYEwMLana/5zbfAt 6oaJZK986zdIHH51kspgyQFP85EF4SPgClBzirIL16NfhpyEXn6YIF9ZQ4aUYNpeEy/e LYxGjakw7eJHgKw897yVoNgsQiA8/LwGXy8YT187nEM7WEcysnMpyX1iseSeMdpWIedT vMbw== X-Gm-Message-State: AOAM533e5rRAfdJFd0Yd2mLCLZ+M6O4GT9fZaeVoMBDW1eEvp9tOKtuC 3Hrco/jDDaXcDcN7QhPU3qc= X-Google-Smtp-Source: ABdhPJwTwtFTwI7oBshcA3NyFQi9wnCR4ni/Cg2KcY8bSu0aFysbiHBCxO6J8updqqfWBOvQqS7aIw== X-Received: by 2002:a17:906:5ad3:b0:6fe:9f29:5ca6 with SMTP id x19-20020a1709065ad300b006fe9f295ca6mr5389989ejs.401.1654189540608; Thu, 02 Jun 2022 10:05:40 -0700 (PDT) Received: from [192.168.0.74] ([178.233.178.185]) by smtp.gmail.com with ESMTPSA id k16-20020a1709061c1000b00705cdfec71esm1888300ejg.7.2022.06.02.10.05.38 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 02 Jun 2022 10:05:40 -0700 (PDT) Message-ID: <1fc299a7-49d5-36f9-7f06-56346f46ff3c@gmail.com> Date: Thu, 2 Jun 2022 20:05:36 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux aarch64; rv:91.0) Gecko/20100101 Thunderbird/91.9.0 Subject: Re: [PATCH] mach-rockchip: make_fit_atf.py: support OP-TEE tee.bin v1 format Content-Language: en-US To: Jens Wiklander , Jerome Forissier Cc: u-boot@lists.denx.de, Kever Yang , Philipp Tomsich , Simon Glass References: <20220511153514.71472-1-jerome.forissier@linaro.org> <1cce1d3e-b85a-a2c1-02d9-a2ec9b38868e@gmail.com> <7a27dd93-e2bf-0064-7915-d1126b17bf8a@linaro.org> <31889acc-bb56-b0a1-8d8e-f4d1f73a7a23@gmail.com> <4a6aa044-82e6-058d-0a85-aded795a6a13@linaro.org> From: Alper Nebi Yasak In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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.5 at phobos.denx.de X-Virus-Status: Clean On 02/06/2022 13:43, Jens Wiklander wrote: > On Thu, Jun 2, 2022 at 9:50 AM Jerome Forissier > wrote: >> On 5/29/22 18:08, Alper Nebi Yasak wrote: >>> Why I am asking these is that I'm hypothesizing we can put the >>> unmodified 'tee.bin' (including header) and 'bl31.elf' (normally split >>> into raw binary pieces) into the FIT, and then interpret them at runtime >>> on the C side. Trying to figure out if it's a good idea. >> >> Definitely sounds doable. It could help having more common code perhaps, and also >> simplify the content of the FIT and therefore the verification of hash and >> signatures. >> >> [...] > > It could be worth checking how TF-A loads OP-TEE. The relevant code is > in https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/tree/lib/optee/optee_utils.c I think I'll eventually try to implement what I mentioned above, and the linked TF-A code looks like it would help a lot, thank you both! > Cheers, > Jens