From mboxrd@z Thu Jan 1 00:00:00 1970 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.7 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,URIBL_BLOCKED,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 A8CB7C47080 for ; Mon, 31 May 2021 17:43:39 +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 A999861186 for ; Mon, 31 May 2021 17:43:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A999861186 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 DCA4E82E94; Mon, 31 May 2021 19:43:31 +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="A5mwOYSM"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 2098982E9B; Mon, 31 May 2021 19:43:26 +0200 (CEST) Received: from mail-ot1-x32a.google.com (mail-ot1-x32a.google.com [IPv6:2607:f8b0:4864:20::32a]) (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 1186A82E8D for ; Mon, 31 May 2021 19:43:23 +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-x32a.google.com with SMTP id i23-20020a9d68d70000b02902dc19ed4c15so11785969oto.0 for ; Mon, 31 May 2021 10:43:22 -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=zcUHTnqoix/t1lAFEZU1tAV/kcCML3zMkEN7uwfOAmg=; b=A5mwOYSMfy5pXq2ciGbtytXG4DDUoC4b+G8GG/CTrFf7giU8yj815Stx7XmwYOzFBI ElL1g3Aq/S6f1YyhJZv03MypBHZp32iLoe/dYy53cVBW8PEKjpuSocBKclYTU0MOYZFX PQT08argZcHa4kdHGlvFwTpBAYovJ/7zj8lbWrb/YENa9tLsr0cpUXKJGn66V6Dc/uW/ JA89PfBFdTkoG5D8qS7ICf7qr8rnFHc0HLU2UqxfVdkZ8LdGbvEIaZrvgEMwskru+R2b Ltlx0JDrlQgGgisi4i7eQv5P0L+fj9Jm3BqQzNgjY217N2CULfhbbAMnWfW4ST7oL6aE 54Sw== 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=zcUHTnqoix/t1lAFEZU1tAV/kcCML3zMkEN7uwfOAmg=; b=lwEffVOMVlW4p1jS/S/EL9hfI7y/XP0Uc8B+lpAqiLGUV1dAZ7TNU1ukjAo3ZlO/a4 6yujO5FSHeFg+Msx0FLMumrcMfLLmcLfeiKjBWHolyX6u/TWUV8fBaJ4VydIGX6l0S4L mQgpriRAkEdd5UVICYiIJ848ODsYXOAPBLNEhG3mN/tEocMMlqbrR8LGlQvQJhV4pAg3 isbuHC5ZuGtnDkVKnW5SGmPhfWfwOHQJqhF0XSZjJeU6ngpkuAqCBPs/G1fEqAO7EG/A KMLZZM7QuuWGerQBGm32oOQvZp133CFoPCWW8RRtPZ2rGJpPvjcEvU7MPMkMU4F/p19D Erfw== X-Gm-Message-State: AOAM530nItq7XzgVF7APo0Yt0QJ/B3afunG+8u6+vhIvmjXAC65IzgPU CPafsbYtJgNdK4Cnn4IhBdhcwq/p2bk= X-Google-Smtp-Source: ABdhPJzKSQz2TErS/HZCltmCJ3xdlUalMa05kL6a1zl4M2jtSUDi4dBRHjiXRI0uX2Kvkaf8fPdG6Q== X-Received: by 2002:a9d:7315:: with SMTP id e21mr18327085otk.288.1622483001626; Mon, 31 May 2021 10:43:21 -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 12sm825048ooy.0.2021.05.31.10.43.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 May 2021 10:43:21 -0700 (PDT) From: Alexandru Gagniuc To: u-boot@lists.denx.de, trini@konsulko.com, patrick.delaunay@foss.st.com Cc: Alexandru Gagniuc , sjg@chromium.org, etienne.carriere@linaro.org Subject: [PATCH v4 1/5] spl: mmc: Support OP-TEE payloads in Falcon mode Date: Mon, 31 May 2021 12:43:10 -0500 Message-Id: <20210531174314.1395666-2-mr.nuke.me@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210531174314.1395666-1-mr.nuke.me@gmail.com> References: <20210531174314.1395666-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.102.4 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 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/common/spl/spl_mmc.c b/common/spl/spl_mmc.c index add2785b4e3..bab558d055f 100644 --- a/common/spl/spl_mmc.c +++ b/common/spl/spl_mmc.c @@ -230,8 +230,10 @@ 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 OS image is not found. Instead found "); + puts(genimg_get_os_name(spl_image->os)); + puts(". Trying to start U-boot\n"); return -ENOENT; } -- 2.31.1