From patchwork Wed Jun 15 10:03:49 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Simek X-Patchwork-Id: 1643576 X-Patchwork-Delegate: monstr@monstr.eu Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=monstr-eu.20210112.gappssmtp.com header.i=@monstr-eu.20210112.gappssmtp.com header.a=rsa-sha256 header.s=20210112 header.b=WQ1aJKK6; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4LNLYT5wlgz9t6h for ; Wed, 15 Jun 2022 20:06:21 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 0991D844A1; Wed, 15 Jun 2022 12:04:39 +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="WQ1aJKK6"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 3334B844A3; Wed, 15 Jun 2022 12:04:27 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ej1-x634.google.com (mail-ej1-x634.google.com [IPv6:2a00:1450:4864:20::634]) (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 0F3208446C for ; Wed, 15 Jun 2022 12:04:25 +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-x634.google.com with SMTP id n10so22167256ejk.5 for ; Wed, 15 Jun 2022 03:04:25 -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=RyAF2xd4Hb4C8EpLjwqmXNodZhPy1T6CU0Ah81MTlxE=; b=WQ1aJKK6kwnksGfmHN7mPezc2rcnyI5gofcN0PKoEDAO4AqPsWG2FnGwGSJh5i6cFe 3pMRRVvqbXsf2PMEcA33wEd1EjVs3c9XKUsIueuvjgt8AAyj2EOIxRqkB1SfwJLyPWfh 9zUzddF5sn/b5/8r8I15gSL1Fttq77YVIv848FIzY6Wu3K4H1zSZzUiVbR5TtdBCIfnS GYeDKDEsGH+hk83DEJzW0XY/YYWk8Z5nbSMWqZxcaxA2pahqhC+1H8iFDSkD3GipTiT/ DBqIb+2IM6xGxiqiMxnIyQv+LuCRqiBWbVu9UBrVLSzStCb9AHLygLgKKGfr0pli3h4V IpbA== 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=RyAF2xd4Hb4C8EpLjwqmXNodZhPy1T6CU0Ah81MTlxE=; b=SCpg+TNs/cQ9Pu7FxNg8uG4N5lqf71mSlh5jgEM8h/je9CnAGvEM2QF9/D4MGAQ45o wRI74LXaTow+9HvURzF4xkRJjSJx61ozp5GAlVymiM3fR+wI80lfEYbLPyrYw2Q2x0Wt xCa+djE2Kq2wySlu5vNPV/2jJECOjPOFU3n+FlFHczvmIhhCk9OjjAPbKf/I7T2SVxQx o4GivQVMnm+1h4+1237hj/ph1R+pP/jl2gxKDcoVBZN+WjutnBrQW69xWgLKAZSFXxHe SURVpd9piKV0rjQo63KqMono1vHro3JJoNnyIcS1jkZQTgI5Sqb67xzdUcqFqTvtXWB1 ODRA== X-Gm-Message-State: AOAM533z/C7gpYg3oKYEmCKjHAeOHYsAb2E9iMxmn2myekGyvPScukGf In70xVch19etPqKDlh9pYYfofDEs3zaQDA== X-Google-Smtp-Source: ABdhPJwodnpAsuqnseuw+jpnG6uPlmgOM1xBf9y6h7VM729FI2EbSZ5b22YDtiuft7BytoyXsapSBg== X-Received: by 2002:a17:907:3f97:b0:711:d61d:df9 with SMTP id hr23-20020a1709073f9700b00711d61d0df9mr8269285ejc.644.1655287464360; Wed, 15 Jun 2022 03:04:24 -0700 (PDT) Received: from localhost ([2a02:768:2307:40d6::f9e]) by smtp.gmail.com with ESMTPSA id fw37-20020a170907502500b0071579abcf3csm4931971ejc.111.2022.06.15.03.04.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Jun 2022 03:04:23 -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 v3 12/23] microblaze: Separate code end substraction Date: Wed, 15 Jun 2022 12:03:49 +0200 Message-Id: X-Mailer: git-send-email 2.36.1 In-Reply-To: References: 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.5 at phobos.denx.de X-Virus-Status: Clean Follow up patch will convert symbol handling that's why it is necessary to separate logic around symbols to special instruction. It adds 4B for new instruction but it is worth to do it to have code ready for for full relocation. Signed-off-by: Michal Simek --- (no changes since v1) arch/microblaze/cpu/start.S | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/microblaze/cpu/start.S b/arch/microblaze/cpu/start.S index 205d5f384c38..a35d8d8ea29a 100644 --- a/arch/microblaze/cpu/start.S +++ b/arch/microblaze/cpu/start.S @@ -273,7 +273,8 @@ relocate_code: add r23, r0, r7 /* Move reloc addr to r23 */ /* Relocate text and data - r12 temp value */ addi r21, r0, _start - addi r22, r0, _end - 4 /* Include BSS too */ + addi r22, r0, _end /* Include BSS too */ + addi r22, r22, -4 rsub r6, r21, r22 or r5, r0, r0