From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Fri, 27 Jun 2025 18:32:22 +0200 Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1uVBzy-00BgFO-0u for lore@lore.pengutronix.de; Fri, 27 Jun 2025 18:32:22 +0200 Received: from bombadil.infradead.org ([2607:7c80:54:3::133]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1uVBzx-0005u7-LB for lore@pengutronix.de; Fri, 27 Jun 2025 18:32:22 +0200 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type: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=CahmUbY64wBTKDMFxgqhoJ5TywhVImeTiUXXTyBsD8Y=; b=PrnZ4UsUPZBHD7bNWki7klPX7+ uicVXE+7u3rGy+sQtApnysqXUDo1VTrvjTP3pa72+MJ2BTTHirQGrLq1iftze40MyR4tPBlWzb5gR 3KCoCbdT6DFdeCoGJzn/0agyWmRBB5mJB/mI6MdnFLLm1YgfWB5KrumHZWu4pN/qsF+fIpE3DxNLT xcOM/3VLT7XNcU45m5/7naOidTiwMH9eBBBwaCMdMnG3OcfkhtBVufHYY+Ugew+sZ+WAP5XDiVCnr ry2LWt925poN7WA/kOTt2ARK/VtIILo13MqINT2UaKfrLkbITkTgSng/OBRq215ST21VC5+c+5BH/ e81h3kkQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1uVBzS-0000000FHTn-32sv; Fri, 27 Jun 2025 16:31:50 +0000 Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1uVB9i-0000000F8JU-0ITY for barebox@lists.infradead.org; Fri, 27 Jun 2025 15:38:23 +0000 Received: from ptz.office.stw.pengutronix.de ([2a0a:edc0:0:900:1d::77] helo=[127.0.0.1]) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1uVB9f-0002Tl-Cd; Fri, 27 Jun 2025 17:38:19 +0200 Message-ID: <0296c3f0-f2bc-4cc9-84fd-1380abe44e3c@pengutronix.de> Date: Fri, 27 Jun 2025 17:38:19 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird To: Sascha Hauer , BAREBOX Cc: Marco Felsch References: <20250627-arm-optee-early-helper-v1-0-4b098e8ac7cd@pengutronix.de> <20250627-arm-optee-early-helper-v1-10-4b098e8ac7cd@pengutronix.de> From: Ahmad Fatoum Content-Language: en-US, de-DE, de-BE In-Reply-To: <20250627-arm-optee-early-helper-v1-10-4b098e8ac7cd@pengutronix.de> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250627_083822_112710_FA1DB52C X-CRM114-Status: GOOD ( 15.38 ) X-BeenThere: barebox@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "barebox" X-SA-Exim-Connect-IP: 2607:7c80:54:3::133 X-SA-Exim-Mail-From: barebox-bounces+lore=pengutronix.de@lists.infradead.org X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on metis.whiteo.stw.pengutronix.de X-Spam-Level: X-Spam-Status: No, score=-5.3 required=4.0 tests=AWL,BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.2 Subject: Re: [PATCH 10/14] ARM: optee-early: add mx6_start_optee_early helper X-SA-Exim-Version: 4.2.1 (built Wed, 08 May 2019 21:11:16 +0000) X-SA-Exim-Scanned: Yes (on metis.whiteo.stw.pengutronix.de) On 6/27/25 16:07, Sascha Hauer wrote: > From: Marco Felsch > To start OP-TEE during the lowlevel initialization of your board in the ``PBL``, > -enable the ``CONFIG_PBL_OPTEE`` configuration variable. your board should then > +enable the ``CONFIG_PBL_OPTEE`` configuration variable. Your board should then > call the function ``start_optee_early(void* tee, void* fdt)`` with a valid tee > -and FDT. Ensure that your OP-TEE is compiled with ``CFG_NS_ENTRY_ADDR`` unset, > -otherwise OP-TEE will not correctly return to barebox after startup. > -Since OP-TEE in the default configuration also modifies the device tree, don't > -pass the barebox internal device tree, instead copy it into a different memory > -location and pass it to OP-TEE afterwards. > -The modified device tree can then be passed to the main barebox start function. > +and FDT. If you're running on an i.MX6 platform your board code should call > +``imx6q_start_optee_early()`` or ``imx6ul_start_optee_early()`` instead since it > +validates that the TZASC not bypassed and configured as expected by OP-TEE. validates that the TZASC is not bypassed and is configured as expected by OP-TEE. > +Ensure that your OP-TEE is compiled with ``CFG_NS_ENTRY_ADDR`` unset, otherwise > +OP-TEE will not correctly return to barebox after startup. Since OP-TEE in the > +default configuration also modifies the device tree, don't pass the barebox > +internal device tree, instead copy it into a different memory location and pass > +it to OP-TEE afterwards. The modified device tree can then be passed to the > +main barebox start function. .. note:: Modification of the device tree usually makes it bigger. Some spare space must be left after the end of the device tree to accommodate this. Cheers, Ahmad -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |