Message ID | 20211008195655.46046-13-mr.nuke.me@gmail.com |
---|---|
State | Deferred |
Delegated to: | Tom Rini |
Headers | show
Return-Path: <u-boot-bounces@lists.denx.de> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=jevKCOu0; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=<UNKNOWN>) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4HQzYD3wBmz9sPB for <incoming@patchwork.ozlabs.org>; Sat, 9 Oct 2021 06:59:28 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 3E8F083652; Fri, 8 Oct 2021 21:57:55 +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="jevKCOu0"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 7D67E83622; Fri, 8 Oct 2021 21:57:21 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ot1-x336.google.com (mail-ot1-x336.google.com [IPv6:2607:f8b0:4864:20::336]) (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 8C7CA8361E for <u-boot@lists.denx.de>; Fri, 8 Oct 2021 21:57:13 +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=mr.nuke.me@gmail.com Received: by mail-ot1-x336.google.com with SMTP id k2-20020a056830168200b0054e523d242aso3474276otr.6 for <u-boot@lists.denx.de>; Fri, 08 Oct 2021 12:57:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=XlUg7RO7kw4MoUmpYMCmlrfg8HxVGqffXkzZtrTrT/4=; b=jevKCOu08ANeWGrr+OkDOab5ffKT448fxrszUAmYsuCYyMG2xG8zKgcuvZ1aoiy2f1 AfWmrXg9IU7GIPIXNa2azQi+PDq340439GDDl2dYZd09iK7DPQnOS1HjbuwGx5A2kNOZ FoCSKHb3y4G9NrG6VffycB/89dezW7s7Lx9UEstSy1Zq61Bw58NjWhgJbhNAII3Ybdrm DfTnTrJZYEko1DjZCFvB+9jRd711KanP0Fk4HbqWO3Ts2nBMOvgc7Gdl+horNnulKCg+ XXj7aSrvbREDTcDGjAuWXSNJKW1IhYKMGFnrUMl8igpoioDM4jGMXefsiridxf3e2EhI DDGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=XlUg7RO7kw4MoUmpYMCmlrfg8HxVGqffXkzZtrTrT/4=; b=tmAwAvzrcUcc4PSLHPLRehmtd6lhGsLRxY9/zQPQ9pQwqkC1iCMTWu31CUUBnT1qPf bCA+w9ZwqdbkQx75AlpL2Moc62qWaLioxkdP4xUWh0jm/K6KtxqLzhA8Ew6y2TcMUsPU EhoY+0u0hzgorwjXqqaB8u7nP8oKe4+KLsjMCKRaArqjAgpsZnygWPtTwaRJXXohkshL LrpM+SucW4tScJkdzATDd+HnehkNnMrE+P51FdPgIpxqgrX0N0l5jRZ2RW6Y/5Ph8/br pUO8rgymMXXgFWN4d/D2N9UAuCAZ1FCrA7xgP7uxv8jm6JYaQaJBgk2OxOYXDdbAuFyt h6lw== X-Gm-Message-State: AOAM5330fnCWebwx57oYBrO+dQLJ7xl1Cb2LUHXjCKOW7aJStengJYgS AZpigvdX9mdmd2/b43Q0RuEFyJKo5V0= X-Google-Smtp-Source: ABdhPJxHChx9Yt47Fr789vkG/oFJGI+0HHP6QVbtgPrXvjObGOIgve+Y+tueSf9oQ/Iz/ZQjsiOhhg== X-Received: by 2002:a9d:734f:: with SMTP id l15mr3799034otk.4.1633723031973; Fri, 08 Oct 2021 12:57:11 -0700 (PDT) Received: from nuclearis3.lan (c-98-195-139-126.hsd1.tx.comcast.net. [98.195.139.126]) by smtp.gmail.com with ESMTPSA id x8sm67409otg.31.2021.10.08.12.57.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Oct 2021 12:57:11 -0700 (PDT) From: Alexandru Gagniuc <mr.nuke.me@gmail.com> To: u-boot@lists.denx.de, uboot-stm32@st-md-mailman.stormreply.com, patrick.delaunay@foss.st.com Cc: Alexandru Gagniuc <mr.nuke.me@gmail.com>, patrice.chotard@foss.st.com, etienne.carriere@linaro.org Subject: [PATCH v3 12/13] stm32mp1: spl: Copy optee nodes to target FDT for OP-TEE payloads Date: Fri, 8 Oct 2021 14:56:54 -0500 Message-Id: <20211008195655.46046-13-mr.nuke.me@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211008195655.46046-1-mr.nuke.me@gmail.com> References: <20211008195655.46046-1-mr.nuke.me@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion <u-boot.lists.denx.de> List-Unsubscribe: <https://lists.denx.de/options/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=unsubscribe> List-Archive: <https://lists.denx.de/pipermail/u-boot/> List-Post: <mailto:u-boot@lists.denx.de> List-Help: <mailto:u-boot-request@lists.denx.de?subject=help> List-Subscribe: <https://lists.denx.de/listinfo/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=subscribe> Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" <u-boot-bounces@lists.denx.de> X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean |
Series |
stm32mp1: Support falcon mode with OP-TEE payloads
|
expand
|
diff --git a/arch/arm/mach-stm32mp/spl.c b/arch/arm/mach-stm32mp/spl.c index d9fdc5926c..94fbb45cf9 100644 --- a/arch/arm/mach-stm32mp/spl.c +++ b/arch/arm/mach-stm32mp/spl.c @@ -19,6 +19,7 @@ #include <asm/arch/sys_proto.h> #include <mach/tzc.h> #include <linux/libfdt.h> +#include <tee/optee.h> u32 spl_boot_device(void) { @@ -182,6 +183,7 @@ void stm32_init_tzc_for_optee(void) void spl_board_prepare_for_optee(void *fdt) { stm32_fdt_setup_mac_addr(fdt); + optee_copy_fdt_nodes(fdt); stm32_init_tzc_for_optee(); }
OP-TEE does not take a devicetree for its own use. However, it does pass the devicetree to the normal world OS. In most cases that will be some other devicetree-bearing platform, such as linux. OP-TEE is capable of patching the devicetree and adding the required "/firmware" and "/reserved-memory" nodes. Not all OP-TEE configurations do so, and it would need to be explicitly enabled (CFG_DT=y). There is a measurable boot time penalty to enabling this feature, and sometimes it is preferrable to do it in SPL for this exact reason. As such, there are cases where it is required to copy the optee nodes to he target's FDT. Do this as part of spl_board_prepare_for_optee(). Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com> --- arch/arm/mach-stm32mp/spl.c | 2 ++ 1 file changed, 2 insertions(+)