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=-6.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no 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 B12A2C433EF for ; Tue, 7 Sep 2021 18:46:56 +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 F19EF610E8 for ; Tue, 7 Sep 2021 18:46:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org F19EF610E8 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 4D44B82F34; Tue, 7 Sep 2021 20:46:53 +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="GSmDTfNN"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id DC27F83224; Tue, 7 Sep 2021 20:46:49 +0200 (CEST) Received: from mail-ot1-x32e.google.com (mail-ot1-x32e.google.com [IPv6:2607:f8b0:4864:20::32e]) (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 AB54582C84 for ; Tue, 7 Sep 2021 20:46: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-ot1-x32e.google.com with SMTP id m7-20020a9d4c87000000b0051875f56b95so299871otf.6 for ; Tue, 07 Sep 2021 11:46:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=subject:from:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=yIcyJ1Y9kvGLmaTaZRpfJ0SzPGz9UIb4FUgYJHaJh5s=; b=GSmDTfNNHsRZ18I4W8W6CWocz+T+QaxJXG/H8ReDdq9emr8lQGpiMzQVq5CXald8iI oe74mlbK+ZZGwbnFUnixNwGeHgqKKoo1uQ4Xe6+dksaw5AMDr3z+SsIaYswEbFixD2mm tBKV9TkJO6gVnCt3FLgAPGsuYElb6aD2Ww6h2d0mn5/Awl1i2h83YdnGGCD4MtVQQkt2 reN0DNXeM5q7LI432Nw/NV4UrURndqHNnEdaV6Gobdk9dflJCV0sqUEFzxJUNSC7tWOv sStrnvq9ZUMcrReJfp3+jYMLDFc9HUGtSFpkH89yipGzQkJOX1JZ9E2MQmQhUR+wYNjl NHZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=yIcyJ1Y9kvGLmaTaZRpfJ0SzPGz9UIb4FUgYJHaJh5s=; b=gox6s5fmiYw1sf+z66kQUdZuYK+4euSjl5Megm7sfC2uqKfJC4dytUD5AlxdU8miOK iWQpxSj6hIwKVkZIYyI9FKXZq/HMk8Ljc1i/K0LR9kqGa28NiPmSvJqBCkoaJ6Yy/mhM G0h32BLAFMR+WcbmD5Nh0FmbQ8PTqf1lOMCq7Q0qnFX+9BDT0GNp3zlc7p1DmMPZNeoP nzPdl2s0vQ5kq165lM2LwJ5DmhQTDR6t/yLiT7pNDvqDa3ihwMcRoMamK4djrEljLaov yHtAf4DA5z8f1THr6Zm2ugbiHjjJKU79/0XGTxu4CmSMrEWAfMXBV7v1mHw//LxRVShZ kqiQ== X-Gm-Message-State: AOAM532qcwk0R6wPRM2iFFJilqp2p9/LNC6cfNmWd2ZwISxlLhjP/imb gPYhEogHJj466NQP930ADdg= X-Google-Smtp-Source: ABdhPJxXaEyyVgylqUm41ZDwdLehiG++MxYJ6xSoBsDYfvzf8hPCtOr/DRsz7TlENsyWxDgUDxS9XQ== X-Received: by 2002:a05:6830:1f0a:: with SMTP id u10mr16539413otg.53.1631040404020; Tue, 07 Sep 2021 11:46:44 -0700 (PDT) Received: from nuclearis3.gtech (c-98-195-139-126.hsd1.tx.comcast.net. [98.195.139.126]) by smtp.gmail.com with ESMTPSA id c14sm2560343otd.62.2021.09.07.11.46.42 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 07 Sep 2021 11:46:43 -0700 (PDT) Subject: Re: [PATCH 1/2] lib: optee: remove the duplicate CONFIG_OPTEE From: "Alex G." To: Patrick DELAUNAY , Etienne Carriere Cc: U-Boot Mailing List , Andre Przywara , Bin Meng , Bryan O'Donoghue , Christian Gmeiner , Heinrich Schuchardt , Jens Wiklander , Kever Yang , Masahisa Kojima , Michael Walle , Michal Simek , Ovidiu Panait , =?UTF-8?Q?Pali_Roh=c3=a1r?= , Philipp Tomsich , Philippe Reynes , =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= , Samuel Holland , Sean Anderson , Simon Glass , Stefan Roese , Steffen Jaeckel , Tero Kristo , U-Boot STM32 References: <20210902115512.1.I1c6536da7609f8240549cccae2708e075dc9fcf3@changeid> <569089c3-8936-2a47-930e-218805064413@gmail.com> Message-ID: Date: Tue, 7 Sep 2021 13:46:41 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US 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 On 9/6/21 5:39 PM, Alex G. wrote: > > > On 9/6/21 11:53 AM, Patrick DELAUNAY wrote: >>> >>>> In fact, the SPL boot path for OP-TEE doesn't use this function. That's >>>> intentional. >>>> >>>> Here's what I suggest: >>>>     - Remove OPTEE_TZDRAM_BASE and _SIZE >>> There is some legacy here, board/warp7and board/technexion/pico-imx7d. >> >> >> it is not possible, it is used for U-Boot proper on other platforms >> >> board/warp7/warp7.c:38:        gd->ram_size -= CONFIG_OPTEE_TZDRAM_SIZE; >> board/warp7/warp7.c:122:    optee_start = optee_end - >> CONFIG_OPTEE_TZDRAM_SIZE; >> board/technexion/pico-imx7d/pico-imx7d.c:56: gd->ram_size -= >> CONFIG_OPTEE_TZDRAM_SIZE; >> include/configs/mx7_common.h:52:#if (CONFIG_OPTEE_TZDRAM_SIZE != 0) > > I have an idea how to work around that. This is what I had in mind [1]. With this, optee_verify_bootm_image() is just three or four checks. I propose that code which would have been under CONFIG_OPTEE_IMAGE, is instead moved under CONFIG_BOOTM_OPTEE. Thus there's no need for CONFIG_OPTEE_IMAGE in the first place, and all the other changes make sense. Alex [1] https://lists.denx.de/pipermail/u-boot/2021-September/459981.html