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 6D8E9C433EF for ; Wed, 15 Jun 2022 13:22:55 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 57072844DD; Wed, 15 Jun 2022 15:21:47 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=monstr.eu 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=monstr-eu.20210112.gappssmtp.com header.i=@monstr-eu.20210112.gappssmtp.com header.b="P3Nkp441"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 1422D844C8; Wed, 15 Jun 2022 15:21:40 +0200 (CEST) Received: from mail-ej1-x629.google.com (mail-ej1-x629.google.com [IPv6:2a00:1450:4864:20::629]) (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 85A2384478 for ; Wed, 15 Jun 2022 15:21:37 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=monstr.eu Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=monstr@monstr.eu Received: by mail-ej1-x629.google.com with SMTP id s12so23224268ejx.3 for ; Wed, 15 Jun 2022 06:21:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monstr-eu.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=sHV87L8jXqk1shojKH0Ccz07k3au65rkzfIVZt/PeJ0=; b=P3Nkp4413OsUEbN8L1q0YvAtnfpxWsT9kSoMMUnjDR4pnWP+qXmvGh8FLZyEgyakZR BFMkkaYhb44qnGC78ffGTbhcOgosk7kTdh1C7Emk14CMOOf3blVBKTlHJbh9fBC9zz/+ dafmarNctvL/wUmoGRhQIj+i4xdlL5kIUdeugdQBfpT28otBU6gQlyX+//4b0EuCwNTT 2Zo1PF9QOwlWcDMd+bZmT9dDGiDOkibcaoA4YPmQertjfNXi/QmkfcvBJ/KD5fVlBjEm 5G0kBbXbpNEZOlGLt9g5PG//Gd0lAeUL/PnTtFngXzMQrMiTqxz/fbzQHOfFXzwGWCGn hrLA== 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:mime-version:content-transfer-encoding; bh=sHV87L8jXqk1shojKH0Ccz07k3au65rkzfIVZt/PeJ0=; b=E2dNYsTSOM64UfRQemgFPrkGi6wK63qN2Pe/Nz39hdOO4WscypvWssalgxOpY3oEA7 FAUnyikYOnJXujG10NmhfzcdBlkxP3pcuTHnyJRccSNTIpQYndang+SWOl/VZFEhTkFz lEXeM9mkNfNstmh+9wpYYc+fGXNbheEYKf+C/jRTmvFweg10zeTm5ueNelKjlX5GTrJ6 Ou35EqFVkKc1Eb10Dc9/+Rf7Le5UIi4VYv1lF5a/zPeDdJv4mQpLmiZSvTamFnOTTVxS 8nr2crq8QNHlaguiEsC66vp6fvAbM6Eug1O3M3iM6drTVSkzmyM3XQUsCtfr9vUhnUvx tidQ== X-Gm-Message-State: AJIora/hrNiO2mfIVruyMCEMYfGDSq+5kDeMrJNEEdMw5OLbJCwfeQF7 coB74XhgJ1zNUBfbifnwJTg48710StuS1A== X-Google-Smtp-Source: ABdhPJz80RmmqxDGZlwG67ew9k4oPz7nwqxvp2oSMtJXwzYnJbeCF0+RtxgYfmHZvxy/sAIodCq0Zw== X-Received: by 2002:a17:907:7b86:b0:711:d2c8:ab18 with SMTP id ne6-20020a1709077b8600b00711d2c8ab18mr8808170ejc.580.1655299296829; Wed, 15 Jun 2022 06:21:36 -0700 (PDT) Received: from localhost ([2a02:768:2307:40d6::f9e]) by smtp.gmail.com with ESMTPSA id z22-20020a50e696000000b0042e032164a4sm9577706edm.61.2022.06.15.06.21.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Jun 2022 06:21:36 -0700 (PDT) From: Michal Simek X-Google-Original-From: Michal Simek To: u-boot@lists.denx.de, git@xilinx.com Cc: Michal Simek , Ovidiu Panait Subject: [PATCH v4 07/23] microblaze: Fix early stack allocation Date: Wed, 15 Jun 2022 15:21:03 +0200 Message-Id: X-Mailer: git-send-email 2.36.1 In-Reply-To: References: MIME-Version: 1.0 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.5 at phobos.denx.de X-Virus-Status: Clean CONFIG_SYS_INIT_SP_OFFSET macro place stack to TEXT_BASE - SYS_MALLOC_F_LEN but there is no reason to do it now because board_init_f_alloc_reserve() returns exact location where stack should be. That's why stack location is calculated at run time and there is no need to hardcode it via macro. This change will help with placing U-Boot to any address. Signed-off-by: Michal Simek --- (no changes since v1) arch/microblaze/cpu/start.S | 2 +- include/configs/microblaze-generic.h | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/arch/microblaze/cpu/start.S b/arch/microblaze/cpu/start.S index 715ef37b39d9..1acac5faf428 100644 --- a/arch/microblaze/cpu/start.S +++ b/arch/microblaze/cpu/start.S @@ -22,7 +22,7 @@ _start: #if defined(CONFIG_SPL_BUILD) addi r1, r0, CONFIG_SPL_STACK_ADDR #else - addi r1, r0, CONFIG_SYS_INIT_SP_OFFSET + add r1, r0, r8 #endif addi r1, r1, -4 /* Decrement SP to top of memory */ diff --git a/include/configs/microblaze-generic.h b/include/configs/microblaze-generic.h index 663837f33dc4..60ceb2c817e9 100644 --- a/include/configs/microblaze-generic.h +++ b/include/configs/microblaze-generic.h @@ -18,10 +18,6 @@ # define CONFIG_SYS_BAUDRATE_TABLE \ {300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200, 230400} -/* Stack location before relocation */ -#define CONFIG_SYS_INIT_SP_OFFSET (CONFIG_SYS_TEXT_BASE - \ - CONFIG_SYS_MALLOC_F_LEN) - #ifdef CONFIG_CFI_FLASH /* ?empty sector */ # define CONFIG_SYS_FLASH_EMPTY_INFO 1 -- 2.36.1