From patchwork Tue Jun 7 08:10:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Simek X-Patchwork-Id: 1639849 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=wEL2Qmwj; 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 4LHNQz5knLz9sFs for ; Tue, 7 Jun 2022 18:13:31 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 0FDAD84328; Tue, 7 Jun 2022 10:12:25 +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="wEL2Qmwj"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 87E0784314; Tue, 7 Jun 2022 10:11:17 +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-ed1-x52d.google.com (mail-ed1-x52d.google.com [IPv6:2a00:1450:4864:20::52d]) (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 AF77E842FA for ; Tue, 7 Jun 2022 10:11:01 +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-ed1-x52d.google.com with SMTP id er5so21885515edb.12 for ; Tue, 07 Jun 2022 01:11:01 -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=vu7G09FGx/Tc/j856cGMWjOg0IZCEzJ5Kc7PFY6nkf4=; b=wEL2QmwjeoYzn7CfZldJ4i/BF7qT3qvXkv9F1gvJ+NeTK9XAVMn1A1hyKHVGKqfgcG tA6G1r4hC+F23zCKuCzBxpVp2wm3oKQcVKk98cEBkpI3UI/wYuOcknox5G4CmIeTL515 VCebKJsVyxAsKwlVQzHlufcgfcCqHI6H24rLVUF7+yCZzSXCAYfoMgoBSbCuJ9/tUVWa MHTrnR3TAMAt7+DOcYfppJwYN9T5VWm5RAMnQGKqBkA+UIIyimvqa2hvJSqlEncNglUp 7c0jNCIsrqRpzWp/zNCTKxsLJltP8kDT2wHK+Rl3mllbclducxqZlCcV8SivBGTXE4Yj r2RQ== 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=vu7G09FGx/Tc/j856cGMWjOg0IZCEzJ5Kc7PFY6nkf4=; b=G3zb1d9uQCHEUabH9BGFM3Aq3Ablb34nMSdPfxRhA8BxK8NPeLlHyqea5ettXkR1B7 L/mQ40Paenpuuz3k8ftMVshj2SL5h4Yn/G7Z7uQex6O3Rr1AEqcLdOmnlTEMGZ8p6dLk Lm2GgaJ5LaSsty9Di3dCcnLQ/oTHNzVE7iS9Gf53c7k/mxl3zChtiqqsKXA6oj5Dy7Zx aFAvvIwJooRK+SsHwEV+xzyGOxNXSeyX0KmcyzLjfgBYV4hnHTzoYbI/d4Q+ptfA+uZG NaTsP8toyEr0q48dmtT6KaD+EdkXXHAuTAYkwffFliUfc3JOBCtqel011Rm28GvN4XDD ruzA== X-Gm-Message-State: AOAM531vtKY+2jgWMaVZf1gKfyLS6QAnpMU988996SZ9WbOXUipu/HLJ qPquOtQ0VbuuA23BJREjaVnVm/7RzcZzfw== X-Google-Smtp-Source: ABdhPJzt6UwrdaLkZ1ih4CjyEt4sJGpz+q0DGPhCZygpf1HwjtN46ngqnQ7/ZGslLwR7ao8accAcBg== X-Received: by 2002:a05:6402:d0a:b0:425:d455:452 with SMTP id eb10-20020a0564020d0a00b00425d4550452mr31543200edb.259.1654589461166; Tue, 07 Jun 2022 01:11:01 -0700 (PDT) Received: from localhost ([2a02:768:2307:40d6::f9e]) by smtp.gmail.com with ESMTPSA id u17-20020a056402111100b004316f94ec4esm1961233edv.66.2022.06.07.01.11.00 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 07 Jun 2022 01:11:00 -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 08/23] microblaze: Remove CONFIG_TEXT_BASE from code Date: Tue, 7 Jun 2022 10:10:25 +0200 Message-Id: <47bc79209c53fc690cab5a9e4a8d722d9bef9853.1654589430.git.michal.simek@amd.com> 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 Use symbol instead macro to find where U-Boot starts. Signed-off-by: Michal Simek --- (no changes since v1) arch/microblaze/cpu/start.S | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/microblaze/cpu/start.S b/arch/microblaze/cpu/start.S index 1acac5faf428..205d5f384c38 100644 --- a/arch/microblaze/cpu/start.S +++ b/arch/microblaze/cpu/start.S @@ -142,7 +142,7 @@ __setup_exceptions: swi r2, r4, 0x0 /* reset address - imm opcode */ swi r3, r4, 0x4 /* reset address - brai opcode */ - addik r6, r0, CONFIG_SYS_TEXT_BASE + addik r6, r0, _start sw r6, r1, r0 lhu r7, r1, r10 rsubi r8, r10, 0x2 @@ -285,7 +285,7 @@ relocate_code: /* R23 points to the base address. */ add r23, r0, r7 /* Move reloc addr to r23 */ - addi r24, r0, CONFIG_SYS_TEXT_BASE /* Get reloc offset */ + addi r24, r0, _start /* Get reloc offset */ rsub r23, r24, r23 /* keep - this is already here gd->reloc_off */ /* Setup vectors with post-relocation symbols */ @@ -323,7 +323,7 @@ relocate_code: nop 2: addi r5, r31, 0 /* gd is initialized in board_r.c */ - addi r6, r0, CONFIG_SYS_TEXT_BASE + addi r6, r0, _start addi r12, r23, board_init_r bra r12 /* Jump to relocated code */