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 8B45AC369B1 for ; Wed, 16 Apr 2025 07:47:22 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 5EB2882DB0; Wed, 16 Apr 2025 09:46:42 +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="t4A14i6p"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 194E682D4A; Wed, 16 Apr 2025 09:46:41 +0200 (CEST) Received: from fllvem-ot03.ext.ti.com (fllvem-ot03.ext.ti.com [198.47.19.245]) (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 107EE82D4A for ; Wed, 16 Apr 2025 09:46:38 +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=anshuld@ti.com Received: from fllv0035.itg.ti.com ([10.64.41.0]) by fllvem-ot03.ext.ti.com (8.15.2/8.15.2) with ESMTPS id 53G7kbrY2600407 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 16 Apr 2025 02:46:37 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1744789597; bh=4iNDeVbpaf8R595Z4v5c5V5GY4SmsDwHlzMRwGz218I=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=t4A14i6pa7JznY0iDk7UbnWweL4vKY3Luz+JDqBI+2TDoP4LpDuEuw4b4wURAuzO2 i3UZuSRwMY3lnqJurEpo/DJ9jT0VNdDO6RI4/026MW62oFt4oB1nCGWkGmzPzozq9q 2YlshqxFsRfRF4pR8LEl/7FOoa8f8epJ7ZapzJo0= Received: from DFLE104.ent.ti.com (dfle104.ent.ti.com [10.64.6.25]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 53G7kbPd130350 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 16 Apr 2025 02:46:37 -0500 Received: from DFLE113.ent.ti.com (10.64.6.34) by DFLE104.ent.ti.com (10.64.6.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Wed, 16 Apr 2025 02:46:36 -0500 Received: from lelvsmtp6.itg.ti.com (10.180.75.249) by DFLE113.ent.ti.com (10.64.6.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Wed, 16 Apr 2025 02:46:36 -0500 Received: from localhost (dhcp-172-24-227-250.dhcp.ti.com [172.24.227.250]) by lelvsmtp6.itg.ti.com (8.15.2/8.15.2) with ESMTP id 53G7kZxt069859; Wed, 16 Apr 2025 02:46:36 -0500 From: Anshul Dalal To: CC: Anshul Dalal , , , , , , Subject: [PATCH v4 4/8] mach-k3: sysfw-loader: update img_hdr for falcon Date: Wed, 16 Apr 2025 13:15:10 +0530 Message-ID: <20250416074515.1452854-5-anshuld@ti.com> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250416074515.1452854-1-anshuld@ti.com> References: <20250416074515.1452854-1-anshuld@ti.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-C2ProcessedOrg: 333ef613-75bf-4e12-a4b1-8e3623f5dcea 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.8 at phobos.denx.de X-Virus-Status: Clean The returned legacy_img_hdr is used by booti_setup to compute the load address for the kernel image. This change ensures the kernel load address is CONFIG_SYS_LOAD_ADDR in falcon boot. Signed-off-by: Anshul Dalal --- arch/arm/mach-k3/r5/sysfw-loader.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-k3/r5/sysfw-loader.c b/arch/arm/mach-k3/r5/sysfw-loader.c index 188731e673d..19607606965 100644 --- a/arch/arm/mach-k3/r5/sysfw-loader.c +++ b/arch/arm/mach-k3/r5/sysfw-loader.c @@ -89,7 +89,11 @@ static void *sysfw_load_address; struct legacy_img_hdr *spl_get_load_buffer(ssize_t offset, size_t size) { if (sysfw_loaded) - return (struct legacy_img_hdr *)(CONFIG_TEXT_BASE + offset); + if (IS_ENABLED(CONFIG_SPL_OS_BOOT)) + return (struct legacy_img_hdr *)CONFIG_SYS_LOAD_ADDR; + else + return (struct legacy_img_hdr *)(CONFIG_TEXT_BASE + + offset); else if (sysfw_load_address) return sysfw_load_address; else -- 2.49.0