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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 2B62CC433F5 for ; Thu, 20 Jan 2022 15:31:09 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id C891D838BD; Thu, 20 Jan 2022 16:31:01 +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="M2H3x7ux"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 3E7C4838BB; Thu, 20 Jan 2022 16:31:00 +0100 (CET) Received: from mail-pf1-x42b.google.com (mail-pf1-x42b.google.com [IPv6:2607:f8b0:4864:20::42b]) (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 1AE2F838BD for ; Thu, 20 Jan 2022 16:30:57 +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-pf1-x42b.google.com with SMTP id u130so1617088pfc.2 for ; Thu, 20 Jan 2022 07:30:57 -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=XEmObKmlmifU3tLu1J03zn6GRA8ZY8hMymHL7IiI85I=; b=M2H3x7uxJJewhe5BP1GhNj0z3Dv/Qkm//xYJ8APczZDM26OsDc4h27zoplxbZOuhy3 GGRgek+2wEaz4GgT+5Fp5wBroG24k79lYu9vLWbTRL1NghvjpXlF0JswWb7MwtowhHYI FOKifIUmiFQfqV0K85K8eWK4x5JAAJ18eSEIgfsXlkMNmPPQFrtdLfJq/YoN+8yPQv2K SSIX1xBwAGFSdSnCfXlkqriLl+C7seF5NrSQ2DenonW7Z4awmls+mrI1l4ZFU0s1s5eI CXezkGCl84J78U9OktVdVS1eJcJ/BBkUdStyZlBRCTSxFJfjYcLoU7Blf/6Sz366hbzl HfZA== 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=XEmObKmlmifU3tLu1J03zn6GRA8ZY8hMymHL7IiI85I=; b=3jRoj5uMOCFRrPgdOPLseB8zsz3KXUZl/ViLVCtNdecf3RmHbTcv3t4CrxHJrD/7GL BLqYhteiarM17qoyPtcQBfqxClpeSwnTrFhTS4qMu3PEPom1+aQy1l26zuv9vMl7VVZv 8oY75sPnzti7L7dORP4WvFzCLlAGbT7SvUoqhuuzsp4HZkMR9ePEzLRTZRxd7GbXrFhZ FvMm6Q3Mxrkf/djgdka6vCfU8ExqY85PSGn5Q98LPQMyyiD/XmC1JWgHtDrTAtiT2QRJ ZgcsHL+ASY6bVxbkNALsVnz8cdhJo/bI4mhneFusIl49tj2dPsexk0C/BjvX7vZk0M7Y sWZw== X-Gm-Message-State: AOAM532s5bS3QmO0wPYrLpgd7br7+f8LHSExgpz0ZXONPMU/Tsg10LbG pr+PcWdAFqePKUaYiEUxaucOL+7QDxiU6g== X-Google-Smtp-Source: ABdhPJykp2zabM2jmdil9uQyuI9g5VBfyanJdl9Mt3v2Nq6rFwecUDQubDl5DkNIlR7FVWczJtrYZw== X-Received: by 2002:a63:705c:: with SMTP id a28mr31799457pgn.339.1642692655012; Thu, 20 Jan 2022 07:30:55 -0800 (PST) Received: from localhost.localdomain (113x37x226x201.ap113.ftth.ucom.ne.jp. [113.37.226.201]) by smtp.gmail.com with ESMTPSA id q9sm3758677pfj.113.2022.01.20.07.30.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Jan 2022 07:30:54 -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 09/14] synquacer: Update for TBBR based new FIP layout Date: Fri, 21 Jan 2022 00:30:50 +0900 Message-Id: <164269265032.39378.8292306024930547380.stgit@localhost> X-Mailer: git-send-email 2.25.1 In-Reply-To: <164269255955.39378.260729958623102750.stgit@localhost> References: <164269255955.39378.260729958623102750.stgit@localhost> User-Agent: StGit/0.19 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit 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.2 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 da57dc288f..484f6b7336 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 0409589152..6d67bd2af5 100644 --- a/include/configs/synquacer.h +++ b/include/configs/synquacer.h @@ -48,9 +48,7 @@ /* Since U-Boot 64bit PCIe support is limited, disable 64bit MMIO support */ #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