Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 21567C636C8 for ; Thu, 15 Jul 2021 19:19:55 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 6113E613DF for ; Thu, 15 Jul 2021 19:19:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6113E613DF Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 6C5D982BE8; Thu, 15 Jul 2021 21:19:46 +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="qBM+K8lJ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 47D3E82BC7; Thu, 15 Jul 2021 21:19:36 +0200 (CEST) Received: from mail-ot1-x334.google.com (mail-ot1-x334.google.com [IPv6:2607:f8b0:4864:20::334]) (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 398B882BC7 for ; Thu, 15 Jul 2021 21:19:32 +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-x334.google.com with SMTP id 7-20020a9d0d070000b0290439abcef697so7365662oti.2 for ; Thu, 15 Jul 2021 12:19:32 -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=msCdLDuqjBt0tmHs37fiJJzOjBWATNNyH9oMOEHTqZw=; b=qBM+K8lJGzoybqn9KY7p9rj/R7U52sBQIRupXnINnu+g+p3MIqNkH3rQvP7g2R4HQS cFlIg2eEJuKStd4/u4I4nmYxkqDWWjVWjrqhA/Lt6/Pj+34Sv8DQbLvtHLRGZCZ6TAWH fUh2hW0wkTmLh1JYRfyg/A1zp5EfY+cMpfGgrcPIO4sPP1Yng4dtiuzwOPC2zUoTsPOj SfjB/imZwZyGffQiHxgWKX3gYUkSeNUKff4rgTnauRAuE6sfBlnpdirF2dxtRwUHOqPX QqZnPQvGD+FHpqgJCrstIA2c2sYp4eqwWvoyO/2swBbdeDm96N6pMkpc6xDJiOzKedKM 2CqA== 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=msCdLDuqjBt0tmHs37fiJJzOjBWATNNyH9oMOEHTqZw=; b=WWuZOIsyXV6cj5M8k05k2QUNb5C171yNGdcqHKEL9fRD8YvTnYlJY3KzE0pMtnq6KG Uo1xZXSzdHYgeBSNYKNYbi5uU7LgykG7kjHtihs50PZQmk60liHdxhHLSxqC/GUxpZQA 8odqFkDN2EUeTqKWlH6Zb2/kxEKa1ez+84L0otRQjyLzuMbXH8rZMPG1de37OHS1BmWB NyMnGPXEQ45ElOBPqXQVlJY8Tq6EJhMjRmJXIyUG7RDwjxlfai1j5V7S6uPQpRHFtmu7 QmDXdsc9HU5jvFMY4Ikw1uNDSkb+Po5DzMFtqk6YO0k26+EPqUdvJqFqyBtipn4PuGE7 /rkQ== X-Gm-Message-State: AOAM532sP6ETg7Kcj1gawfSiEiSZpt7gzVc+xIpy8t2zZh5JAJpA47h5 3c7Upg0UFtHiE9ReMWYLFt8I/XhhyCY= X-Google-Smtp-Source: ABdhPJxgMPtCFJ2V+CXUAJYQiLZ/IF2UlebW+takax4rCgvjh7vu/AQCPTWBhPINEyDgsmpE4GSrtw== X-Received: by 2002:a9d:8d3:: with SMTP id 77mr5027183otf.6.1626376770580; Thu, 15 Jul 2021 12:19:30 -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 4sm1264377ooc.42.2021.07.15.12.19.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Jul 2021 12:19:30 -0700 (PDT) From: Alexandru Gagniuc To: u-boot@lists.denx.de, patrick.delaunay@foss.st.com Cc: Alexandru Gagniuc , Tom Rini Subject: [PATCH v5 1/5] spl: mmc: Support OP-TEE payloads in Falcon mode Date: Thu, 15 Jul 2021 14:19:23 -0500 Message-Id: <20210715191927.337676-2-mr.nuke.me@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210715191927.337676-1-mr.nuke.me@gmail.com> References: <20210715191927.337676-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 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 In general, Falcon mode means we're booting a linux kernel directly. With FIT images, however, an OP-TEE secure kernel can be booted before linux. Thus, if the next stage is an IH_OS_TEE, this isn't necessarily a problem. Of course, a general solution would involve mmc_load_image_raw_os() only loading the binary, and leaving the decision of suitability to someone else. However, a rework of the boot flow is beyond the scope of this patch. Accept IH_OS_TEE as a valid OS value. Signed-off-by: Alexandru Gagniuc Reviewed-by: Tom Rini Reviewed-by: Patrick Delaunay --- common/spl/spl_mmc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/spl/spl_mmc.c b/common/spl/spl_mmc.c index add2785b4e..c6bd3dab12 100644 --- a/common/spl/spl_mmc.c +++ b/common/spl/spl_mmc.c @@ -230,8 +230,8 @@ static int mmc_load_image_raw_os(struct spl_image_info *spl_image, if (ret) return ret; - if (spl_image->os != IH_OS_LINUX) { - puts("Expected Linux image is not found. Trying to start U-boot\n"); + if (spl_image->os != IH_OS_LINUX && spl_image->os != IH_OS_TEE) { + puts("Expected image is not found. Trying to start U-boot\n"); return -ENOENT; } -- 2.31.1