From patchwork Wed Oct 16 18:04:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xiang W X-Patchwork-Id: 1998183 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=C8fH0r2Q; 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=cnyNUfiG; 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 4XTJl56dzNz1xvV for ; Thu, 17 Oct 2024 05:04:33 +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:Date:Cc:To:From:Subject: Message-ID:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=W09wFmYfd/OaeFXgPPZRAShgdG5O9rRjVZcMHBPPUgE=; b=C8fH0r2Q8r8BE2 XOcEc9xSO6NCwreSXS3c43L1v++ied2AAYvCdumUaDDddle9rrR7zUYlCuxO2Ci5/vjbUq6lNTcUd w+FWwTHM4jldbWIKB/0krxSu5lshFHB0NHd5kkcylwFd6w3bqq1sBE84bi94JwaqHRlI4qkd1d4// 99JkYqoBnaqHMPyjR6f5M8WKjpvyw4OBdkAa8urvFoTVhn0oNYST4YVOm6ee1anEDZFo0CvW2dIAp NdUziSZzhcSkz9PkIsP2wze4lY6+KjqQeyvWjvdwhtVr5Wu8jM0OFKGHd6uhYclHHln5zYPbfXjux P+Ri/3xrRr7lvOMCk3Gg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t18Nl-0000000Cd1X-405T; Wed, 16 Oct 2024 18:04:25 +0000 Received: from m16.mail.126.com ([220.197.31.8]) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t18Ni-0000000Cd0W-424Q for opensbi@lists.infradead.org; Wed, 16 Oct 2024 18:04:24 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=126.com; s=s110527; h=Message-ID:Subject:From:Date:Content-Type: MIME-Version; bh=DDVdCAz/8wrLeIZgS4eZQWEeVGZtTzTRyrpP6I5Hl+I=; b=cnyNUfiG7Ums100OPF4p93GMxJyERMALdjo50CapYF+4hZBy6XqQ7FPtxInH8d e4DE8hGSPK7DPFGzPHjMDhr3fUAxVJSEZusEeB22K4LLlouPWa1NggeYQyO1MAvA 8GUEOSOoTXMSh8XBSlQBHBtatIsis8Fi8TzlsjVP1Ee0g= Received: from [127.0.0.1] (unknown [153.35.241.212]) by gzsmtp1 (Coremail) with SMTP id pSkvCgD337wfABBnUoIQAQ--.53536S2; Thu, 17 Oct 2024 02:04:15 +0800 (CST) Message-ID: <8822e93d5747663d1928c4240e480796a45a36e7.camel@126.com> Subject: [RFC PATCH 0/2] Improve pmp support From: Xiang W To: opensbi@lists.infradead.org Cc: anup@brainfault.org Date: Thu, 17 Oct 2024 02:04:14 +0800 User-Agent: Evolution 3.54.0-1+b1 MIME-Version: 1.0 X-CM-TRANSID: pSkvCgD337wfABBnUoIQAQ--.53536S2 X-Coremail-Antispam: 1Uf129KBjvJXoWxJrW7tw1DWr45uF1xAF1DKFg_yoW8Jw13pF 1fJF4Sqw4Iyryfu3Zaqw40qw43Aay8u34UJ343CryftrW8Aw18Xr4xJFn7G3y7JFyxAa1U AF1kCryY9F15uFJanT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x0zRqXdnUUUUU= X-Originating-IP: [153.35.241.212] X-CM-SenderInfo: pz0m23b26rjloofrz/1tbi5Bh6OmcP9Yk74wABsx X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241016_110423_356916_131BE303 X-CRM114-Status: UNSURE ( 3.70 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.1 (--) 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: Sv32 supports 2^34 physical memory under RV32. Previously, pmp only supported 2^Xlen physical memory, and the physical memory was limited to 4G under rv32. This patch hopes to remove this limitation. Content analysis details: (-2.1 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.8 listed in list.dnswl.org] 0.0 RCVD_IN_VALIDITY_SAFE_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. [220.197.31.8 listed in sa-accredit.habeas.com] 0.0 RCVD_IN_VALIDITY_CERTIFIED_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. [220.197.31.8 listed in sa-trusted.bondedsender.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 -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [wxjstz(at)126.com] 0.0 RCVD_IN_VALIDITY_RPBL_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. [220.197.31.8 listed in bl.score.senderscore.com] 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 Sv32 supports 2^34 physical memory under RV32. Previously, pmp only supported 2^Xlen physical memory, and the physical memory was limited to 4G under rv32. This patch hopes to remove this limitation. Xiang W (2): lib: sbi: Improve pmp_get/pmp_set lib: sbi: Using word addresses in memregion include/sbi/sbi_domain.h | 45 ++++++++----- lib/sbi/riscv_asm.c | 42 ++++++------ lib/sbi/sbi_dbtr.c | 15 +---- lib/sbi/sbi_domain.c | 85 ++++++++++++++---------- lib/sbi/sbi_ecall_dbcn.c | 18 +---- lib/sbi/sbi_hart.c | 8 +-- lib/sbi/sbi_hsm.c | 4 +- lib/sbi/sbi_sse.c | 22 ++---- lib/sbi/sbi_system.c | 2 +- lib/utils/fdt/fdt_domain.c | 4 +- lib/utils/fdt/fdt_fixup.c | 2 +- lib/utils/ipi/aclint_mswi.c | 3 +- lib/utils/ipi/andes_plicsw.c | 4 +- lib/utils/irqchip/aplic.c | 2 +- lib/utils/irqchip/imsic.c | 4 +- lib/utils/irqchip/plic.c | 5 +- lib/utils/regmap/fdt_regmap_syscon.c | 2 +- lib/utils/serial/cadence-uart.c | 3 +- lib/utils/serial/fdt_serial_htif.c | 3 +- lib/utils/serial/uart8250.c | 3 +- lib/utils/timer/aclint_mtimer.c | 50 ++++++++------ lib/utils/timer/andes_plmt.c | 5 +- platform/generic/renesas/rzfive/rzfive.c | 5 +- platform/generic/sophgo/sg2042.c | 6 +- 24 files changed, 173 insertions(+), 169 deletions(-)