From patchwork Sat Mar 2 07:42:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xiang W X-Patchwork-Id: 1907087 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=AD7Cl4mm; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=126.com header.i=@126.com header.a=rsa-sha256 header.s=s110527 header.b=Q1w9cXME; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=opensbi-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=patchwork.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4TmxlY4kjQz23pN for ; Sat, 2 Mar 2024 18:43:20 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=SAteDvMv34qna3fwzcuOgnXRP6cobDryNq4pnFKJwkI=; b=AD7Cl4mm/sejZE 1Jk24ZnOnaoBLkzFrywQPbc6dX+q5veEL//Kuosa17s9tZ8Vpzb+GTItNwprZf1AiADkTR9H1Zv0q yrbg1/P2XyZ5AOpKg7ymydiYKNeC8YNq2BwUu47t8dfbHGrylwD+gqNnfxU3ZkhXCYG2ZlDw6P+Ev 1i+GvJiHT/kRZezCEQ4MQKm0DJijE5Jb6FR1B13R0frM/eFDWX71Jtk6ucINm110ywtx9EnvGaCGo cgiul4bI3elw2O2wp4TOKG2unGZ1RNJjFhQqgURfCcJbYKtjQ0lbJCoh7PagjrlT3kji0IKaJ6NVd AXIR92gao5xswtxDRnbQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rgK1X-000000033EQ-3PKN; Sat, 02 Mar 2024 07:43:11 +0000 Received: from m16.mail.126.com ([220.197.31.7]) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rgK1U-0000000338o-1u9K for opensbi@lists.infradead.org; Sat, 02 Mar 2024 07:43:10 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=126.com; s=s110527; h=From:Subject:Date:Message-ID:MIME-Version; bh=ICkMx s17k4ULtB9IlIGkUtV6O9lEtQYzm4HxnZOr+Zw=; b=Q1w9cXMEMBGXbTZI3dXJj bUOijR1r/bskVZlXy/chcCNky5DGuoRC5UakyKjltMc/EppQl7WGArDUwo6MSsxb OlT7OF7PugxMAzrYNKcXuWrU7DUYSVWbNkFhv+TuVwbRh9DWOtoJDCcqo7a8hCv7 pqw7+PUdFjEMEIcyVsLpc4= Received: from T490.lan (unknown [36.153.54.93]) by gzga-smtp-mta-g1-2 (Coremail) with SMTP id _____wD3X3N+2OJlaFAABQ--.21504S4; Sat, 02 Mar 2024 15:42:58 +0800 (CST) From: Xiang W To: opensbi@lists.infradead.org Cc: Xiang W , anup@brainfault.org Subject: [PATCH v5 2/8] firmware: fw_base.S: Simplify address get Date: Sat, 2 Mar 2024 15:42:21 +0800 Message-ID: <20240302074235.12643-3-wxjstz@126.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240302074235.12643-1-wxjstz@126.com> References: <20240302074235.12643-1-wxjstz@126.com> MIME-Version: 1.0 X-CM-TRANSID: _____wD3X3N+2OJlaFAABQ--.21504S4 X-Coremail-Antispam: 1Uf129KBjvdXoWruF4kXF17Jr1rCF47ur4rZrb_yoWDWwc_AF WIkFyxG3WFvr45Ww1xGr1fJr1YyrW8Wa40vF4fA3yxJr17CayjqF4UZF4DXr9FqF43KrZr ZFnrJFs7Kwn29jkaLaAFLSUrUUUUjb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7sRCHq2PUUUUU== X-Originating-IP: [36.153.54.93] X-CM-SenderInfo: pz0m23b26rjloofrz/xtbBdRuVOmSdLzVlIgABsk X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240301_234308_969002_C4617491 X-CRM114-Status: UNSURE ( 5.31 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Simplify address get. Remove _link_start _link_end _load_start. Signed-off-by: Xiang W --- firmware/fw_base.S | 16 ++ 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/firmware/fw_base.S b/firmware/fw_base.S index cd94f15..d418041 100644 --- a/firmware/fw_base.S +++ b/firmware/fw_base.S @@ -52,15 +52,9 @@ _try_lottery: amoadd.w a6, a7, (a6) bnez a6, _wa [...] Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [220.197.31.7 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [wxjstz(at)126.com] -0.0 T_SCC_BODY_TEXT_LINE No description available. X-BeenThere: opensbi@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "opensbi" Errors-To: opensbi-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Simplify address get. Remove _link_start _link_end _load_start. Signed-off-by: Xiang W --- firmware/fw_base.S | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/firmware/fw_base.S b/firmware/fw_base.S index cd94f15..d418041 100644 --- a/firmware/fw_base.S +++ b/firmware/fw_base.S @@ -52,15 +52,9 @@ _try_lottery: amoadd.w a6, a7, (a6) bnez a6, _wait_for_boot_hart - /* Save load address */ - lla t0, _load_start - lla t1, _fw_start - REG_S t1, 0(t0) - /* relocate the global table content */ - lla t0, _link_start - REG_L t0, 0(t0) - /* t1 shall has the address of _fw_start */ + li t0, FW_TEXT_START + lla t1, _fw_start sub t2, t1, t0 lla t0, __rel_dyn_start lla t1, __rel_dyn_end @@ -398,12 +392,6 @@ _relocate_lottery: RISCV_PTR 0 _boot_status: RISCV_PTR 0 -_load_start: - RISCV_PTR _fw_start -_link_start: - RISCV_PTR FW_TEXT_START -_link_end: - RISCV_PTR _fw_reloc_end .section .entry, "ax", %progbits .align 3