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 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 9B844ECAAD5 for ; Tue, 6 Sep 2022 13:37:49 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 7ECFD849CF; Tue, 6 Sep 2022 15:37:47 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=foss.st.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=foss.st.com header.i=@foss.st.com header.b="EW7wLgqD"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id F258984A12; Tue, 6 Sep 2022 15:37:45 +0200 (CEST) Received: from mx07-00178001.pphosted.com (mx07-00178001.pphosted.com [185.132.182.106]) (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 BEBD9849CE for ; Tue, 6 Sep 2022 15:37:43 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=foss.st.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=prvs=52480b8964=patrick.delaunay@foss.st.com Received: from pps.filterd (m0241204.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 286D3JU7024113; Tue, 6 Sep 2022 15:37:43 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h=message-id : date : mime-version : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding; s=selector1; bh=6dWE7u6biEl/QTBRTte3DO3Szr7QB144rmVoGnJV/yw=; b=EW7wLgqDOfoIKCM5bWx4zolSHqfFde9Ty1i4z1L4RwxFlrPfqNGtT/Zn2hKV1nlpyOm+ SIGtaOnJkmLa6nCmI3/Nzf4aY5PCdASsWNvlDnAZvFhbIc46nZTxNVLfRKOUhD79g1o6 XDnIw6FmLZsLr+NqvEsaCLbZruPRxUc1PgVDVARbyDlXzILz60klA20P+BbS3nXt6mMH WcYPWJ1HP6PL0AQ8EOOkTpgQ4YFE50C463dIlK/ijXd93dB1z1AeF5t5Nz57CPhRRZ8M mvKDUne/BjxF7LOoIbdPBKew7J5v8fTONXrbq1PwXmdLmH7BvoPayuNlAjtFZbRoL8CK 2A== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com (PPS) with ESMTPS id 3jbx91gkg0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 06 Sep 2022 15:37:43 +0200 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 7975B100034; Tue, 6 Sep 2022 15:37:42 +0200 (CEST) Received: from Webmail-eu.st.com (shfdag1node3.st.com [10.75.129.71]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 7190222F7BB; Tue, 6 Sep 2022 15:37:42 +0200 (CEST) Received: from [10.48.0.213] (10.75.127.51) by SHFDAG1NODE3.st.com (10.75.129.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.2375.31; Tue, 6 Sep 2022 15:37:40 +0200 Message-ID: <5e2b6876-d362-c912-df3f-b435bd65feeb@foss.st.com> Date: Tue, 6 Sep 2022 15:37:39 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH v4] tee: optee: rework TA bus scanning code Content-Language: en-US To: Ilias Apalodimas , CC: , Jens Wiklander References: <20220906093703.35658-1-ilias.apalodimas@linaro.org> From: Patrick DELAUNAY In-Reply-To: <20220906093703.35658-1-ilias.apalodimas@linaro.org> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.75.127.51] X-ClientProxiedBy: SFHDAG2NODE3.st.com (10.75.127.6) To SHFDAG1NODE3.st.com (10.75.129.71) X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.528,FMLib:17.11.122.1 definitions=2022-09-06_07,2022-09-06_02,2022-06-22_01 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, On 9/6/22 11:37, Ilias Apalodimas wrote: > Late versions of OP-TEE support a pseudo bus. TAs that behave as > hardware blocks (e.g TPM, RNG etc) present themselves on a bus which we can > scan. Unfortunately U-Boot doesn't support that yet. It's worth noting > that we already have a workaround for RNG. The details are in > commit 70812bb83da6 ("tee: optee: bind rng optee driver") > > So let's add a list of devices based on U-Boot Kconfig options that we will > scan until we properly implement the tee-bus functionality. > > While at it change the behaviour of the tee core itself wrt to device > binding. If some device binding fails, print a warning instead of > disabling OP-TEE. > > Signed-off-by: Ilias Apalodimas > Reviewed-by: Jens Wiklander > Reviewed-by: Etienne Carriere > --- > Changes since v3: > - Use NULL instead of a child ptr on device_bind_driver(), since it's not > really needed > - Changed the style of the optee_bus_probe[] definition to > {.drv_name = xxx, .dev_name = yyy } > > Changes since v2: > - Fixed typo on driver name ftpm-tee -> ftpm_tee > > Changes since v1: > - remove a macro and use ARRAY_SIZE directly > drivers/tee/optee/core.c | 24 +++++++++++++++++++----- > 1 file changed, 19 insertions(+), 5 deletions(-) > Reviewed-by: Patrick Delaunay Thanks Patrick