From patchwork Thu Jan 20 15:30:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masami Hiramatsu X-Patchwork-Id: 533548 Delivered-To: patch@linaro.org Received: by 2002:ad5:5d50:0:0:0:0:0 with SMTP id x16csp1677149imu; Thu, 20 Jan 2022 07:31:08 -0800 (PST) X-Google-Smtp-Source: ABdhPJznKcbmJNpNi73Rt1SC+fHYo5pDzUDRgWK+xgaCfs9Ktp5jSGZdqOGnPtKaK3RIA6oLJrMh X-Received: by 2002:a05:6402:4315:: with SMTP id m21mr37071171edc.67.1642692668726; Thu, 20 Jan 2022 07:31:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642692668; cv=none; d=google.com; s=arc-20160816; b=x02adw0wUcYLE9g+ILup5erJoS+/Y1GKwgfBAeExs3SQ6Dv99JvpkLu9cMruGFD8eJ FWAy/U7DVTKQmG4RXUSlM6XaYP6cZr3cVwd/Bp/sPXvlhGjFq6tDOmu7icFq5JQJYb8N +g8iQjkUkVQKWKT89ngilh9YzjI9an27Aqjb/2JNDbrdB/fCBjxvSZQSfYI81zg3nWaV st6bEXf4aZu7L9OrMn6oQvfYNL3k7WMBEkpG88fAQogZEv5YfRA40ywOBZ/l6NogpHXw zfP8EAjuIXj5H0DmuQmhqtI5z8nFElR4YTUHBw2r3l91Up/M1R3tF5yGRgc5FRTMZb+H omMg== 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=XEmObKmlmifU3tLu1J03zn6GRA8ZY8hMymHL7IiI85I=; b=k7mrrvJHIKRkQ99jICtyBbKOQcFy3DSunQdwCzf0UmBKPG9+SYRwclkO6LSanQpb9H rfjRamgVJMasJq/hUFlwM0lOdH87CPvLVwyyskhQsnJGvOzzRL6EJMw/M7nkA6EsJhAw FhpZXoQ5wLvUTQuv79JAVZxWoNDOsoV0yJBwlZ/UjrPU3N8SEqphOQ602H/tpdQ7rFkP yx12OzPltrH2jqYf38/pL0vNplA1uWhtEoyZVlu77jWXwCDC/guEf3y9ycOivr21Wx7h ghpFcOEqfcy3xZ9vMv8nc90+65uM/81HmCfrAGGylwnkoCLNBOUTOURgu4/GNvZC6J3a MU+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=M2H3x7ux; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 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. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id t22si2386333ejf.657.2022.01.20.07.31.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Jan 2022 07:31:08 -0800 (PST) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=M2H3x7ux; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 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 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) 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 autolearn=ham autolearn_force=no version=3.4.2 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-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 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