From patchwork Wed Sep 5 10:56:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 145984 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp4778442ljw; Wed, 5 Sep 2018 03:56:39 -0700 (PDT) X-Google-Smtp-Source: ANB0VdaCT9ROHH7ag3qAPYo9xw6bL2o0FbFvqDlJHVBrmRTvlBhiFZ1thIIjNGTHqJ1cm64pSwCF X-Received: by 2002:a50:dd4b:: with SMTP id u11-v6mr42549352edk.298.1536144999285; Wed, 05 Sep 2018 03:56:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536144999; cv=none; d=google.com; s=arc-20160816; b=CAiUoNj7YrHW7XWZjoUZJe5C1hzq1/qnLYDViWIBRPya6U0ua8LtaoCdGhaQ7BSLQd q8LmJdMWzKr0NUah83jXFTyvkGOli7031j6lAwwHx3aks+OM5tnlD8aEbyuQtLoQcy8N cCGPNrJCRtLO105PSNKtumLAECvXGaoQeeDb8cAQnIqI3aiiQKchMhQmbwJMKdkqAFII vm4m69wS4mgh1b9CHBEYqRXkJ9g9gw/UZ/9y9eMlt+6MTN8OKMkYAT9p2fny4Dl+qaKA AoMigNEGE1CaPg4wHwiLN6r2XE4gM6FLx9+5oUTyJU7VorGs5k2ihru3YGL573K5DJLR TbqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:references:in-reply-to:message-id :date:to:from:dkim-signature; bh=zc4EGgtaAYQR+VmfAGiV3LDVi9gvzfNlk4wmvrJY6pg=; b=mSFOLnFazHkqGltqnkPg/X1LwvfoA7Qg24xRCznHfQo3AbLj6Dtizvnnce3qSc91PV MhngwL6A64puRQa+jGD1xKjEiGZmXSiy0zwMwf11EVAap3SPvmJjoR690Y7ReWy2bEBz 6hbRcMa5UwhS7NLOxRMWKjZiQ0hwk6X7Xas06EUCOYADltgiA+IKGF1jWzzhakTruoAm 3wd6BozGLcKXtdB2pP8RokYn+pLkjv1Fl7okMfw/Ej9bkX1C9HLxW48/gQUN/4yztuAY 0mQzyrxGJrzHK4VqhLLXDhJcGmwtmvR6pt55Xc9j8hIaItJkQIm0qgerZTBpsePWuaI/ F6fg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=PhY5f2eP; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id j2-v6si1464887edr.185.2018.09.05.03.56.39; Wed, 05 Sep 2018 03:56:39 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) client-ip=81.169.180.215; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=PhY5f2eP; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by lists.denx.de (Postfix, from userid 105) id D6F69C21E02; Wed, 5 Sep 2018 10:56:35 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_IN_MSPIKE_H2, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id E5FE3C21DA2; Wed, 5 Sep 2018 10:56:14 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 2575DC21C29; Wed, 5 Sep 2018 10:56:13 +0000 (UTC) Received: from mail-ed1-f68.google.com (mail-ed1-f68.google.com [209.85.208.68]) by lists.denx.de (Postfix) with ESMTPS id 79877C21BE5 for ; Wed, 5 Sep 2018 10:56:12 +0000 (UTC) Received: by mail-ed1-f68.google.com with SMTP id j62-v6so5710341edd.7 for ; Wed, 05 Sep 2018 03:56:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ePQ9pBdm8Snq1VjhqMIHxWFnxREGj3sMvEAYEz+J18I=; b=PhY5f2eP2o1ynomAnin5Pd69e2JiRX+XbskXK7LqEe4I0cXfelRy/v6CT6kQcNESz7 D2WfTrzZlag8Bs3qqVcL/h36TlYP+fqyieyYuBpxmDIzeNNQQfOzVga7mZIQjataz7uE bOaGbN0P85xYzYiNwY7dLi5oQBbcYnMB2TD/c= 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; bh=ePQ9pBdm8Snq1VjhqMIHxWFnxREGj3sMvEAYEz+J18I=; b=R8SWx6LOwJpRJ8C+hLSdDRDXZ8UKOBMI4zlW+TYVvGRndQaNShz1ixzjQsMdTyftxv aL8LNXKePnVngEwWeE6SLtF8ZXnUsAWuUlBexBUcB16y0nSxvOG5AnoubHNIkXQwMaxd o4ayBLzPbD+wmSoatQb7NeZK2rVzrrZXLKNx74FZeyBDhs1BKtu9wN5AMU7QE7x0Elaq hfObD9XuL3OFSwwIloFUYuQzH1HX/7SJL7oe9+mfO2bSdDN/k+XMRT56WLIvYlasLOsC BLrbnzwuH1CFkrnD/yKFKKZmK1zVSo40awpEdSXPEFoHcLCKsy/mWxZoE+QSzXb/KJAY LQFA== X-Gm-Message-State: APzg51A+Zr+as0ivoVw+3A3C0pSaKojayNgG69PxtPyfTbhJ1+eiYhva r2YUmkwnR0T44xxYH7cvBMCRRvvQH0o= X-Received: by 2002:a50:d75d:: with SMTP id i29-v6mr29639802edj.17.1536144971931; Wed, 05 Sep 2018 03:56:11 -0700 (PDT) Received: from event-horizon.net ([80.111.179.123]) by smtp.gmail.com with ESMTPSA id h34-v6sm1052235eda.58.2018.09.05.03.56.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Sep 2018 03:56:11 -0700 (PDT) From: Bryan O'Donoghue To: u-boot@lists.denx.de, fabio.estevam@nxp.com Date: Wed, 5 Sep 2018 11:56:05 +0100 Message-Id: <20180905105608.453-2-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180905105608.453-1-bryan.odonoghue@linaro.org> References: <20180905105608.453-1-bryan.odonoghue@linaro.org> Cc: Rui Miguel Silva Subject: [U-Boot] [PATCH 1/4] imx: mx7: avoid some initialization if low level is skipped X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" From: Rui Miguel Silva We can have the case where u-boot is launched after some other low level enabler, like for example when u-boot runs after arm-trusted-firmware and/or optee. So, because of that we may need to jump the initialization of some IP blocks even because we may no longer have the permission for that. So, if the config option to skip low level init is set disable also timer, board and csu initialization. Signed-off-by: Rui Miguel Silva Signed-off-by: Bryan O'Donoghue Cc: Stefano Babic Cc: Fabio Estevam Cc: Albert Aribaud Cc: Peng Fan Cc: u-boot@lists.denx.de Reviewed-by: Peng Fan --- arch/arm/mach-imx/mx7/soc.c | 2 ++ arch/arm/mach-imx/syscounter.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/arch/arm/mach-imx/mx7/soc.c b/arch/arm/mach-imx/mx7/soc.c index 7334ca9eb8..c38bd1ce46 100644 --- a/arch/arm/mach-imx/mx7/soc.c +++ b/arch/arm/mach-imx/mx7/soc.c @@ -133,6 +133,7 @@ u32 __weak get_board_rev(void) } #endif +#ifndef CONFIG_SKIP_LOWLEVEL_INIT /* enable all periherial can be accessed in nosec mode */ static void init_csu(void) { @@ -182,6 +183,7 @@ int arch_cpu_init(void) return 0; } +#endif #ifdef CONFIG_ARCH_MISC_INIT int arch_misc_init(void) diff --git a/arch/arm/mach-imx/syscounter.c b/arch/arm/mach-imx/syscounter.c index 676bb3caa9..2c319681fc 100644 --- a/arch/arm/mach-imx/syscounter.c +++ b/arch/arm/mach-imx/syscounter.c @@ -55,6 +55,7 @@ static inline unsigned long long us_to_tick(unsigned long long usec) return usec; } +#ifndef CONFIG_SKIP_LOWLEVEL_INIT int timer_init(void) { struct sctr_regs *sctr = (struct sctr_regs *)SCTR_BASE_ADDR; @@ -76,6 +77,7 @@ int timer_init(void) return 0; } +#endif unsigned long long get_ticks(void) { From patchwork Wed Sep 5 10:56:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 145985 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp4779431ljw; Wed, 5 Sep 2018 03:57:52 -0700 (PDT) X-Google-Smtp-Source: ANB0VdY25u8N/DMct7XPHpe60eipwkpa2s/Wb4vJLVBAsJo2KEGOt7DHOqX9X+gsqqohwDFxHdJN X-Received: by 2002:aa7:c2cd:: with SMTP id m13-v6mr41662840edp.79.1536145072602; Wed, 05 Sep 2018 03:57:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536145072; cv=none; d=google.com; s=arc-20160816; b=M2mIIijoVPSepNjLkjU8pE8Ql6s89EZ7raFcR3eryGzKLLUe8ti62Shz/yOldVtnVG IRSAqvgBQLGuXUlfeYbFcTBPneka+OaqXEunaYp9N+STlv27wODq5mljZuqJINll0Z2N 32Kl8dX2QLA6Tn6yFIGcDee1vcpHzjFsaMZ01TxAp2PlGwHFwirnf7k8LqgKJsMldIoc sLCYmYb4fl6h5ZTq+n6XgUIeh3Hkz7LEifODKo/MeqV57wmfVzHJ2fOw4foALQqr6oap V6qHZ54VJmNxjTzKspkhCHVn4l31BD+ZcoLMIFGj6MhiVk0+C3jOmLOFT8sM+7XfWi9H Zhvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:references:in-reply-to:message-id :date:to:from:dkim-signature; bh=h8RwTewS8cyknZH0/1ZWUB+OuyjVNN84eaWdPwIgNtI=; b=LdjxJZ8nVuIjGHq/Sl0e19mZRBpaPEVK1aFBCsDlWUB99avvIDg3vwUOGEMd/TFRo0 rdLAqGnO3WUAT2I+ZFifGgk9OEn2KTgCRe9KifDRwiPW6FAQenWwMnpCkD+xCWMOXbWw o4NsAqRj7SKwCdhvjOBrvTIUr8ZRWOt23aoiz+guKF6DD1fP3liFZLYuJP62Rcj4poVU NgSaaEga/duGp2izrDKgnixROyVoCl44CZ/w7l/B4U4nGNLvqBsAQD2zMuzEG9sDBPEk QcNXNvX+B2Wm3B7WTtqduv5PaKomLhI2TuGa3OflRzEy3z2UXUeP2AYFFVbXvlQI49c8 llWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=HYTQso2x; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id t26-v6si1021977eda.7.2018.09.05.03.57.52; Wed, 05 Sep 2018 03:57:52 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) client-ip=81.169.180.215; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=HYTQso2x; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by lists.denx.de (Postfix, from userid 105) id 1A685C21DD7; Wed, 5 Sep 2018 10:56:52 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_IN_MSPIKE_H2, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id CE799C21DF3; Wed, 5 Sep 2018 10:56:15 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id AED7BC21C29; Wed, 5 Sep 2018 10:56:13 +0000 (UTC) Received: from mail-ed1-f65.google.com (mail-ed1-f65.google.com [209.85.208.65]) by lists.denx.de (Postfix) with ESMTPS id 6462DC21BE5 for ; Wed, 5 Sep 2018 10:56:13 +0000 (UTC) Received: by mail-ed1-f65.google.com with SMTP id d8-v6so5736767edv.0 for ; Wed, 05 Sep 2018 03:56:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Iih8kw504awwFJaAvW5xezZBx9SSWG2n8Hawv4FvErM=; b=HYTQso2xt/UbXxWrTH6b+gTkdT3J4yVcQF1vDrTM0/WM0/nqSzkljyoK52GWBVj2Y0 z2Eja4jpzZgKnljbakwN4gH7MLAxGvn+fKiJnWdrPo1XsaBloefN3Fsr5qrQQFHO10nK 8P+PFHs+iY+V5y6qZbqJ5WFNe5PJkl0nwZ/Y0= 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; bh=Iih8kw504awwFJaAvW5xezZBx9SSWG2n8Hawv4FvErM=; b=oCsX8vOrHyLtskDGgxoHIf0NVk0TOaN7aVX2jUTrSMW7SqP8/TXqT7HZxgn3xmFBle F/tM2PrYO7wrWfPqEGeZCerzwMkps8fV7twPDD5Rj42chRDXXWtYOkNsepgkm+sdblZj xemE5/3UluX2b4VvZmQoEivCOHDy7NxpdHmOfg0WlCaTS6H9eq3Z4NAY/W0rAlAfnVhY FuYwUcKWHGr+nsepmxd68MxMm4e66vp3/obqEXiYg+cZa8awstAhBCdS1WEIhO9VCD/Y e42yZ7y75o1lc8KeoVgC9kKatIvtdWuIeNnTnYLFEyuNIKkINTAUyPAIHCRc2G/WxC5a diAQ== X-Gm-Message-State: APzg51ARxjgWnN9TF2oagqJp1MuFOtTVHneIbtLbaZWRtF0rXkGT08na XNfLM31Jq4Yiwa8j8QNqDJtynqi0+O0= X-Received: by 2002:a50:96c4:: with SMTP id z4-v6mr41734792eda.14.1536144972911; Wed, 05 Sep 2018 03:56:12 -0700 (PDT) Received: from event-horizon.net ([80.111.179.123]) by smtp.gmail.com with ESMTPSA id h34-v6sm1052235eda.58.2018.09.05.03.56.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Sep 2018 03:56:12 -0700 (PDT) From: Bryan O'Donoghue To: u-boot@lists.denx.de, fabio.estevam@nxp.com Date: Wed, 5 Sep 2018 11:56:06 +0100 Message-Id: <20180905105608.453-3-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180905105608.453-1-bryan.odonoghue@linaro.org> References: <20180905105608.453-1-bryan.odonoghue@linaro.org> Cc: Rui Miguel Silva Subject: [U-Boot] [PATCH 2/4] optee: adjust dependencies and default values for dram X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" From: Rui Miguel Silva We may have, the not yet considered, scenario where OPTEE is loaded before u-boot and *not* by u-boot, e.g, the boot flow using the ARM Trusted Firmware (ATF), where in the 32bit flow is: BootRom->ATF(BL2)->Optee(BL32)->u-boot(BL33) In this case we need still to reserve the memory used by optee, to avoid for example to realocate ourself to the same address at the end of DRAM. So, we change here the dependencies on the OPTEE lib and we set the default size and base of TZRAM to zero. Signed-off-by: Rui Miguel Silva Signed-off-by: Bryan O'Donoghue Cc: Fabio Estevam Cc: Ryan Harkin Cc: u-boot@lists.denx.de --- configs/warp7_defconfig | 2 ++ lib/optee/Kconfig | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/configs/warp7_defconfig b/configs/warp7_defconfig index 15a66739f8..a1c0b69ea8 100644 --- a/configs/warp7_defconfig +++ b/configs/warp7_defconfig @@ -46,5 +46,7 @@ CONFIG_USB_ETH_CDC=y CONFIG_USBNET_HOST_ADDR="de:ad:be:af:00:00" CONFIG_OF_LIBFDT=y CONFIG_OPTEE=y +CONFIG_OPTEE_TZDRAM_SIZE=0x3000000 +CONFIG_OPTEE_TZDRAM_BASE=0x9d000000 CONFIG_OPTEE_LOAD_ADDR=0x84000000 CONFIG_BOOTM_OPTEE=y diff --git a/lib/optee/Kconfig b/lib/optee/Kconfig index 1e5ab45c3d..3773d89c31 100644 --- a/lib/optee/Kconfig +++ b/lib/optee/Kconfig @@ -10,21 +10,20 @@ config OPTEE 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" - depends on OPTEE - default 0x3000000 + default 0x0000000 help The size of pre-allocated Trust Zone DRAM to allocate for the OPTEE runtime. config OPTEE_TZDRAM_BASE hex "Base address of Trust-Zone RAM for the OPTEE image" - depends on OPTEE - default 0x9d000000 + default 0x00000000 help The base address of pre-allocated Trust Zone DRAM for the OPTEE runtime. @@ -32,6 +31,7 @@ config OPTEE_TZDRAM_BASE config BOOTM_OPTEE bool "Support OPTEE bootm command" select BOOTM_LINUX + depends on OPTEE default n help Select this command to enable chain-loading of a Linux kernel From patchwork Wed Sep 5 10:56:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 145986 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp4780228ljw; Wed, 5 Sep 2018 03:58:54 -0700 (PDT) X-Google-Smtp-Source: ANB0VdY0ykTHkVAXY5y6+mv0pbOMHCVrpCEFwggGlZbbAlinp4ttA574VI6H6WZ+C3EV1UJyp0Si X-Received: by 2002:a50:f297:: with SMTP id f23-v6mr42337666edm.40.1536145133960; Wed, 05 Sep 2018 03:58:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536145133; cv=none; d=google.com; s=arc-20160816; b=vauT3EXSlxn+dGKVOZnkggp2cCx0KWTbSJZZBfuovWAL9xLzlVI+AClO3dDiHSaRcy Sa1MEFM7PtsH+SwUa3itqecxjj+cauCuK4XYB/8zbDhKYpgvkXIlrtQJVTM5jJEjnjYX 4+KK2pcPxdp0UdpduAkNrDWoqLvFZQ1cIljjBSXYgqhl+dXGTk/wQQL6V+A0l9IY74BZ JB8Pzr5ihpIqVCHAMVa+cSL4cM472WsFPDu8CnU+PJFyalZAmS0puvnY7ma9YDajRIuF +dC1pkG7uT1xN6u10KOJTrhyFQgGoriCduwFxMxFHZg2NsJGahdaID32BnrbFCGJTwEr JIdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:references:in-reply-to:message-id :date:to:from:dkim-signature; bh=5wZG85mjU+V3hDYBARDdqc8MIMZndIaulZMCubW/ZMo=; b=JXKNr4dl3ddUHsKEMELIMyIk/C5heYHP2X/Wks5+ztN1YFKw+ElCRY33EQnI+x+Sv1 9sWXlIUl8CEldw/YoIDcGPy+z75I2DFcigmELKKedvsdGodFnTir76GZ1OvWeHWaVW1P ldEc7yJuVscFcsxb+j+Ez5IrZP7NJMB/sbSmWKnZiBzXNSgP6Mfs+gsChmh18WKfKx7C 57NBdpdtdiqdnWmttZBucKJC/Rt/eocg0WVpFaeYlUjrrdomcvY+BXScFoEpBt2a8WZV Nbi6OBY8cpZOw6QUAAzfYjwHmHrJFB2L5Z5iGMfiTz61zACZRzuCG98TMPgeH0GGVTxl 2FJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=Lrz2RUk4; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id z14-v6si1151217edj.223.2018.09.05.03.58.53; Wed, 05 Sep 2018 03:58:53 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) client-ip=81.169.180.215; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=Lrz2RUk4; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by lists.denx.de (Postfix, from userid 105) id 85157C21DA1; Wed, 5 Sep 2018 10:57:10 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_IN_MSPIKE_H2, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 8636DC21E0B; Wed, 5 Sep 2018 10:56:25 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id BA044C21C29; Wed, 5 Sep 2018 10:56:18 +0000 (UTC) Received: from mail-ed1-f50.google.com (mail-ed1-f50.google.com [209.85.208.50]) by lists.denx.de (Postfix) with ESMTPS id 5E296C21D74 for ; Wed, 5 Sep 2018 10:56:14 +0000 (UTC) Received: by mail-ed1-f50.google.com with SMTP id h4-v6so5701694edi.6 for ; Wed, 05 Sep 2018 03:56:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=kYPAt5U7oZtUBmO6MDK38Kg0Ege0TAghEAfNfPjpRxo=; b=Lrz2RUk4NRIUtxrLGNyMIsc7Mtge4pmWf4jroUVpNMMt5H7Ejis5KZbQVIQivDqCE5 QyvVF+m1FoyVe4N44aTpE4/S4D9ykvNVs+1K4T3+6jrHdBnmerhZ/dJmEw1QAxHyX60z wPJc3u9bHrI5KuVZlwigQXDj0xXhVazqHdslg= 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; bh=kYPAt5U7oZtUBmO6MDK38Kg0Ege0TAghEAfNfPjpRxo=; b=bP+8sw+ZCOi49aTHbpqHUYxNW9ertIBkyDzSSJBB8TzeGuuqx7+L7snPfTfUeyu8vf 4ItTCKOMgL7YTsHJUBm6yHPRdRMsKukdPa/v9uPV1I+iOYbplDvFx5yVdHvsQbHhmTiN 1Msi81FrMw7MvG7qDn/gCnrNp6LP85Yo2S2fukR0ITUIOAR+p4nyNc5NjX6Zkawyi7+5 udzTdZDBF4KJsD3MAK9YnFq0CLhQXd6QX3FydmJxXp9NXABV9zUzBJU3mrqhwcGr19mh wmBBJGn+T9a7XDwXBBgqMBfJzMXV+DqnKj84RkuAgJZgADhB4bEJMpY2LaabosDD+xVE nwFg== X-Gm-Message-State: APzg51CdvPrGOsriU3RJMVh3D9XqtJAAMVcY6GClyz8tK6lNCjQEYmlK SuTh7XKjOOdDkTnRcHl2sIvYLFcDvIU= X-Received: by 2002:a50:8ea1:: with SMTP id w30-v6mr41451859edw.197.1536144973827; Wed, 05 Sep 2018 03:56:13 -0700 (PDT) Received: from event-horizon.net ([80.111.179.123]) by smtp.gmail.com with ESMTPSA id h34-v6sm1052235eda.58.2018.09.05.03.56.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Sep 2018 03:56:13 -0700 (PDT) From: Bryan O'Donoghue To: u-boot@lists.denx.de, fabio.estevam@nxp.com Date: Wed, 5 Sep 2018 11:56:07 +0100 Message-Id: <20180905105608.453-4-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180905105608.453-1-bryan.odonoghue@linaro.org> References: <20180905105608.453-1-bryan.odonoghue@linaro.org> Cc: Rui Miguel Silva Subject: [U-Boot] [PATCH 3/4] warp7: include: configs: set skip low level init X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" From: Rui Miguel Silva If we have defined the OPTEE ram size and not OPTEE means that we are in the case where OPTEE is loaded already (maybe by ARM Trusted Firmware) and that most of the low level initialization is already done and that we may/should skip it doing them here. Signed-off-by: Rui Miguel Silva Signed-off-by: Bryan O'Donoghue Cc: Fabio Estevam Cc: u-boot@lists.denx.de --- include/configs/warp7.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/include/configs/warp7.h b/include/configs/warp7.h index 1b656a5aaf..a391dfb5c1 100644 --- a/include/configs/warp7.h +++ b/include/configs/warp7.h @@ -13,6 +13,17 @@ #define PHYS_SDRAM_SIZE SZ_512M +/* + * If we have defined the OPTEE ram size and not OPTEE it means that we were + * launched by OPTEE, because of that we shall skip all the low level + * initialization since it was already done by ATF or OPTEE + */ +#ifdef CONFIG_OPTEE_TZDRAM_SIZE +#ifndef CONFIG_OPTEE +#define CONFIG_SKIP_LOWLEVEL_INIT +#endif +#endif + #define CONFIG_MXC_UART_BASE UART1_IPS_BASE_ADDR /* Size of malloc() pool */ From patchwork Wed Sep 5 10:56:08 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 145987 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp4780353ljw; Wed, 5 Sep 2018 03:59:05 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbmJnKwSrsYnRQrQ/AG003QqHYVRNVIGsxWFaG6lmywwGeZgCh77LcR+w0V3QzEcN6M7B5g X-Received: by 2002:a50:bc03:: with SMTP id j3-v6mr41579383edh.34.1536145145223; Wed, 05 Sep 2018 03:59:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536145145; cv=none; d=google.com; s=arc-20160816; b=iGzrnkkQxyVIRc62Xv7+/wlvVO8MsxHC8+zoLN6D34UElWN7dGa0j5CTljLNwstS8p atKhPxokUf4KNuFGxtnF+cJ+S9IK8qxwp74U6jk8rFyFaz8ylGGnJOUhppn17z85ZYrl OTUMPOBzFSNe+a8D7YVENGLCYDN6Bs3I47atUhGwqQiRQXcLc5+unC3JQkIjmWbMbw/U T4hyHMr/RMmZZ4W8YyvEUAmNGgKBWz0PrI4VVNVx6HTC2hhonVDYG/LUXeohCIYRhXyQ c97g5xGj3N47JPObRBuSwH4S2yKNw5KBP0On7bGuTTtut9fIbNSVGPGmcOKoouqG5umk kRvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:references:in-reply-to:message-id :date:to:from:dkim-signature; bh=x+F0EYeOa3M/zcRCYCZ4spiBDtI288+CU/AZOLgT9Ug=; b=QvDankRkKb2HTf6yBHUDOvYMioargF0yE7B3oyiDCvFB4CxXMql1eb7qVLg0mtpq5l llC4x4JBs9vYGHpQKGzu60A8xPcbmpCVfDBd6aoC2oO7reCSf2+Ooc/2iQwXozyVOHAL yoL0Qn0OvM5j5fVlBlhepS23tN55tObPU0f7Nj7859P7tCvaERP/yk9UfB9+cR396XUe 1GJk0wchX99NgznVtOKPt0u1KxZpmfurRagBYccz634LyRcUFP2q62zT0Evpv5brExGe BeshxOtW+HluTqn7L1rHfeQrXzYt+Nr+RUmOHvc9r9GlNnyKg3CFW53v1yyIZbHJH7P0 EFvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=SBUt3QX+; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id s11-v6si299132eda.187.2018.09.05.03.59.04; Wed, 05 Sep 2018 03:59:05 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) client-ip=81.169.180.215; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=SBUt3QX+; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by lists.denx.de (Postfix, from userid 105) id CFFF4C21DD3; Wed, 5 Sep 2018 10:57:38 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_IN_MSPIKE_H2, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 75B25C21DDC; Wed, 5 Sep 2018 10:56:33 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 815D8C21E16; Wed, 5 Sep 2018 10:56:20 +0000 (UTC) Received: from mail-ed1-f43.google.com (mail-ed1-f43.google.com [209.85.208.43]) by lists.denx.de (Postfix) with ESMTPS id 9F492C21DE8 for ; Wed, 5 Sep 2018 10:56:15 +0000 (UTC) Received: by mail-ed1-f43.google.com with SMTP id y20-v6so5728595edq.2 for ; Wed, 05 Sep 2018 03:56:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=a2hqxhazqADjHwToPjgT7YcHH5cnulLkrRt8/M7m1Ns=; b=SBUt3QX+NpjvOtLqwL7hmIlJrV4ADpLVVKrtmR/9p0udRKwKBA3sPM0A9DOa04zOlz FUtoIvNZWv879ReyGMXA8It6k1/ENb2uhZ+56Etgi0Yoxd+fzEx18LYuyqs5zXw2eCm5 llYxJVzQA6rUckIEQYO41acvjUkJGvrsdGOyc= 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; bh=a2hqxhazqADjHwToPjgT7YcHH5cnulLkrRt8/M7m1Ns=; b=Hz+HZHhf8/BEHZDMmBNJ6ZkGq7e6x0+KKMdSOSPOLRKewRjSZYDwPMD1GtATRfD3nq Cj0q9nAdjQSX8RIyg0Tmi5yeK5psoKo52oaXsDs6fUz5pyZBEo/07UeAYmqVZ0ldQLhG l5BhIMHI7+XT2q4RhhHqJd8Bt4BfRU+WC0aZaavRpSz06Dk5Vo+t7DxIadvtzzgNToPs lzaEPNNkfF0wNrltR44wGuA7FU+KEp89mCPJxJGL/wnbdtZk+c6cqIuG5P8qkjh1H9BQ pWLrRYCiAv223dhbzhJnR7ZKVeKHU1RDyd+rVS9C342JzPgIf6WLSzY+KcPW8ljfLq7S gQxQ== X-Gm-Message-State: APzg51BMLxrBaVEOO06a+cHRD+kcnmuyHmLFQJXxHuRXHmLywfeRJxVh UrQv5ILOlp3BXQRKr/VqTu4fMx8LkAk= X-Received: by 2002:a50:b1d1:: with SMTP id n17-v6mr40925354edd.52.1536144974895; Wed, 05 Sep 2018 03:56:14 -0700 (PDT) Received: from event-horizon.net ([80.111.179.123]) by smtp.gmail.com with ESMTPSA id h34-v6sm1052235eda.58.2018.09.05.03.56.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Sep 2018 03:56:14 -0700 (PDT) From: Bryan O'Donoghue To: u-boot@lists.denx.de, fabio.estevam@nxp.com Date: Wed, 5 Sep 2018 11:56:08 +0100 Message-Id: <20180905105608.453-5-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180905105608.453-1-bryan.odonoghue@linaro.org> References: <20180905105608.453-1-bryan.odonoghue@linaro.org> Cc: Rui Miguel Silva , Maxime Ripard Subject: [U-Boot] [PATCH 4/4] warp7: configs: add bl33 defconfig X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" From: Rui Miguel Silva Add default configuration to run u-boot as BL33 in the ARM Trusted Firmware boot flow for AArch32 case. Signed-off-by: Rui Miguel Silva Signed-off-by: Bryan O'Donoghue Cc: Fabio Estevam Cc: Simon Glass Cc: Maxime Ripard Cc: Lukasz Majewski Cc: Tuomas Tynkkynen Cc: u-boot@lists.denx.de --- configs/warp7_bl33_defconfig | 42 ++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 configs/warp7_bl33_defconfig diff --git a/configs/warp7_bl33_defconfig b/configs/warp7_bl33_defconfig new file mode 100644 index 0000000000..bed970b014 --- /dev/null +++ b/configs/warp7_bl33_defconfig @@ -0,0 +1,42 @@ +CONFIG_ARM=y +CONFIG_ARCH_MX7=y +CONFIG_SECURE_BOOT=y +CONFIG_SYS_TEXT_BASE=0x87800000 +CONFIG_TARGET_WARP7=y +CONFIG_ARMV7_BOOT_SEC_DEFAULT=y +CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/warp7/imximage.cfg" +CONFIG_HUSH_PARSER=y +CONFIG_CMD_BOOTZ=y +CONFIG_CMD_MEMTEST=y +CONFIG_CMD_DFU=y +CONFIG_CMD_GPIO=y +CONFIG_CMD_MMC=y +CONFIG_CMD_PART=y +CONFIG_CMD_USB=y +CONFIG_CMD_USB_MASS_STORAGE=y +CONFIG_CMD_SETEXPR=y +CONFIG_CMD_DHCP=y +CONFIG_CMD_CACHE=y +CONFIG_CMD_EXT2=y +CONFIG_CMD_EXT4=y +CONFIG_CMD_EXT4_WRITE=y +CONFIG_CMD_FAT=y +CONFIG_CMD_FS_GENERIC=y +CONFIG_NET_RANDOM_ETHADDR=y +CONFIG_DFU_MMC=y +CONFIG_FSL_ESDHC=y +CONFIG_USB=y +CONFIG_USB_EHCI_HCD=y +CONFIG_MXC_USB_OTG_HACTIVE=y +CONFIG_USB_STORAGE=y +CONFIG_USB_GADGET=y +CONFIG_USB_GADGET_MANUFACTURER="FSL" +CONFIG_USB_GADGET_VENDOR_NUM=0x0525 +CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5 +CONFIG_CI_UDC=y +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_OF_LIBFDT=y +CONFIG_OPTEE_TZDRAM_SIZE=0x2000000