From patchwork Thu Feb 17 15:11:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masami Hiramatsu X-Patchwork-Id: 543384 Delivered-To: patch@linaro.org Received: by 2002:ac0:e142:0:0:0:0:0 with SMTP id r2csp448392imn; Thu, 17 Feb 2022 07:12:22 -0800 (PST) X-Google-Smtp-Source: ABdhPJxk9K4Fsa5lzHGtTQacS4f04O5zjxrBIDQMgYBC40Xgr3rP72756hgjILwrm3dk0RcvIBqX X-Received: by 2002:a17:906:24cb:b0:6ce:b0a2:db5a with SMTP id f11-20020a17090624cb00b006ceb0a2db5amr2750324ejb.260.1645110741987; Thu, 17 Feb 2022 07:12:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645110741; cv=none; d=google.com; s=arc-20160816; b=FIIhSnJfKgXU3QfGiAomNbZ02w0DL460ghyokaGELXwRe0HwQgJcoauGAEiQ71NuV7 +gPyX09+t5sHBpndd9KMNL0MRgJ+Lsbt58eKC6uVUdTbYMMWUS4gNTXyGZ/5YxOU7aWh KlTFK48jnCfXCk8Pt4iZaSnXk9fgyMf0GZcPPdxmt9TtcXDQPobYyElORxgRQaqpd3kv PEFLzMl2I0YMLdHoSJDBgW+JlFvxHABKRvX0JPmuCS3sSa9XrzW0IhMG6FvfR1bJnuXh zSisg7/9vMGfpKF9iy109F7SpjuEXe7ZS4s6gSzO+PmXH1Hq8tB3NOKx124MaUq5cQzg yD2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:user-agent:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=fLwMnWGTuZdhAa4MpS56FKtJ9Wu08ySNGVzVgFGXKD8=; b=GR51BBRUcub48HphvhJgw9M+nClsFnFSQx2oySEjfPkCQjzq+XNI9sTmBMhByJdrMT HtaBHfNrX2QbTexUygPB76qcrzt2QSPtSGkhSIy4WbKcLvPunZquwYn8qo5ievHGC9v+ db+An7oB1/N2R5tZ2hFpepzmCen4sj87xdz3An4QraFpujZru495KmI/M9oU3uld9GoZ yeLiwdvomesnxROLX16/Qp0CZ9mIdGh8OqngDDxK+f8LuKmBdG+XB8I5FiuxBIEcX64c AOT/kQ2LwKXx+YQM2dc5C6jmowLnPX+fHSDyg4I9k/5k6QTB6B8NMNVVpJqdE3qnZRn9 zNNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=tv1dOjGz; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [85.214.62.61]) by mx.google.com with ESMTPS id v7si3989207edj.356.2022.02.17.07.12.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Feb 2022 07:12:21 -0800 (PST) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=tv1dOjGz; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 8F1BB83BAB; Thu, 17 Feb 2022 16:12:20 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org 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=linaro.org header.i=@linaro.org header.b="tv1dOjGz"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 22F4583BAF; Thu, 17 Feb 2022 16:12:13 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pj1-x1032.google.com (mail-pj1-x1032.google.com [IPv6:2607:f8b0:4864:20::1032]) (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 B1D9E83BA6 for ; Thu, 17 Feb 2022 16:11:53 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=masami.hiramatsu@linaro.org Received: by mail-pj1-x1032.google.com with SMTP id a11-20020a17090a740b00b001b8b506c42fso9757545pjg.0 for ; Thu, 17 Feb 2022 07:11:53 -0800 (PST) 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 :user-agent:mime-version:content-transfer-encoding; bh=fLwMnWGTuZdhAa4MpS56FKtJ9Wu08ySNGVzVgFGXKD8=; b=tv1dOjGz2u1VqDYWe7oZjTc04n8LxeT98hAnUpgdlVb34tm+Ds656ErcEN095Wypvc cy2lBHMWf4F3dRyJh2rDi6q2+OTsC4x1/7jw9TJ6FlojjzLGg/hmLEWaY5JM4g7ITd57 ph816gKzVxdUNThTCGHqbht4JscBeJhCdUvqT8UjCotvrqEY+X/YmeOMvPYJ17mOydNR p/oClfQ7qfPAijxESlwMgoFEiwFdRMdHlRgaSjseUGpoHZGsbtADeYCXsiAErOJzSm/o E5F/vUibFNztLbVKKE4Uipv1Yb5QP8ZXjZbWR2BDj1OQuHPsKC4V4AB7cRcTJrFlSWqP B5og== 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:user-agent:mime-version:content-transfer-encoding; bh=fLwMnWGTuZdhAa4MpS56FKtJ9Wu08ySNGVzVgFGXKD8=; b=ETnyTeMyONpQRsY32XFLkO6a6nnW+Ls/6v7qmtAKGIgBq6UaEnaspcv6gt8WJWgWLe L47kZlx5u3ly9LUpy4NHlns7EYGlupY1+MVFM7sNb60hf7v12EvusRjfc/a6/dFN5jrs zIHfK0LaLDBfrt51j2JukBNVqkM7RXRZfxUNRmu72IByg8EFHPBgPQ+qT34/8OAlzSEq myhaxjyX/tXWzf428xyZ9//IGmpNXvpXhFE69Y+VqcD+FUouwWeVTQQuhQ2VItUinWUo DmDvzGLw6hZKD54towjvIcr7CnIKDzxmndLy79xQvzoyb1QBxE2+3z6Q1XUFaoEgMGXy ya6Q== X-Gm-Message-State: AOAM531wYEwaVWJ2vKZxt1TtapdqxDtE6hAmP/q5I1aFIPa34bTFFBYW lcOXFqLmXjd09JIdMZAg4BiAbc2IacXP0g== X-Received: by 2002:a17:90b:4b08:b0:1b7:d3fe:9870 with SMTP id lx8-20020a17090b4b0800b001b7d3fe9870mr7838381pjb.104.1645110711589; Thu, 17 Feb 2022 07:11:51 -0800 (PST) Received: from localhost.localdomain (113x37x226x201.ap113.ftth.ucom.ne.jp. [113.37.226.201]) by smtp.gmail.com with ESMTPSA id lk11sm2612003pjb.31.2022.02.17.07.11.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Feb 2022 07:11:51 -0800 (PST) From: Masami Hiramatsu To: u-boot@lists.denx.de Cc: Masami Hiramatsu , Patrick Delaunay , Patrice Chotard , Heinrich Schuchardt , Alexander Graf , AKASHI Takahiro , Simon Glass , Bin Meng , Ilias Apalodimas , Jose Marinho , Grant Likely , Tom Rini , Etienne Carriere , Sughosh Ganu , Paul Liu Subject: [RFC PATCH v2 3/8] synquacer: Update for TBBR based new FIP layout Date: Fri, 18 Feb 2022 00:11:46 +0900 Message-Id: <164511070645.43219.14952158157379789608.stgit@localhost> X-Mailer: git-send-email 2.25.1 In-Reply-To: <164511067605.43219.15508992404634142079.stgit@localhost> References: <164511067605.43219.15508992404634142079.stgit@localhost> User-Agent: StGit/0.19 MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.5 at phobos.denx.de X-Virus-Status: Clean This changes SPI NOR flash partition layout for TBBR and also make the U-Boot as position independent executable again because BL33 is loaded on the memory. With enabling TBBR, TF-A BL2 loads all BL3x images from FIP image, and the U-Boot image is added to the FIP image as BL33, and loaded to memory when boot instead of XIP on SPI NOR flash. To avoid mixing up with the legacy images, this new FIP image is stored on unused area (0x600000-) and the U-Boot env vars are also stored at 0x580000 so that it will not break existing EDK2 area. Signed-off-by: Masami Hiramatsu --- .../dts/synquacer-sc2a11-developerbox-u-boot.dtsi | 26 ++++++++++++++------ configs/synquacer_developerbox_defconfig | 5 ++-- include/configs/synquacer.h | 4 +-- 3 files changed, 22 insertions(+), 13 deletions(-) diff --git a/arch/arm/dts/synquacer-sc2a11-developerbox-u-boot.dtsi b/arch/arm/dts/synquacer-sc2a11-developerbox-u-boot.dtsi index 7a56116d6f..095727e03c 100644 --- a/arch/arm/dts/synquacer-sc2a11-developerbox-u-boot.dtsi +++ b/arch/arm/dts/synquacer-sc2a11-developerbox-u-boot.dtsi @@ -56,7 +56,7 @@ }; partition@180000 { - label = "FIP-TFA"; + label = "LegacyFIP"; reg = <0x180000 0x78000>; }; @@ -66,18 +66,28 @@ }; partition@200000 { - label = "U-Boot"; - reg = <0x200000 0x100000>; + label = "EDK2"; + reg = <0x200000 0x200000>; }; - partition@300000 { - label = "UBoot-Env"; - reg = <0x300000 0x100000>; + partition@400000 { + label = "EDK2-Env"; + reg = <0x400000 0x100000>; }; partition@500000 { - label = "Ex-OPTEE"; - reg = <0x500000 0x200000>; + label = "Metadata"; + reg = <0x500000 0x80000>; + }; + + partition@580000 { + label = "UBoot-Env"; + reg = <0x580000 0x80000>; + }; + + partition@600000 { + label = "FIP"; + reg = <0x600000 0x400000>; }; }; }; diff --git a/configs/synquacer_developerbox_defconfig b/configs/synquacer_developerbox_defconfig index 4fb0fba441..692919e1f5 100644 --- a/configs/synquacer_developerbox_defconfig +++ b/configs/synquacer_developerbox_defconfig @@ -1,9 +1,10 @@ CONFIG_ARM=y CONFIG_ARCH_SYNQUACER=y -CONFIG_SYS_TEXT_BASE=0x08200000 +CONFIG_POSITION_INDEPENDENT=y +CONFIG_SYS_TEXT_BASE=0 CONFIG_SYS_MALLOC_LEN=0x1000000 CONFIG_ENV_SIZE=0x30000 -CONFIG_ENV_OFFSET=0x300000 +CONFIG_ENV_OFFSET=0x580000 CONFIG_ENV_SECT_SIZE=0x10000 CONFIG_DM_GPIO=y CONFIG_DEFAULT_DEVICE_TREE="synquacer-sc2a11-developerbox" diff --git a/include/configs/synquacer.h b/include/configs/synquacer.h index 3d099b4f11..1b6e6d011e 100644 --- a/include/configs/synquacer.h +++ b/include/configs/synquacer.h @@ -52,9 +52,7 @@ /* #define CONFIG_SYS_PCI_64BIT 1 */ #define DEFAULT_DFU_ALT_INFO "dfu_alt_info=" \ - "mtd nor1=u-boot.bin raw 200000 100000;" \ - "fip.bin raw 180000 78000;" \ - "optee.bin raw 500000 100000\0" + "mtd nor1=fip.bin raw 600000 400000\0" /* Distro boot settings */ #ifndef CONFIG_SPL_BUILD