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 17679EB64DC for ; Tue, 18 Jul 2023 08:58:04 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id B7024866C0; Tue, 18 Jul 2023 10:57:51 +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="Ow8OmVEg"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 61A80866BE; Tue, 18 Jul 2023 10:57:50 +0200 (CEST) Received: from lelv0142.ext.ti.com (lelv0142.ext.ti.com [198.47.23.249]) (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 A9DDA866B4 for ; Tue, 18 Jul 2023 10:57:47 +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=n-jain1@ti.com Received: from lelv0265.itg.ti.com ([10.180.67.224]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 36I8vjMp008976; Tue, 18 Jul 2023 03:57:45 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1689670665; bh=GLTSZDHBXGH/oKtzHgtYR+/U3+P57rDNkF+kllAHUHA=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=Ow8OmVEgeAUKdBsi60VkJPuHf93LrgMKwT6t0V+Wc6BaMFApHG2rDzRZwdmWkd56z BR/pvX1Yzhv5S90hKE61v2OCpreBAtuzj41N0k9SVBVj7W6gBetT+jBkYpyWh9FRWx 1mfVnPFfG+0FfBDKkIu3ki5ci8jIkSh9IZ0X26XA= Received: from DFLE108.ent.ti.com (dfle108.ent.ti.com [10.64.6.29]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 36I8vjXQ012025 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 18 Jul 2023 03:57:45 -0500 Received: from DFLE103.ent.ti.com (10.64.6.24) by DFLE108.ent.ti.com (10.64.6.29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Tue, 18 Jul 2023 03:57:45 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) by DFLE103.ent.ti.com (10.64.6.24) 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; Tue, 18 Jul 2023 03:57:45 -0500 Received: from localhost (ileaxei01-snat2.itg.ti.com [10.180.69.6]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id 36I8vieW022398; Tue, 18 Jul 2023 03:57:44 -0500 From: Nikhil M Jain To: CC: , , , , , , Subject: [PATCH V6 01/10] common: spl: spl: Update stack pointer address Date: Tue, 18 Jul 2023 14:27:27 +0530 Message-ID: <20230718085736.17337-2-n-jain1@ti.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230718085736.17337-1-n-jain1@ti.com> References: <20230718085736.17337-1-n-jain1@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.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 At SPL stage when stack is relocated, the stack pointer needs to be updated, the stack pointer may point to stack in on chip memory even though stack is relocated. Signed-off-by: Nikhil M Jain Reviewed-by: Tom Rini --- V6: - No change. V5: - No change. V4: - No change. V3: - Add Reviewed-by tag. V2: - No change. common/spl/spl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/common/spl/spl.c b/common/spl/spl.c index d74acec10b..d45dd1c923 100644 --- a/common/spl/spl.c +++ b/common/spl/spl.c @@ -992,6 +992,7 @@ ulong spl_relocate_stack_gd(void) #endif /* Get stack position: use 8-byte alignment for ABI compliance */ ptr = CONFIG_SPL_STACK_R_ADDR - roundup(sizeof(gd_t),16); + gd->start_addr_sp = ptr; new_gd = (gd_t *)ptr; memcpy(new_gd, (void *)gd, sizeof(gd_t)); #if CONFIG_IS_ENABLED(DM) -- 2.34.1