From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx07-00178001.pphosted.com (mx08-00178001.pphosted.com [91.207.212.93]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 10EAD2820AD; Mon, 14 Apr 2025 14:03:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.207.212.93 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744639426; cv=none; b=sk7j/K0xYz/2EXn4KfdaMJdoFUHzn7ZYRy3k5ib2mDEpLXxS2Un0xNxSQv9jyI/OgRYlS3A86kzlcLBTgq4/9hAOJsefRimwEYs47unB4wsiEm50UplNFwcxtGucQkzTLqjpaPT+sMVUQEK7aSJP8pqFdU3JQnrfMd+EpSr8lDs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744639426; c=relaxed/simple; bh=U3FzFjHA6Fkro3jO+W5B2+lHYgcq86DaT9A/iPun6ts=; h=Message-ID:Date:MIME-Version:From:Subject:To:CC:References: In-Reply-To:Content-Type; b=Phs7X+Ze0BffwoHy3EKFtARK95XBIs/VFrH8Z8sC7y5jtvjsaRDpz1Jb+W/TlBHZPovWFCxqZyw2P3bDNOqMTZVj/rrYMeLTfTPPszTr82jlIPXYwrxvp1APMtvGdWFCiuO2BSUqsp6lU95KRDeZXqCSJBK96sNb+V4vmtcMkHA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=foss.st.com; spf=pass smtp.mailfrom=foss.st.com; dkim=pass (2048-bit key) header.d=foss.st.com header.i=@foss.st.com header.b=OOObsEyz; arc=none smtp.client-ip=91.207.212.93 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=foss.st.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=foss.st.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=foss.st.com header.i=@foss.st.com header.b="OOObsEyz" Received: from pps.filterd (m0046661.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 53ECsOaa017111; Mon, 14 Apr 2025 16:03:26 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=selector1; bh= AXBT3Gx49OIy8DXLSl7KoI0jOZ+YAa+TLsMsUTA/Dt4=; b=OOObsEyzzjEjvwnu cH7LPVAmKJ3JygUwty9UIFQ/TSuUXnHve4rbZGsgO07BlL7GQ29k/0NFClsHE0Md vJ5vPJ0zeuVHGgmDZL40DY2s/+JFq/U94176Hm1bP8mYaOFml7X5VuOWhfqLRLJk iPBrnq7tIYC3zwDPqJgkrjLaCdpcJSUiyKw4tjUPwEUNlrIu9b0K0W9fln1u+V0q 4z/KsPm57RESOEsPoZaTun0UXAStaG/xkeVSzBlNVE4ObKfaMkSbgoLYNx74nK+o iWJqNQRyEXb9k6G+dEJn4g4ljLAa1rMfwe4gFEX/TZaZVimMs5o99VKJ3uC2Bzc3 3qTJGw== Received: from beta.dmz-ap.st.com (beta.dmz-ap.st.com [138.198.100.35]) by mx07-00178001.pphosted.com (PPS) with ESMTPS id 45yf2gr5j9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 14 Apr 2025 16:03:26 +0200 (MEST) Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-ap.st.com (STMicroelectronics) with ESMTP id 7752440049; Mon, 14 Apr 2025 16:02:16 +0200 (CEST) Received: from Webmail-eu.st.com (eqndag1node4.st.com [10.75.129.133]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 53C46981A1E; Mon, 14 Apr 2025 15:59:34 +0200 (CEST) Received: from SAFDAG1NODE1.st.com (10.75.90.17) by EQNDAG1NODE4.st.com (10.75.129.133) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Mon, 14 Apr 2025 15:59:34 +0200 Received: from [10.48.86.121] (10.48.86.121) by SAFDAG1NODE1.st.com (10.75.90.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Mon, 14 Apr 2025 15:59:33 +0200 Message-ID: Date: Mon, 14 Apr 2025 15:59:32 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: Arnaud POULIQUEN Subject: Re: [PATCH v16 0/6] Introduction of a remoteproc tee to load signed firmware To: Bjorn Andersson , Mathieu Poirier , Jens Wiklander , "Rob Herring" , Krzysztof Kozlowski , Conor Dooley CC: , , , , , References: <20250325095833.3059895-1-arnaud.pouliquen@foss.st.com> Content-Language: en-US Organization: STMicroelectronics In-Reply-To: <20250325095833.3059895-1-arnaud.pouliquen@foss.st.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-ClientProxiedBy: SHFCAS1NODE2.st.com (10.75.129.73) To SAFDAG1NODE1.st.com (10.75.90.17) X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1095,Hydra:6.0.680,FMLib:17.12.68.34 definitions=2025-04-14_04,2025-04-10_01,2024-11-22_01 Hello Bjorn, Gentle reminder. For your information, I proposed to Mathieu that he wait for your first review, as this revision is intended to address your comments on revision 15." Thanks, Arnaud On 3/25/25 10:58, Arnaud Pouliquen wrote: > Main updates from version V15[1]: > - Removed the rproc_ops:load_fw() operation introduced in the previous version. > - Returned to managing the remoteproc firmware loading in rproc_tee_parse_fw to > load and authenticate the firmware before getting the resource table. > - Added spinlock and dev_link mechanisms in remoteproc TEE to better manage > bind/unbind. > > More details are available in each patch commit message. > > [1] https://lore.kernel.org/linux-remoteproc/20241128084219.2159197-7-arnaud.pouliquen@foss.st.com/T/ > > Tested-on: commit 0a0ba9924445 ("Linux 6.14-rc7") > > 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). > 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. > > 2) Format of the signed image: > > Refer to: > https://github.com/OP-TEE/optee_os/blob/master/ta/remoteproc/src/remoteproc_core.c#L18-L57 > > 3) OP-TEE trusted application API: > > Refer to: > https://github.com/OP-TEE/optee_os/blob/master/ta/remoteproc/include/ta_remoteproc.h > > 4) OP-TEE signature script > > Refer to: > https://github.com/OP-TEE/optee_os/blob/master/scripts/sign_rproc_fw.py > > Example of usage: > sign_rproc_fw.py --in --in --out --key ${OP-TEE_PATH}/keys/default.pem > > > 5) Impact on User space Application > > No sysfs impact. The user only needs to provide the signed firmware image > instead of the ELF image. > > > For more information about the implementation, a presentation is available here > (note that the format of the signed image has evolved between the presentation > and the integration in OP-TEE). > > https://resources.linaro.org/en/resource/6c5bGvZwUAjX56fvxthxds > > > > Arnaud Pouliquen (6): > remoteproc: core: Introduce rproc_pa_to_va helper > remoteproc: Add TEE support > remoteproc: Introduce release_fw optional operation > dt-bindings: remoteproc: Add compatibility for TEE support > remoteproc: stm32: Create sub-functions to request shutdown and > release > remoteproc: stm32: Add support of an OP-TEE TA to load the firmware > > .../bindings/remoteproc/st,stm32-rproc.yaml | 58 +- > drivers/remoteproc/Kconfig | 10 + > drivers/remoteproc/Makefile | 1 + > drivers/remoteproc/remoteproc_core.c | 52 ++ > drivers/remoteproc/remoteproc_internal.h | 6 + > drivers/remoteproc/remoteproc_tee.c | 619 ++++++++++++++++++ > drivers/remoteproc/stm32_rproc.c | 139 +++- > include/linux/remoteproc.h | 4 + > include/linux/remoteproc_tee.h | 90 +++ > 9 files changed, 935 insertions(+), 44 deletions(-) > create mode 100644 drivers/remoteproc/remoteproc_tee.c > create mode 100644 include/linux/remoteproc_tee.h > > > base-commit: 0a0ba99244455fea8706c4a53f5f66a45d87905d