From patchwork Sun Feb 11 16:11:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xiang W X-Patchwork-Id: 1897475 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=k/5/quIL; 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=hwxyrMA1; 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 4TXszz5p7cz23nM for ; Mon, 12 Feb 2024 03:12:14 +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=6qnw0p4HCnFb/S0ld6wU4pD8gQtWAoW22IJa/bjzKzY=; b=k/5/quILyK8UuJ D8NqspvVgeN7Wh/vkpeJ2x6xUVQJVTv1WV2yXChAL2xm7mGSgOKk2RPZAHVH8dgT6PPsOQcga0oKY HWYvzUivr3qO3gQACh/kuOKEAhRzVt9ZTC7sjWhLMJXOvcYQl0szhYTmnMtHm6QKacfNVCfsvEuHX C0VjgndqX8b4Ftg6jZiyQwnPXJzPTu30PsmgzBJzjyUaMyZlP2Fe07zzpQf3bt0i570iuGEfV8LrO 75dC3UqzipVqC6yNeDivS45OstRZVj6tj9OPgMaB3zVsJHe8SBjZjF6dVsZo0jhXJLhJWYkTBFvgS vO0bTdXiL1j8fLSbi8DQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rZCR0-00000002zcb-3Io5; Sun, 11 Feb 2024 16:12:02 +0000 Received: from m16.mail.126.com ([220.197.31.9]) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rZCQw-00000002zaU-1Xds for opensbi@lists.infradead.org; Sun, 11 Feb 2024 16:12:00 +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=mYqWn o6WXU73mTDMXo+vAoLKAOcLfiLkZzl/Zn6p2yM=; b=hwxyrMA16BOG2B497LyWo Aq+89t12/9w6tqn6beSzwy/8/xkUuKEafZ5BBP79Mlvwok3Y6i0ZjrJnHW9MFUJW Xe6lA22pIo5jRv689QxR4jx/yjxRXDsrkLIY94Hll6pMx4lQPK5LrTs0ZjMQC6PV s2emlNGqtR8hRCu1RUqq3A= Received: from T490.lan (unknown [36.153.54.93]) by gzga-smtp-mta-g1-1 (Coremail) with SMTP id _____wDXf23B8chlw7Q2Ag--.15450S8; Mon, 12 Feb 2024 00:11:50 +0800 (CST) From: Xiang W To: opensbi@lists.infradead.org Cc: Xiang W , anup@brainfault.org Subject: [PATCH v4 6/8] firmware: fw_base.S: fix _reset_regs Date: Mon, 12 Feb 2024 00:11:30 +0800 Message-ID: <20240211161138.2538981-7-wxjstz@126.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240211161138.2538981-1-wxjstz@126.com> References: <20240211161138.2538981-1-wxjstz@126.com> MIME-Version: 1.0 X-CM-TRANSID: _____wDXf23B8chlw7Q2Ag--.15450S8 X-Coremail-Antispam: 1Uf129KBjvdXoW7Gr4xWF15KrykJr43AF1DJrb_yoWkCrXEvF WIyryqyrsrtFyagw1DGr1akr9Y9rWUC3yS9w4rJFZFyrWxWa18trWkur47Aa4UXw43KrWr AFy7JrZ3u3s7ujkaLaAFLSUrUUUUjb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7sRKID7PUUUUU== X-Originating-IP: [36.153.54.93] X-CM-SenderInfo: pz0m23b26rjloofrz/xtbBdAeBOmSdLvQLxAAAsk X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240211_081158_800985_6B176F8E X-CRM114-Status: UNSURE ( 6.70 ) 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: a3 and a4 cannot be reset because used in fw_platform_init. Signed-off-by: Xiang W --- firmware/fw_base.S | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/firmware/fw_base.S b/firmware/fw_base.S index 10fee4f..30fd616 100644 --- a/firmware/fw_base.S +++ b/firmware/fw_base.S @@ -77,7 +77,7 @@ _relocate_done: 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.9 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 a3 and a4 cannot be reset because used in fw_platform_init. Signed-off-by: Xiang W --- firmware/fw_base.S | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/firmware/fw_base.S b/firmware/fw_base.S index 10fee4f..30fd616 100644 --- a/firmware/fw_base.S +++ b/firmware/fw_base.S @@ -77,7 +77,7 @@ _relocate_done: /* At this point we are running from link address */ - /* Reset all registers except ra, a0, a1 and a2 for boot HART */ + /* Reset all registers except ra, a0, a1, a2, a3 and a4 for boot HART */ li ra, 0 call _reset_regs @@ -304,7 +304,7 @@ _wait_for_boot_hart: bne t0, t1, _wait_for_boot_hart _start_warm: - /* Reset all registers except ra, a0, a1 and a2 for non-boot HARTs */ + /* Reset all registers except ra, a0, a1, a2, a3 and a4 for non-boot HART */ li ra, 0 call _reset_regs @@ -655,7 +655,7 @@ _reset_regs: /* flush the instruction cache */ fence.i - /* Reset all registers except ra, a0, a1 and a2 */ + /* Reset all registers except ra, a0, a1, a2, a3 and a4 */ li sp, 0 li gp, 0 li tp, 0 @@ -664,8 +664,6 @@ _reset_regs: li t2, 0 li s0, 0 li s1, 0 - li a3, 0 - li a4, 0 li a5, 0 li a6, 0 li a7, 0