From patchwork Thu Aug 26 21:42:04 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandru Gagniuc X-Patchwork-Id: 1521389 X-Patchwork-Delegate: patrice.chotard@st.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org 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=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=t4uAl38x; dkim-atps=neutral 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 ozlabs.org (Postfix) with ESMTPS id 4Gwbtn5qWjz9s1l for ; Fri, 27 Aug 2021 07:43:13 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id F1C728322D; Thu, 26 Aug 2021 23:43:08 +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="t4uAl38x"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id A6CA483205; Thu, 26 Aug 2021 23:42:32 +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=unavailable autolearn_force=no version=3.4.2 Received: from mail-ot1-x32d.google.com (mail-ot1-x32d.google.com [IPv6:2607:f8b0:4864:20::32d]) (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 B351C83219 for ; Thu, 26 Aug 2021 23:42:19 +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-x32d.google.com with SMTP id k12-20020a056830150c00b0051abe7f680bso5397177otp.1 for ; Thu, 26 Aug 2021 14:42:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=2hItgfHS0riRrilYwEgvnl7otxHSHrAkNeg/sXlz2dU=; b=t4uAl38xpBoayjHXWO+cnTn00OevjYvnLqafmgCywlkAQ7D0YFAYKIminkTpGafmfh MgOlDuXfvHKdyuSAmBYHBGxhTdjr49n6JGRzg7Amn1tGwMQXXcd1Pbt8Q0kKSZIwjiLa efiGmEsBPv7SxVSoKvanPXbxg7w07mGxhdgtsJr3FWciisXOk+LsdmY3HWEuWvqHlf0h 4meMZMBjzWj+lMWTPPtRN6kz6WDR4ZjiLQj6OsOJlFipaThJ6BJQ7fGoUKkJElF+lV76 E+78l2W0cBUxJNl7KwjOGgMXJhyC6Xdb7R4I4HXt3bus5xsPA754caCabwjFnK1X24Yv o7yw== 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=2hItgfHS0riRrilYwEgvnl7otxHSHrAkNeg/sXlz2dU=; b=ev189Jrettn4TScdHXi8DTTcKBRjI61ojU8gJOUOCqA1HtNJ4iRTE1B6d04/Do65N5 4ecGVUdlyHTgdy3FPTzMtwpxP/ArhuYBUxQjNcnMLzCiJJc8tlQIU0umI2Hm2jYa9B/M nPr0sdSqYjD+1IV27vT7jBHMi/oKDFeXgoKSnpKOf0gHA0FRHYHmQh1hNlckY7++FWVC cXLMMOPB9JHtRV7v1yB3bqBTpDgbfP01hSnNLv/fqpGyp52YrUaZ8UGsLZZSYeaEd2AS 8z2EelgZlWyb4/QNDbo6uLWngwTz7Var4fMDDmHqylV+ZeL+YcVAwSKX6y+mgTKGHrry 5+LQ== X-Gm-Message-State: AOAM531Hf00f25QAMWfycQfSr34e1Qav69iywhzFfTgGqwyPnv2eOQnW WyMJ1ZN4Mw30GLIT1juTxXVIyWOuCmQ= X-Google-Smtp-Source: ABdhPJy2sB49i/RkyoGSYsNNM02KLTbS5QneaNNUVa6nzuSTc9x2fnZIF1M5KHVEqdlWVl2/NpCvTA== X-Received: by 2002:a05:6830:88:: with SMTP id a8mr5187042oto.233.1630014138008; Thu, 26 Aug 2021 14:42:18 -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 14sm858852otl.78.2021.08.26.14.42.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Aug 2021 14:42:17 -0700 (PDT) From: Alexandru Gagniuc To: u-boot@lists.denx.de Cc: patrick.delaunay@foss.st.com, marex@denx.de, Alexandru Gagniuc Subject: [PATCH 05/10] arm: stm32mp: bsec: Do not skip .probe() for SPL Date: Thu, 26 Aug 2021 16:42:04 -0500 Message-Id: <20210826214209.254461-6-mr.nuke.me@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210826214209.254461-1-mr.nuke.me@gmail.com> References: <20210826214209.254461-1-mr.nuke.me@gmail.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.2 at phobos.denx.de X-Virus-Status: Clean stm32mp_bsec_probe() was skipped for TFABOOT and SPL_BUILD. The idea of skipping probe() 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, only skip probe with TFABOOT, but not SPL_BUILD. Signed-off-by: Alexandru Gagniuc --- arch/arm/mach-stm32mp/bsec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-stm32mp/bsec.c b/arch/arm/mach-stm32mp/bsec.c index fe39bd80cf..a02d19c1b9 100644 --- a/arch/arm/mach-stm32mp/bsec.c +++ b/arch/arm/mach-stm32mp/bsec.c @@ -506,7 +506,7 @@ static int stm32mp_bsec_probe(struct udevice *dev) * only executed in U-Boot proper when TF-A is not used */ - if (!IS_ENABLED(CONFIG_TFABOOT) && !IS_ENABLED(CONFIG_SPL_BUILD)) { + if (!IS_ENABLED(CONFIG_TFABOOT)) { plat = dev_get_plat(dev); for (otp = 57; otp <= BSEC_OTP_MAX_VALUE; otp++)