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=-19.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,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 5358AC432BE for ; Tue, 31 Aug 2021 18:21:18 +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 84AD060F6C for ; Tue, 31 Aug 2021 18:21:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 84AD060F6C Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=ti.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 3D622831D8; Tue, 31 Aug 2021 20:21:08 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.b="StR7SbiD"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 96ED482EDA; Tue, 31 Aug 2021 20:21:01 +0200 (CEST) Received: from fllv0015.ext.ti.com (fllv0015.ext.ti.com [198.47.19.141]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 156FC82D93 for ; Tue, 31 Aug 2021 20:20:56 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=nm@ti.com Received: from lelv0266.itg.ti.com ([10.180.67.225]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 17VIKtSM082005; Tue, 31 Aug 2021 13:20:55 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1630434055; bh=g2E/EkHjywXwvSPMHKQkld7LMBsC/3xIoaZJkFkqut4=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=StR7SbiDA53nNjcqm++DEyjoZAI3B0rufs04HR+hoUXhzFGVMjg9iDj/iJP/A+ajA eqLVXJuPxH1rd7Rd/XxEC27Ef+FOYhFKwT6Mgkwwkpkbh8WtYPtQE+a3ksKp54V8wU 20RUZi1xHP50nbSoJBGVQ6x3YN3woAVJlQt5noG0= Received: from DFLE100.ent.ti.com (dfle100.ent.ti.com [10.64.6.21]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 17VIKthu091495 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 31 Aug 2021 13:20:55 -0500 Received: from DFLE107.ent.ti.com (10.64.6.28) by DFLE100.ent.ti.com (10.64.6.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.14; Tue, 31 Aug 2021 13:20:54 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) by DFLE107.ent.ti.com (10.64.6.28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.14 via Frontend Transport; Tue, 31 Aug 2021 13:20:54 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id 17VIKsSX078545; Tue, 31 Aug 2021 13:20:54 -0500 From: Nishanth Menon To: Lokesh Vutla , Tom Rini CC: , Nishanth Menon Subject: [PATCH 2/2] tools: k3_fit_atf: Change DM load address to avoid conflict Date: Tue, 31 Aug 2021 13:20:49 -0500 Message-ID: <20210831182049.24636-3-nm@ti.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210831182049.24636-1-nm@ti.com> References: <20210831182049.24636-1-nm@ti.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 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 DM binary is expected to be an elf file. The expected address of this elf is in the range of 0xa000_0000 in DDR. In the current configuration, elf file is loaded to the exact same address and we invoke load_elf_image_phdr to decode and memcpy sections of the elf to the same address range, we are eventually going to overwrite sections of the original elf image itself corrupting the DM firmware as a result. To prevent this, we must load the DM section to an address that does'nt overlap with the actual section address where it will eventually be copied to. Lets add an offset of 256MB to a lesser used DDR address, yet within the typical 1GB address space. We may need to consider going for a configuration option if this is turning to be a limitation (boards with lesser DDR space). Signed-off-by: Nishanth Menon --- tools/k3_fit_atf.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/k3_fit_atf.sh b/tools/k3_fit_atf.sh index 3a476ced98b1..6469f188e8ff 100755 --- a/tools/k3_fit_atf.sh +++ b/tools/k3_fit_atf.sh @@ -67,8 +67,8 @@ cat << __HEADER_EOF arch = "arm32"; compression = "none"; os = "DM"; - load = <0xa0000000>; - entry = <0xa0000000>; + load = <0xb0000000>; + entry = <0xb0000000>; }; spl { description = "SPL (64-bit)"; -- 2.32.0