From mboxrd@z Thu Jan 1 00:00:00 1970 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8351AC48BEB for ; Thu, 22 Feb 2024 05:44:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:From:References:CC:To:Subject: MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=nklmhzbxlp22bd5Co3ZNsBJRECh9etGXg75dbCVftyI=; b=wDbtgErofMRQLn c1XKY1kFrw6lS+3+gHFHUG6hFAbAs75mge7HXhtqCQeqJ+lgQu3hUtBz2j0Eqp+1x/WQOOcOmc1qs tkOk9MNZmX2/l20Sh1kSvi4LfH8424HgMlhgmdpx/lueZdd7frcoeGa103Z2qxPTILbqN6T7on8Rt WE4js+bmTfUqN6zFZLLKViBPXUTHvTHUQ7UrpvulVN+GKXHhVeW+MwYheok6/bcME0Rp+2OPSon0E xp5xMuvYBFmQlnrllCY1RaEiPEE0uSV7rxTOzDfOjFfZzt0XXD43hMwjAnnovVi6otNoHoNfbqMsd wkt3MnjoLtaRSe8JljbQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rd1sP-00000003crc-34xS; Thu, 22 Feb 2024 05:44:09 +0000 Received: from mx0a-0031df01.pphosted.com ([205.220.168.131]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rd1sM-00000003crH-3Oap for linux-arm-kernel@lists.infradead.org; Thu, 22 Feb 2024 05:44:08 +0000 Received: from pps.filterd (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 41M3uHrm025369; Thu, 22 Feb 2024 05:43:53 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= message-id:date:mime-version:subject:to:cc:references:from :in-reply-to:content-type:content-transfer-encoding; s= qcppdkim1; bh=oCC3QGnbRxCLzx4KRoEqeteCKzjPTUEElYcaAwDBXsA=; b=Ep dSbFdcHg36DzMP+JDwlh8qUWQsDI5VNBZ77uN0CcNosWOQiqoPVRIwaRo04yegZa s6SXEz3LzZSmD1m4zEucXUXc1VmPodUKofzy9JNs4r2+iBJF1VH2i7lIeox9ndHm B4mphwC+1WHT8KzJ12+JBi25nXePzQ7szJ61v9/2nd2+r4IFs+opa3wY1L6S+CkZ f9MpsVg/s0srg209fAAEbSsZBayBSG+jRztc4EwDydf78ThCRadzqqAU3cc4jQaS P6D2CS6bc4kv2G9dZLR+73nuwlm4EL0Q6nPx2vh9DBLaIx+OktUVECG4k6pa/W7D 1R5te5KbHh9CyynxSvPw== Received: from nalasppmta01.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3wdpjn95rq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 22 Feb 2024 05:43:53 +0000 (GMT) Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 41M5hqFj004786 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 22 Feb 2024 05:43:52 GMT Received: from [10.214.82.119] (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Wed, 21 Feb 2024 21:43:48 -0800 Message-ID: Date: Thu, 22 Feb 2024 11:13:48 +0530 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 0/7] Introduction of a remoteproc tee to load signed firmware Content-Language: en-US To: Arnaud Pouliquen , Bjorn Andersson , Mathieu Poirier , Jens Wiklander , Rob Herring , Krzysztof Kozlowski , Conor Dooley CC: , , , , , References: <20240214172127.1022199-1-arnaud.pouliquen@foss.st.com> From: Naman Jain In-Reply-To: <20240214172127.1022199-1-arnaud.pouliquen@foss.st.com> X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: -lkiXDkqUkLoLXNDx0na_5iwoAA8Refh X-Proofpoint-GUID: -lkiXDkqUkLoLXNDx0na_5iwoAA8Refh X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-02-22_03,2024-02-22_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 suspectscore=0 spamscore=0 priorityscore=1501 impostorscore=0 lowpriorityscore=0 clxscore=1015 bulkscore=0 mlxlogscore=999 malwarescore=0 adultscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2402120000 definitions=main-2402220042 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240221_214406_900832_0399CAC0 X-CRM114-Status: GOOD ( 25.47 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 2/14/2024 10:51 PM, Arnaud Pouliquen wrote: > Updates from the previous version [1]: > > This version proposes another approach based on an alternate load and boot > of the coprocessor. Therefore, the constraint introduced by tee_remoteproc > is that the firmware has to be authenticated and loaded before the resource > table can be obtained. > > The existing boot sequence is: > > 1) Get the resource table and store it in a cache, > calling rproc->ops->parse_fw(). > 2) Parse the resource table and handle resources, > calling rproc_handle_resources. > 3) Load the firmware, calling rproc->ops->load(). > 4) Start the firmware, calling rproc->ops->start(). > > => Steps 1 and 2 are executed in rproc_fw_boot(), while steps 3 and 4 are > executed in rproc_start(). > => the use of rproc->ops->load() ops is mandatory > > The boot sequence needed for TEE boot is: > > 1) Load the firmware. > 2) Get the loaded resource, no cache. > 3) Parse the resource table and handle resources. > 4) Start the firmware. Hi, What problem are we really addressing here by reordering load, parse of FW resources? Basically, what are the limitations of the current design you are referring to? I understood that TEE is designed that way. > > Then the crash recovery also has to be managed.For recovery, the cache is > used to temporarily save the resource table and then reapply it on > restart: > 1) Stop the remote processor, calling rproc->ops->stop(). > 2) Load the firmware, calling rproc->ops->load(). > 3) Copy cached resource table. > 4) Start the remote processor, calling rproc->ops->start(). > > => This sequence is also needed when TEE manages the boot of the remote > processor. > => The rproc->ops->load() is also used in recovery sequence. > > Based on the sequences described above, the proposal is to: > > - Rework tee_rproc API to better match the rproc_ops structure. > This allows to simply map the function to implement the load ops, which > is not optional. The tee_rproc_load_fw() is updated in consequence. > - Remove the call of rproc_load_segments from rproc_start() to dissociate > the load and the start. This is necessary to implement the boot sequence > requested for the TEE remote proc support. > - Introduce an rproc_alt_fw_boot() function that is an alternative boot > sequence, which implements the sequence requested for the TEE remoteproc > support. > > > [1] https://lore.kernel.org/lkml/20240118100433.3984196-1-arnaud.pouliquen@foss.st.com/T/ > > > Description of the feature: > > This series proposes the implementation of a remoteproc tee driver to > communicate with a TEE trusted application responsible for authenticating and > loading the remoteproc firmware image in an Arm secure context. > > 1) Principle: > > The remoteproc tee driver provides services to communicate with the OP-TEE > trusted application running on the Trusted Execution Context (TEE). s/Context/Environment? > The trusted application in TEE manages the remote processor lifecycle: > > - authenticating and loading firmware images, > - isolating and securing the remote processor memories, > - supporting multi-firmware (e.g., TF-M + Zephyr on a Cortex-M33), > - managing the start and stop of the firmware by the TEE. > Regards, Naman Jain _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel