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.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 21114C433EF for ; Tue, 7 Sep 2021 17:08:02 +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 98D0360187 for ; Tue, 7 Sep 2021 17:08:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 98D0360187 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 A7D1D832C8; Tue, 7 Sep 2021 19:07:35 +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="QgesC6w2"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 88B328329D; Tue, 7 Sep 2021 19:07:28 +0200 (CEST) Received: from mail-oi1-x235.google.com (mail-oi1-x235.google.com [IPv6:2607:f8b0:4864:20::235]) (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 CE698832BE for ; Tue, 7 Sep 2021 19:07:16 +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-oi1-x235.google.com with SMTP id h133so13625172oib.7 for ; Tue, 07 Sep 2021 10:07:16 -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=gMU7fArhVwzydsv2wU0gw0eawzNiFCZ6UOKIncwM7Jg=; b=QgesC6w2QArleQi8MTiTM8KNwrTcEUqxTBZMFx5HyPA7Y7EMN37bz/bS+ZvJV7YsBJ EIXGZgSAyLEKMQVucPBpbsP34U0QhlMNnaPFZ5qSuFtqnKbaO2x5LcURpuADx+5OhYiO vqdNOR53Uhjp8z8D6zp5KjgcmzV+eqtN2DGYJr6ASpCZ8rUUi1KjwOW/emwtnPGPiW6q UwWc0e30N26PNiZoeyHUqRUJTQtLUl25rCNbtziKatMo+nCO1LNrfUsU1KzTrlXVpJr+ 9oXddwNJA834O71P36Sv4LrsRwuesN4UccMyx/myFTQgEznuWdK8oLCQeFTLNs3/m2Me 8Dhw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=gMU7fArhVwzydsv2wU0gw0eawzNiFCZ6UOKIncwM7Jg=; b=krTuHcU6eC/t/XMuZQHSWVrwBD2wNsZx+hQHW7yf4auY0XocasOM6VP0684Tr7T53G MF5krOpyRtDdTDuKQxAqrsqZtArpf5l8XbPDrWU97ztp+SgL4PRJME1uheHRC0fjc5Pl FjnNWWbLQRUg05rAd9vT/b1Lwr+C1ImtqqrjhdYciI4lW2Q5wo6l0yF46eSYraDcQFmp 0DqKpKQOtX5P6WqzMC9KYVjDmoAPSj9j4ggFuEf8EiNvARh9gktNOm6ML6HJVYMDKCs7 WM3Q/5alxIOzceuA3Sm6GdTqOHK4rLG75/L5Zafa7ir+2184231bX/5+GDNH+evE1mkp NiVQ== X-Gm-Message-State: AOAM5317nEuSX1PUQbW8AJ/JPySSth/COLjjcz+Ovpu6g5rLLCossk0K EsJIpTKecXfBR/+4IY+XiyDPYKGEqJQ= X-Google-Smtp-Source: ABdhPJzqsjJSQ3ZvI37K6RjTXLrYJzHQTbUUpYDghROlMRECLBW38E4ZdPLAB3zwFa8QqEPEz4Obww== X-Received: by 2002:aca:da05:: with SMTP id r5mr3664976oig.30.1631034435071; Tue, 07 Sep 2021 10:07:15 -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 z1sm2340898ooj.25.2021.09.07.10.07.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Sep 2021 10:07:14 -0700 (PDT) From: Alexandru Gagniuc To: u-boot@lists.denx.de Cc: Alexandru Gagniuc , patrick.delaunay@foss.st.com, etienne.carriere@linaro.org, sbabic@denx.de, festevam@gmail.com Subject: [PATCH 3/4] lib: optee: Remove CONFIG_OPTEE_LOAD_ADDR Date: Tue, 7 Sep 2021 12:07:08 -0500 Message-Id: <20210907170709.2684890-4-mr.nuke.me@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210907170709.2684890-1-mr.nuke.me@gmail.com> References: <20210907170709.2684890-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 This value is not used by u-boot, and it should not. The load address of an OPTEE image is defined by said image. Either a uImage or a FIT will have a defined load address and entry point. Those values are the correct ones, not CONFIG_OPTEE_LOAD_ADDR. Commit f25006b96e9f ("optee: Add CONFIG_OPTEE_LOAD_ADDR") justifies this config by requiring its presence in u-boot's .config for other images as part of a larger build, claiming it is "the best way". This argument is not persuasive. U-boot's configuration is driven by platform requirements, not the other way around. It seems more likely that the argument is conflating tooling issues with Kconfig. Yocto and buildroot have excellent mechanisms for defining values across the board (pun intended). u-boot's Kconfig is the wrong place to do it. Furthermore, it is not "best" for u-boot because it hardcodes a value which is then not used. In fact the load address that u-boot uses is the one derived from the OPTEE image. Confused yet? I sure was. To prevent future confusion, remove CONFIG_OPTEE_LOAD_ADDR. Signed-off-by: Alexandru Gagniuc --- configs/warp7_defconfig | 1 - include/configs/warp7.h | 5 ----- lib/optee/Kconfig | 7 ------- 3 files changed, 13 deletions(-) diff --git a/configs/warp7_defconfig b/configs/warp7_defconfig index 1514019064..b872548464 100644 --- a/configs/warp7_defconfig +++ b/configs/warp7_defconfig @@ -71,6 +71,5 @@ CONFIG_USB_GADGET_DOWNLOAD=y CONFIG_USB_ETHER=y CONFIG_USB_ETH_CDC=y CONFIG_USBNET_HOST_ADDR="de:ad:be:af:00:00" -CONFIG_OPTEE_LOAD_ADDR=0x84000000 CONFIG_OPTEE_TZDRAM_SIZE=0x3000000 CONFIG_BOOTM_OPTEE=y diff --git a/include/configs/warp7.h b/include/configs/warp7.h index a5d52e3977..0df7e3b146 100644 --- a/include/configs/warp7.h +++ b/include/configs/warp7.h @@ -34,10 +34,6 @@ #define BOOT_SCR_STRING "source ${bootscriptaddr}\0" #endif -#ifndef CONFIG_OPTEE_LOAD_ADDR -#define CONFIG_OPTEE_LOAD_ADDR 0 -#endif - #define CONFIG_EXTRA_ENV_SETTINGS \ CONFIG_DFU_ENV_SETTINGS \ "script=boot.scr\0" \ @@ -52,7 +48,6 @@ "fdt_file=imx7s-warp.dtb\0" \ "fdt_addr=" __stringify(CONFIG_SYS_FDT_ADDR)"\0" \ "fdtovaddr=0x83100000\0" \ - "optee_addr=" __stringify(CONFIG_OPTEE_LOAD_ADDR)"\0" \ "boot_fdt=try\0" \ "ip_dyn=yes\0" \ "mmcdev="__stringify(CONFIG_SYS_MMC_ENV_DEV)"\0" \ diff --git a/lib/optee/Kconfig b/lib/optee/Kconfig index 831e9f4ac6..26677b7548 100644 --- a/lib/optee/Kconfig +++ b/lib/optee/Kconfig @@ -7,13 +7,6 @@ config OPTEE OPTEE specific checks before booting an OPTEE image created with mkimage. -config OPTEE_LOAD_ADDR - hex "OPTEE load address" - default 0x00000000 - depends on OPTEE - help - The load address of the bootable OPTEE binary. - config OPTEE_TZDRAM_SIZE hex "Amount of Trust-Zone RAM for the OPTEE image" default 0x0000000 -- 2.31.1