Message ID | 20210907235933.2798330-7-mr.nuke.me@gmail.com |
---|---|
State | Superseded |
Delegated to: | Patrice Chotard |
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: 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=aZIWMtNY; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=<UNKNOWN>) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (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 ozlabs.org (Postfix) with ESMTPS id 4H42N32m9Kz9t0T for <incoming@patchwork.ozlabs.org>; Wed, 8 Sep 2021 10:00:49 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 5A11882BD6; Wed, 8 Sep 2021 02:00:25 +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="aZIWMtNY"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id F209683308; Wed, 8 Sep 2021 01:59:54 +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-qv1-xf29.google.com (mail-qv1-xf29.google.com [IPv6:2607:f8b0:4864:20::f29]) (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 1758C832DD for <u-boot@lists.denx.de>; Wed, 8 Sep 2021 01:59:45 +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-qv1-xf29.google.com with SMTP id u4so409131qvb.6 for <u-boot@lists.denx.de>; Tue, 07 Sep 2021 16:59:45 -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=8OpHEYlQb8Mu5hcRIaotjRf4RRob815sMXJYLVBAtjw=; b=aZIWMtNYzJH0kN2N8QwuYU8L7qrkf4roYb++w0XgmkNsH8Jp2spdXLRxr0mT03zra9 RZo7wZHV6O8a9gPVuJoqkd9GaWCrs5LwoUYWLTgd9PKI2G2AZKHDZU1IVPR1Dw3zDtCq 49dlIPoIe1IZPXiUPPj3Bb1AZAX1DZB4q+3gq5RMSOfVVhrX2EQZ2TkdeV/UtZHtkU6e tTkNUEsmmEpzmEpxoieHbV7n1IEocodE1fngoyn+92stVxeRxnk03PBsabb72YRgkhTE KYtygx9F3SI0aBpYvENZthQ7gmnOIsH0OggGDBBqqIWx0e/wNDxyber/aGs4bt+VDJFC iHFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=8OpHEYlQb8Mu5hcRIaotjRf4RRob815sMXJYLVBAtjw=; b=JlsrkDbvUZDHbyD/TNOIIuJtfzc8pObk0AYyRbYnn3uMlMXcSf3pyH69XMb7psFQg+ ZOvniSodZ1V3VSSY8TFU2Mogkg14OWweOE5w4cYyVpRDx23syUnvRr3JEaef6qMqQwSS A/B0pL1lN/yFkjZRm3ShwzjhQ/LXO6P4H8mI6XzT1cnf8mIgyIwBHlbhVEEcIWke4O24 9RJmcN4P5gKHz553ruW+rC/6fwu3Suc8HDNDgaEsKxfzndT9wG0XD2MdgbYvIcMA7nuV 7tWuh+d1+P89SkBHid+EPbeoSxCuR/EAe1AG8LyEkoG9/QRMEXt9nSXRQNMeNDr9V+V+ OJPQ== X-Gm-Message-State: AOAM532U2TzrDxy3k8GPt/xxYYNQtP7bc+L19lWBFfsdxHhhTAtnpTQY H8V03/fO+eb7BgtLf8A/CEVTuBWbkr4= X-Google-Smtp-Source: ABdhPJzh7CtRvGDDYBlx/2zpufAF1nIlbQ8x/irGVXi68pR0IClvlSKf8D4OPQbxyLYFaFNq/DXTWw== X-Received: by 2002:a05:6214:94c:: with SMTP id dn12mr811016qvb.60.1631059183474; Tue, 07 Sep 2021 16:59:43 -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 d78sm460351qkg.92.2021.09.07.16.59.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Sep 2021 16:59:43 -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 v2 06/11] arm: stm32mp: bsec: Update OTP shadow registers in SPL Date: Tue, 7 Sep 2021 18:59:28 -0500 Message-Id: <20210907235933.2798330-7-mr.nuke.me@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210907235933.2798330-1-mr.nuke.me@gmail.com> References: <20210907235933.2798330-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/bsec.c b/arch/arm/mach-stm32mp/bsec.c index fe39bd80cf..41ed5f3cf5 100644 --- a/arch/arm/mach-stm32mp/bsec.c +++ b/arch/arm/mach-stm32mp/bsec.c @@ -503,10 +503,10 @@ static int stm32mp_bsec_probe(struct udevice *dev) /* * update unlocked shadow for OTP cleared by the rom code - * only executed in U-Boot proper when TF-A is not used + * Executed only by FSBL (SPL or TF-A) */ - if (!IS_ENABLED(CONFIG_TFABOOT) && !IS_ENABLED(CONFIG_SPL_BUILD)) { + if (IS_ENABLED(CONFIG_SPL_BUILD)) { plat = dev_get_plat(dev); for (otp = 57; otp <= BSEC_OTP_MAX_VALUE; otp++)
For TFABOOT and SPL_BUILD, stm32mp_bsec_probe() skipped updating the OTP shadow registers. The idea is that we can't access BSEC from the normal world. This is true with TFABOOT. However, in SPL, we are in the secure world, so skipping probe is incorrect. In fact, SPL is not even built when TFABOOT is selected. Thus, do not skip this step for SPL_BUILD. Note that because SPL is now doing this step, we no longer need to do it in u-boot. The new logic is "let the FSBL do it", which is simpler. Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com> --- arch/arm/mach-stm32mp/bsec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)