From patchwork Tue Jun 7 08:10:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Simek X-Patchwork-Id: 1639859 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=U5rCLQg2; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (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 4LHNXJ0dDHz9sFs for ; Tue, 7 Jun 2022 18:18:08 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id B830D842F2; Tue, 7 Jun 2022 10:17:59 +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="U5rCLQg2"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 5CAFC84343; Tue, 7 Jun 2022 10:11:54 +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-x632.google.com (mail-ej1-x632.google.com [IPv6:2a00:1450:4864:20::632]) (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 1F8788431B for ; Tue, 7 Jun 2022 10:11:09 +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-x632.google.com with SMTP id m20so33505232ejj.10 for ; Tue, 07 Jun 2022 01:11:09 -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=RrnX52sgjLDO78ey3VB3yR6CYldltte0wSF5rLl5zU4=; b=U5rCLQg2C6TNVxJ2uxHU2/f0iA4aY8rSV3AEm0N1ctt7/B/o+gBWL62RhLs1td82ED 019VAnOhKddJH5WDeciivY4pqrq9g0lOC0Ul8FSBC5sbsneoyTmWbkx7xDUE2xL1ssmK TnwqOPR+D0fUgxCfpggwp9Dpp1IbQjHXIRj6WsL05PLSk0I/sA/maM+3kfzB0kpBCEIT thQsUU6SPuIdg2Sv+/p2XAJlrGk37wl6Ybv7zrl6BlVJu/0LnnlQfdcXvs/mCUzjEPJv M5P/OLcW4vRFCZgA7o4MHRB/gSImipX15qsr4EJY/FlJptxQrWq72YrDeW6mehMB4dRo JH9A== 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=RrnX52sgjLDO78ey3VB3yR6CYldltte0wSF5rLl5zU4=; b=f43hnPeCTxejTRE1MltqVWNndxpFD+XnSlk1IutO5gYdZPxshJ1JDP+CwhmQUJDsyr ECD+lkwg+FBCKaZZBKu0bw21HKYmHfHI5abGAkLcy4zL3SnUuYFEEQg4iHCIvzrMAd00 QUqxKJtD8FupbtsGtTKhFCaTgDAzRFdbv03pD43EmhZwYE5yl0vFbRrvWGqKP4DN0XxI 02IEV12TBVr93D7LVANbAJeWyZ9aCIH0H6ySVfspZ9lMJuY3f0Evztu4xojbBHoA15PQ 9EXoD9YDmVN38oeIILJX+6mOsOHVk6va9TTF+sSGyvXLE4GB6+MI+n1gnrh72/KW4IdF qOxw== X-Gm-Message-State: AOAM531NAHXn/jYOtbRWsWDBX3F6IP3AinxkF8ec+RsmgrmTfKF6guEN YIUGfSkhS07UtjhZW47ajlCFMTC14TBhog== X-Google-Smtp-Source: ABdhPJxZgJlTcsXi+l+NdnTjqX5q1uT5b5VwYw2+riQ9ebMGMg1S6PkCxd0C9/XowmD7aIfeX50XAg== X-Received: by 2002:a17:906:dff9:b0:6ff:2f22:7d0 with SMTP id lc25-20020a170906dff900b006ff2f2207d0mr18181942ejc.198.1654589468626; Tue, 07 Jun 2022 01:11:08 -0700 (PDT) Received: from localhost ([2a02:768:2307:40d6::f9e]) by smtp.gmail.com with ESMTPSA id m3-20020aa7c483000000b0042de29d8fc0sm9800890edq.94.2022.06.07.01.11.07 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 07 Jun 2022 01:11:07 -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 v2 12/23] microblaze: Separate code end substraction Date: Tue, 7 Jun 2022 10:10:29 +0200 Message-Id: X-Mailer: git-send-email 2.36.0 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